Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

Step Info from NDSolve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg33624] Step Info from NDSolve
  • From: bghiggins at ucdavis.edu (Brian Higgins)
  • Date: Wed, 3 Apr 2002 18:08:38 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

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