MathGroup Archive 2004

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

Search the Archive

options in NDSolve

  • To: mathgroup at
  • Subject: [mg46217] options in NDSolve
  • From: Guibout <guibout at>
  • Date: Thu, 12 Feb 2004 07:15:45 -0500 (EST)
  • Sender: owner-wri-mathgroup at

I use NDSolve several times in one of my programs and therefore I want 
to define a variable called method that stores the options I want to 
use. Here is what I did:

option = MidPoint;
  "MidPoint", method = {Method -> {"FixedStep", Method -> 
LinearlyImplicitMidpoint}, StartingStepSize -> 0.01, MaxSteps -> Infinity},
  "IRK", method = {Method -> ImplicitRungeKutta, MaxSteps -> Infinity},
  "IRK4", method = {Method -> {"ImplicitRungeKutta", DifferenceOrder -> 
4}, StartingStepSize -> 0.01, MaxSteps -> Infinity},
   "ERK", method = {Method -> {"ExplicitRungeKutta", DifferenceOrder -> 
4}, MaxSteps -> Infinity},
  "Standard", method = {MaxSteps -> Infinity, MaxStepSize -> 0.1}];


You can copy and paste this code and you will see that it does not work. 
  Indeed, method does not contain what I expect:
In[3]:= method
Out[3]={MaxSteps->Infinity, MaxStepSize->0.1}

Mathematica seems to combine StartingStepSize->0.01 and FixedStep to 
obtain MaxStepSize->0.1 and drop Method->LinearlyImplicitMidPoint.

Why does mathematica behave like that? Is there another way to do what I 
want to do?
Thanks in advance,

  • Prev by Date: Re: How to printout more digits?
  • Next by Date: Re: Algebraic Manipulation
  • Previous by thread: RE: Sorting text-file data into list lists
  • Next by thread: Re: options in NDSolve