MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Step Info from NDSolve


Hi Mathgroup,
 Is there anyway to get step information (number of steps, step size)
from NDSolve during the actual integration . The application I have in
mind  has the following structure:

NDSolve[{x[t]==F[x[t],y[t],t,1],y'[t]==F[x[t],y[t],t,
2],x[0]==x0,y[0]==y0},{x[t],y[t]},{t,0,tmax}]

where

F[xval_?NumericQ,yval_?NumericQ,tval_?NumericQ,eqnNum_]:=
Module[{}, some code...;
{deriv1,deriv2}[[eqnNum]]]

Thus during integration the RHS values for x'[t] and y'[t] are found
dynamically. This works fine.

Now what I would like to do is take some action inside the function F
depending on the step size and how many steps NDSolve has taken when F
is called.

Is it possible to extract this information from NDSolve dynamically. 

Thanks much in advance for any help you can offer,

Brian


  • Prev by Date: Re: Problem: Integrate
  • Next by Date: Re: Quadratic programming
  • Previous by thread: Re: Unexpected result with RSolve?
  • Next by thread: Re: Step Info from NDSolve