Package jline.solvers
Class SolverOptions.ODESolvers
java.lang.Object
jline.solvers.SolverOptions.ODESolvers
- Enclosing class:
- SolverOptions
Configuration for ordinary differential equation solvers used in fluid analysis.
Contains different integrators optimized for various problem characteristics.
-
Field Summary
FieldsModifier and TypeFieldDescriptionorg.apache.commons.math3.ode.FirstOrderIntegratorAccurate integrator for non-stiff problemsAccurate integrator for stiff problemsorg.apache.commons.math3.ode.FirstOrderIntegratorFast integrator for non-stiff problemsFast integrator for stiff problemsdoubleMaximum step size for ODE integrationdoubleMinimum step size for ODE integration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy(double tol) Returns a copy for a cloned SolverOptions.org.apache.commons.math3.ode.FirstOrderIntegratorintegratorFor(double t0, double t1, double tol, boolean fast) The non-stiff integrator to use over[t0,t1], under the sameodesetMaxStep default asstiffIntegratorFor(double, double, double, boolean).voidsetDefaults(double minStep, double maxStep, double tol) Installs the built-in integrators, mirroring MATLABSolverOptions.m:fastOdeSolver/accurateOdeSolverare the non-stiff pair (@ode23 / @ode113 there, their adaptive Runge-Kutta and Adams-Moulton counterparts here) and the stiff pair is LSODA, as @ode15s is there.stiffIntegratorFor(double t0, double t1, double tol, boolean fast) The stiff integrator to use over[t0,t1].
-
Field Details
-
odeminstep
public double odeminstepMinimum step size for ODE integration -
odemaxstep
public double odemaxstepMaximum step size for ODE integration -
fastODESolver
public org.apache.commons.math3.ode.FirstOrderIntegrator fastODESolverFast integrator for non-stiff problems -
accurateODESolver
public org.apache.commons.math3.ode.FirstOrderIntegrator accurateODESolverAccurate integrator for non-stiff problems -
fastStiffODESolver
Fast integrator for stiff problems -
accurateStiffODESolver
Accurate integrator for stiff problems
-
-
Constructor Details
-
ODESolvers
public ODESolvers()
-
-
Method Details
-
setDefaults
public void setDefaults(double minStep, double maxStep, double tol) Installs the built-in integrators, mirroring MATLABSolverOptions.m:fastOdeSolver/accurateOdeSolverare the non-stiff pair (@ode23 / @ode113 there, their adaptive Runge-Kutta and Adams-Moulton counterparts here) and the stiff pair is LSODA, as @ode15s is there.- Parameters:
minStep- minimum step sizemaxStep- maximum step sizetol- absolute and relative tolerance
-
stiffIntegratorFor
The stiff integrator to use over[t0,t1].MATLAB's
odesetleavesMaxStepat0.1*|tf-t0|unless the caller pins it, and every MATLAB fluid ODE call butsolver_fluid_kptakes that default. The JAR left the step unbounded, and an unbounded step lets LSODA's Nordsieck interpolation drift off a fixed point by ~1e-6 instead of settling on it, so a closed model's throughputs stopped balancing flow. The bound is applied only to the built-in integrators and only whileodemaxstepis infinite, so an integrator or a maximum step the caller supplied is left alone.- Parameters:
t0- window startt1- window endtol- absolute and relative tolerancefast- true for the coarse-tolerance integrator- Returns:
- the integrator to drive over this window
-
integratorFor
public org.apache.commons.math3.ode.FirstOrderIntegrator integratorFor(double t0, double t1, double tol, boolean fast) The non-stiff integrator to use over[t0,t1], under the sameodesetMaxStep default asstiffIntegratorFor(double, double, double, boolean).- Parameters:
t0- window startt1- window endtol- absolute and relative tolerancefast- true for the coarse-tolerance integrator- Returns:
- the integrator to drive over this window
-
copy
Returns a copy for a cloned SolverOptions. Integrators carry mutable state (step handlers, and LSODA's whole working set), so each copy gets its own instance of every DEFAULT integrator -- but an integrator the caller assigned is carried over as-is, because there is no way to rebuild it and silently replacing it would discard the caller's choice.- Parameters:
tol- tolerance for the rebuilt default integrators- Returns:
- the copy
-