MathGroup Archive 2004

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

Search the Archive

Re: options in NDSolve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46264] Re: options in NDSolve
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 12 Feb 2004 22:46:34 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <c0frmf$bul$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

and what is Choose[] for a function ?
and why do you think that the *string* "MidPoint" has anything
to do with the Mathematica symbol MidPoint ...
and should a sequence of options not given as a Sequence[] to
NDSolve instead of a List[] ??

Regards
  Jens

Guibout wrote:
> 
> 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;
> Choose[option,
>   "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}];
> 
> solution=NDSolve[equations,variables,method];
> 
> 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,
> Vincent


  • Prev by Date: RE: Sorting text-file data into list lists
  • Next by Date: Re: how to explain this weird effect? Integrate
  • Previous by thread: options in NDSolve
  • Next by thread: A Reduce question