using Intel ODE solver when the variables are vectors

using Intel ODE solver when the variables are vectors

Hi

I am trying to use the intel ODE solver dodesol to solver a set of ODEs. I have run the example and it runs fine. The problem is the example only shows when the variables are scalars. For example:

Y1' = f1(Y1,t)

Y2' = f2(Y2,t)

The example shows how to use it when Y1 and Y2 are two numbers. What if each of them are 1D, 2D or 3D arrays? Is there an example for that?

Thanks

Bo

2 posts / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.

The example code included with the download is for the 2nd order equation of van der Pol.

You have to pack all your dependent variables into a one-dimensional array. If Y1 = (y11,  y12) and Y2=(y21, y22, y23), for example, your two vector differential equations have two and three components, respectively. Define Y = (Y1, Y2) = (y11,y12,y21,y22,y23) and write code to compute the derivatives of these five components of Y.