[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Setting maximum step size in ode solvers

From: Jochen Küpper
Subject: Re: [Help-gsl] Setting maximum step size in ode solvers
Date: Tue, 13 Jun 2006 09:23:57 +0200

"Bernard Siow" <address@hidden> writes:

> Is it possible to set the maximum step size in the ode (ordinary
> differential equation) solvers?

What's about using the T1 parameter to gsl_odeiv_evolve_apply?

,----[ (info "(gsl-ref)Evolution") ]
|  - Function: int gsl_odeiv_evolve_apply (gsl_odeiv_evolve * E,
|           gsl_odeiv_control * CON, gsl_odeiv_step * STEP, const
|           gsl_odeiv_system * DYDT, double * T, double T1, double * H,
|           double Y[])
|      This function advances the system (E, DYDT) from time T and
|      position Y using the stepping function STEP.  The new time and
|      position are stored in T and Y on output.  The initial step-size
|      is taken as H, but this will be modified using the control
|      function C to achieve the appropriate error bound if necessary.
|      The routine may make several calls to STEP in order to determine
|      the optimum step-size. If the step-size has been changed the value
|      of H will be modified on output.  The maximum time T1 is
|      guaranteed not to be exceeded by the time-step.  On the final
|      time-step the value of T will be set to T1 exactly.

> Also, I will have large and sudden changes in some of the parameters
> and I think I will need to reset the step size to something small
> whenever there is a large sudden change in parameters (predictable).

Also set T1 to the predicted time of such a change and successively do
whatever is necessary.

Einigkeit und Recht und Freiheit      
    Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
        (Part 3 you find in my messages before fall 2003.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]