nutopy.path.Options¶
- class Options(*args, **kwargs)[source]¶
Bases:
nutopy.options.Options
Options for
nutopy.path.solve
.- Variables
DispIter (
int
, default is1
) – Display at iteration k such that mod(k,DispIter)==0Display (
str
, {‘on’, ‘off’}, default ison
) – Display iterations and results or notDoSavePath (
str
, {‘off’, ‘on’}, default isoff
) – Save path during the homotopy in a file “SavedPath(n).py”MaxIterCorrection (
int
, default is7
) – Maximum number of iterations during correctionMaxArcLength (
float
, default is1e5
) – Maximum arc lengthMaxFunNorm (
float
, default is1e-1
) – Maximal norm of the function F during homotopyMaxSteps (
int
, default is10000
) – Maximum number of homotopy stepsMaxStepSize (
float
, default is0
) – Maximum step size during homotopy. If it is equal to 0 then the integrator has no constraint on the maximal step size.MaxStepSizeHomPar (
float
, default is0
) – Maximum step size for the homotopic parameter. If 0 then no constraint on the maximal step size.ODESolver (
str
, default isdopri5
) –Integrator name for homotopy. See Refs. 1 and 2. The integrators are interface of Fortran softwares available here.
- Explicit:
dopri5, dop853
- Implicit:
radau5, radau9, radau13, radau (adaptative order 5, 9 and 13)
StopAtTurningPoint (
int
, {0, 1}, default is0
) – Stop or not after a turning point.TolOdeAbs (
float
, default is1e-10
) – Absolute error tolerance.TolOdeRel (
float
, default is1e-8
) – Relative error tolerance.TolHomparfinalStep (
float
, default is1e-8
) – Absolute Dense output tolerance. Absolute tolerance to detect if the final homotopic parameter has been reached.TolHomParEvolution (
float
, default is1e-8
) – Relative Dense output tolerance. The homotopy stops when the homotopic parameter do not evolve relatively, iteration per iteration, during ten following steps.TolXCorrectionStep (
float
, default is1e-8
) – Relative tolerance during correction.
Examples
>>> from nutopy import path
Constructor usage
>>> options = path.Options()
>>> options = path.Options(Display='off', MaxSf=100)
>>> options = path.Options({'Display' : 'off', 'MaxSf' : 100})
Update
>>> options.update(Display='on')
Get
>>> solver = options.get('Display')
References
- 1
E. Hairer, S. P. Norsett & G. Wanner, Solving Ordinary Differential Equations I, Nonstiff Problems, vol 8 of Springer Serie in Computational Mathematics, Springer-Verlag, second edn (1993).
- 2
E. Hairer & G. Wanner, Solving Ordinary Differential Equations II, Stiff and Differential-Algebraic Problems, vol 14 of Springer Serie in Computational Mathematics, Springer-Verlag, second edn (1996).