Interface to dodesol_rkm9st

Interface to dodesol_rkm9st

Hello!I have to solve a system of ODE describing a Newtonian dynamics of some complex object. I decided to use the Intel ODE solver for this.I have coded my subroutine in a framework of Runge-Kutta 4rd order. It works perfectly. But I would like to use more adapted libraries for Intel processor performing calculations in a work-station.I downloaded the Intel ODE solver and extracted it respectively to installation manual. The example code was built successful.Let`s talk about my problem closely.I have coded an interface to the dodesol_rkm9st subroutine in a MODULE (see attached a file: subroutine interface2dodesol_motion(traj)).This subroutine accepts a derived type variable "traj". Then a subroutine "cartes2y" translates one to y-vector of length n (initial values for dodesol_rkm9st).After that a resulting y-vector is returned and it is translated back to "traj" using y2cartes.If I understand exactly this will solve my problemcorrectlywith an arbitrary arrange of variables. I just must organize an explicit accept to variables and their interaction between y-vector and rhs-subroutine.Furthermore, about rhs-subroutine.In this subroutine I use an external "derivate" subroutine which returns dU-values. They are used in the calculation of the f(i) RHS functions.If I declare it like external (acording to the manual) I have the following error:/tmp/ipo_ifortpDFulI3.o: In function `iode_solver_mp_rhs_motion_':ipo_out3.f:(.text.hot00022+0xb46): undefined reference to `derivate_'and the executable file is not linked. Without a declaration of "derivate" the executable is linked successful.But when I run it and test the results I see no changes in the values of y-vector (respectively to the machine accuracy [1.d-20 ; 1.d-8]).I want to have an one-step solution. I mean I would like to propagate y-vector from moment t to t+dt (t - undepended variable, dt - step).The rhs depends on y-vector inexplicitly by derivate-subroutine.Finaly.1. I hope this is not the problem with transfer of variables into Intel ODE solver which is argued before.2. Do you know some way of using external subroutines in RHS subroutine?3. I tested dodesol_rkm9st, dodesol_mk52lfn, dodesol_rkm9mkn --- without any success.

Downloadapplication/octet-stream iode_solver.f904.89 KB
4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hello!I still have a problem with interface to the Intel ODE solver.As I have written above I have been solving a Newtonian system of ODE and I would like to use high level libraries.I have coded a simple example (iode_example.f90). It has cutted from my large project and it is saved closely to my solution as much as possible.You can see from this example that the problem with no changes of y-vector vanished.But a solution is still bad. You can see it from conservation Law energy (a total energy changes after dodesol subroutine).Could you look at the rhs subroutine more attentively, please? Maybe mistakes are hiding there.Oleg.iode_example.f90

Hello!Do I have to arrange the rhs f_i functions? I mean the following for the unknown functions r1(t) and r2(t):r1'' = rhs_1(r1, r2, t)r2'' = rhs_2(r1, r2, t)where the rhs_i are the RHS of ODE; it are the same likex1' = rhs_1y1' = x1x2' = rhs_2y2' = x2Must I code in rhs - subroutine next?subroutine rhs(...) ... f(1) = rhs_1 ! for 1st function r1'' f(2) = x1! for 1st function r1'' f(3) = rhs_2! for 1st function r2'' f(4) = x2! for 1st function r2''end subroutine rhs
An order of functions is arbitrary, doesn`t it?Oleg.

> An order of functions is arbitrary, doesn`t it?

This is so in any ODE solver.

However, the ordering must be consistent. That is, f(i) must be the expression that evaluates d.y(i) / d.t, assuming t is the independent variable.

Leave a Comment

Please sign in to add a comment. Not a member? Join today