Abstract base-class for ODE system solvers. More...
#include <ODESolver.H>


Classes | |
| class | stepState |
Public Member Functions | |
| TypeName ("ODESolver") | |
| Runtime type information. | |
| declareRunTimeSelectionTable (autoPtr, ODESolver, dictionary,(const ODESystem &ode, const dictionary &dict),(ode, dict)) | |
| ODESolver (const ODESystem &ode, const dictionary &dict) | |
| Construct for given ODESystem. | |
| ODESolver (const ODESystem &ode, const scalarField &absTol, const scalarField &relTol) | |
| Construct for given ODESystem specifying tolerances. | |
| virtual | ~ODESolver ()=default |
| Destructor. | |
| label | nEqns () const noexcept |
| The number of equations to solve. | |
| scalarField & | absTol () noexcept |
| Access to the absolute tolerance field. | |
| scalarField & | relTol () noexcept |
| Access to the relative tolerance field. | |
| virtual bool | resize ()=0 |
| Resize the ODE solver. | |
| template<class Type> | |
| void | resizeField (UList< Type > &f) const |
| void | resizeMatrix (scalarSquareMatrix &m) const |
| virtual void | solve (scalar &x, scalarField &y, scalar &dxTry) const |
| Solve the ODE system as far as possible up to dxTry. | |
| virtual void | solve (scalar &x, scalarField &y, stepState &step) const |
| Solve the ODE system as far as possible up to dxTry. | |
| virtual void | solve (const scalar xStart, const scalar xEnd, scalarField &y, scalar &dxEst) const |
| Solve the ODE system from xStart to xEnd, update the state. | |
Static Public Member Functions | |
| static autoPtr< ODESolver > | New (const ODESystem &ode, const dictionary &dict) |
| Select null constructed. | |
| template<class Type> | |
| static void | resizeField (UList< Type > &f, const label n) |
Protected Member Functions | |
| scalar | normalizeError (const scalarField &y0, const scalarField &y, const scalarField &err) const |
| Return the nomalized scalar error. | |
| ODESolver (const ODESolver &)=delete | |
| No copy construct. | |
| void | operator= (const ODESolver &)=delete |
| No copy assignment. | |
Protected Attributes | |
| const ODESystem & | odes_ |
| Reference to ODESystem. | |
| const label | maxN_ |
| Maximum size of the ODESystem. | |
| label | n_ |
| Size of the ODESystem (adjustable). | |
| scalarField | absTol_ |
| Absolute convergence tolerance per step. | |
| scalarField | relTol_ |
| Relative convergence tolerance per step. | |
| label | maxSteps_ |
| The maximum number of sub-steps allowed for the integration step. | |
Friends | |
| class | ODESystem |
|
protecteddelete |
No copy construct.
References ODESolver().
Referenced by declareRunTimeSelectionTable(), Euler::Euler(), EulerSI::EulerSI(), ODESolver(), operator=(), RKCK45::RKCK45(), RKDP45::RKDP45(), RKF45::RKF45(), rodas23::rodas23(), rodas34::rodas34(), Rosenbrock12::Rosenbrock12(), Rosenbrock23::Rosenbrock23(), Rosenbrock34::Rosenbrock34(), seulex::seulex(), SIBS::SIBS(), and Trapezoid::Trapezoid().


| ODESolver | ( | const ODESystem & | ode, |
| const dictionary & | dict ) |
| ODESolver | ( | const ODESystem & | ode, |
| const scalarField & | absTol, | ||
| const scalarField & | relTol ) |
|
virtualdefault |
Destructor.
|
protected |
Return the nomalized scalar error.
Definition at line 35 of file ODESolver.C.
References absTol_, forAll, Foam::mag(), Foam::max(), relTol_, y, and Foam::y0().
Referenced by Euler::solve(), EulerSI::solve(), RKCK45::solve(), RKDP45::solve(), RKF45::solve(), rodas23::solve(), rodas34::solve(), Rosenbrock12::solve(), Rosenbrock23::solve(), Rosenbrock34::solve(), and Trapezoid::solve().


|
protecteddelete |
| TypeName | ( | "ODESolver" | ) |
Runtime type information.
| declareRunTimeSelectionTable | ( | autoPtr | , |
| ODESolver | , | ||
| dictionary | , | ||
| (const ODESystem &ode, const dictionary &dict) | , | ||
| (ode, dict) | ) |
References absTol(), dict, ODESolver(), ODESystem, and relTol().

|
static |
Select null constructed.
Definition at line 26 of file ODESolverNew.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, Foam::Info, and ODESystem.
Referenced by thermoCoupleProbes::thermoCoupleProbes().


|
inlinenoexcept |
The number of equations to solve.
Definition at line 199 of file ODESolver.H.
References n_, and Foam::noexcept.
Referenced by ODESolver(), and ODESolver().

|
inlinenoexcept |
Access to the absolute tolerance field.
Definition at line 204 of file ODESolver.H.
References absTol_, and Foam::noexcept.
Referenced by declareRunTimeSelectionTable(), and ODESolver().

|
inlinenoexcept |
Access to the relative tolerance field.
Definition at line 209 of file ODESolver.H.
References Foam::noexcept, and relTol_.
Referenced by declareRunTimeSelectionTable(), and ODESolver().

|
pure virtual |
Resize the ODE solver.
Implemented in Euler, EulerSI, RKCK45, RKDP45, RKF45, rodas23, rodas34, Rosenbrock12, Rosenbrock23, Rosenbrock34, seulex, SIBS, and Trapezoid.
Definition at line 85 of file ODESolver.C.
References Foam::abort(), absTol_, Foam::FatalError, FatalErrorInFunction, maxN_, n_, odes_, relTol_, and resizeField().
Referenced by Euler::resize(), EulerSI::resize(), RKCK45::resize(), RKDP45::resize(), RKF45::resize(), rodas23::resize(), rodas34::resize(), Rosenbrock12::resize(), Rosenbrock23::resize(), Rosenbrock34::resize(), seulex::resize(), SIBS::resize(), and Trapezoid::resize().


|
inlinestatic |
Definition at line 24 of file ODESolverI.H.
Referenced by adaptiveSolver::resize(), Euler::resize(), EulerSI::resize(), resize(), RKCK45::resize(), RKDP45::resize(), RKF45::resize(), rodas23::resize(), rodas34::resize(), Rosenbrock12::resize(), Rosenbrock23::resize(), Rosenbrock34::resize(), seulex::resize(), SIBS::resize(), and Trapezoid::resize().


|
inline |
|
inline |
Definition at line 39 of file ODESolverI.H.
References n_, and SquareMatrix< Type >::shallowResize().
Referenced by EulerSI::resize(), rodas23::resize(), rodas34::resize(), Rosenbrock12::resize(), Rosenbrock23::resize(), Rosenbrock34::resize(), seulex::resize(), and SIBS::resize().


|
virtual |
Solve the ODE system as far as possible up to dxTry.
adjusting the step as necessary to provide a solution within the specified tolerance. Update the state and return an estimate for the next step in dxTry
Reimplemented in Euler, EulerSI, RKCK45, RKDP45, RKF45, rodas23, rodas34, Rosenbrock12, Rosenbrock23, Rosenbrock34, SIBS, and Trapezoid.
Definition at line 109 of file ODESolver.C.
References ODESolver::stepState::dxTry, solve(), x, and y.
Referenced by Euler::~Euler(), EulerSI::~EulerSI(), RKCK45::~RKCK45(), RKDP45::~RKDP45(), RKF45::~RKF45(), rodas23::~rodas23(), rodas34::~rodas34(), Rosenbrock12::~Rosenbrock12(), Rosenbrock23::~Rosenbrock23(), Rosenbrock34::~Rosenbrock34(), and Trapezoid::~Trapezoid().


|
virtual |
Solve the ODE system as far as possible up to dxTry.
adjusting the step as necessary to provide a solution within the specified tolerance. Update the state and return an estimate for the next step in dxTry
Reimplemented in Euler, EulerSI, RKCK45, RKDP45, RKF45, rodas23, rodas34, Rosenbrock12, Rosenbrock23, Rosenbrock34, seulex, and Trapezoid.
Definition at line 122 of file ODESolver.C.
References ODESolver::stepState::dxDid, ODESolver::stepState::dxTry, solve(), x, and y.

|
virtual |
Solve the ODE system from xStart to xEnd, update the state.
and return an estimate for the next step in dxTry
Reimplemented in Euler, EulerSI, RKCK45, RKDP45, RKF45, rodas23, rodas34, Rosenbrock12, Rosenbrock23, Rosenbrock34, and Trapezoid.
Definition at line 135 of file ODESolver.C.
References ODESolver::stepState::dxDid, ODESolver::stepState::dxTry, Foam::exit(), Foam::FatalError, FatalErrorInFunction, ODESolver::stepState::first, ODESolver::stepState::last, maxSteps_, Foam::nl, ODESolver::stepState::prevReject, ODESolver::stepState::reject, solve(), x, and y.

|
friend |
Definition at line 114 of file ODESolver.H.
References ODESystem.
Referenced by declareRunTimeSelectionTable(), Euler::Euler(), EulerSI::EulerSI(), New(), ODESolver(), ODESolver(), ODESystem, RKCK45::RKCK45(), RKDP45::RKDP45(), RKF45::RKF45(), rodas23::rodas23(), rodas34::rodas34(), Rosenbrock12::Rosenbrock12(), Rosenbrock23::Rosenbrock23(), Rosenbrock34::Rosenbrock34(), seulex::seulex(), SIBS::SIBS(), Trapezoid::Trapezoid(), Euler::TypeName(), EulerSI::TypeName(), RKCK45::TypeName(), RKDP45::TypeName(), RKF45::TypeName(), rodas23::TypeName(), rodas34::TypeName(), Rosenbrock12::TypeName(), Rosenbrock23::TypeName(), Rosenbrock34::TypeName(), seulex::TypeName(), SIBS::TypeName(), and Trapezoid::TypeName().
|
protected |
Reference to ODESystem.
Definition at line 61 of file ODESolver.H.
Referenced by ODESolver(), ODESolver(), resize(), Euler::solve(), EulerSI::solve(), EulerSI::solve(), RKCK45::solve(), RKCK45::solve(), RKDP45::solve(), RKDP45::solve(), RKF45::solve(), RKF45::solve(), rodas23::solve(), rodas23::solve(), rodas34::solve(), rodas34::solve(), Rosenbrock12::solve(), Rosenbrock12::solve(), Rosenbrock23::solve(), Rosenbrock23::solve(), Rosenbrock34::solve(), Rosenbrock34::solve(), seulex::solve(), SIBS::solve(), Trapezoid::solve(), and Trapezoid::solve().
|
protected |
Maximum size of the ODESystem.
Definition at line 66 of file ODESolver.H.
Referenced by ODESolver(), ODESolver(), and resize().
|
mutableprotected |
Size of the ODESystem (adjustable).
Definition at line 71 of file ODESolver.H.
Referenced by Euler::Euler(), EulerSI::EulerSI(), nEqns(), ODESolver(), ODESolver(), Euler::resize(), EulerSI::resize(), resize(), RKCK45::resize(), RKDP45::resize(), RKF45::resize(), rodas23::resize(), rodas34::resize(), Rosenbrock12::resize(), Rosenbrock23::resize(), Rosenbrock34::resize(), seulex::resize(), Trapezoid::resize(), resizeField(), resizeMatrix(), RKCK45::RKCK45(), RKDP45::RKDP45(), RKF45::RKF45(), rodas23::rodas23(), rodas34::rodas34(), Rosenbrock12::Rosenbrock12(), Rosenbrock23::Rosenbrock23(), Rosenbrock34::Rosenbrock34(), seulex::seulex(), SIBS::SIBS(), EulerSI::solve(), rodas23::solve(), rodas34::solve(), Rosenbrock12::solve(), Rosenbrock23::solve(), Rosenbrock34::solve(), seulex::solve(), SIBS::solve(), and Trapezoid::Trapezoid().
|
protected |
Absolute convergence tolerance per step.
Definition at line 76 of file ODESolver.H.
Referenced by absTol(), normalizeError(), ODESolver(), ODESolver(), resize(), seulex::solve(), and SIBS::solve().
|
protected |
Relative convergence tolerance per step.
Definition at line 81 of file ODESolver.H.
Referenced by normalizeError(), ODESolver(), ODESolver(), relTol(), resize(), seulex::seulex(), seulex::solve(), and SIBS::solve().
|
protected |
The maximum number of sub-steps allowed for the integration step.
Definition at line 86 of file ODESolver.H.
Referenced by ODESolver(), ODESolver(), and solve().