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

2006-06-13 Thread Jochen Küpper
"Bernard Siow" <[EMAIL PROTECTED]> writes:

> Thanks for the info. What happens to the actual step size, h, when the
> time interval, ti, is set to a value lower than h?

Read the source, Luke;)

,[gsl_odeiv_evolve_apply]
[...]
|  double h0 = *h;
[...]
|   if ((dt >= 0.0 && h0 > dt) || (dt < 0.0 && h0 < dt))
| {
|   h0 = dt;
|   final_step = 1;
| }
[...]
|  *h = h0;  /* suggest step size for next time-step */
[...]
`

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheithttp://www.Jochen-Kuepper.de
Liberté, Égalité, FraternitéGnuPG key: CC1B0B4D
(Part 3 you find in my messages before fall 2003.)


___
Help-gsl mailing list
Help-gsl@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gsl


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

2006-06-13 Thread Bernard Siow
Thanks for the info. What happens to the actual step size, h, when the time 
interval, ti, is set to a value lower than h?  

-Original Message-
From: Brian Gough [mailto:[EMAIL PROTECTED] 
Sent: 13 June 2006 09:14
To: Bernard Siow
Cc: help-gsl@gnu.org
Subject: Re: [Help-gsl] Setting maximum step size in ode solvers

Jochen Küpper writes:
 > "Bernard Siow" <[EMAIL PROTECTED]> 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?

Yes, the second Van der Pol example in the ODE chapter of the GSL manual shows 
how to do something similar.

--
Brian Gough

Network Theory Ltd,
Publishing the GSL Manual - http://www.network-theory.co.uk/gsl/manual/


___
Help-gsl mailing list
Help-gsl@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gsl


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

2006-06-13 Thread Brian Gough
Jochen Küpper writes:
 > "Bernard Siow" <[EMAIL PROTECTED]> 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?

Yes, the second Van der Pol example in the ODE chapter of the GSL
manual shows how to do something similar.

-- 
Brian Gough

Network Theory Ltd,
Publishing the GSL Manual - http://www.network-theory.co.uk/gsl/manual/


___
Help-gsl mailing list
Help-gsl@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gsl


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

2006-06-13 Thread Jochen Küpper
"Bernard Siow" <[EMAIL PROTECTED]> 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.

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheithttp://www.Jochen-Kuepper.de
Liberté, Égalité, FraternitéGnuPG key: CC1B0B4D
(Part 3 you find in my messages before fall 2003.)


___
Help-gsl mailing list
Help-gsl@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gsl