Abstract base-class for ODE system solvers. More...
Classes | |
class | stepState |
Public Member Functions | |
TypeName ("ODESolver") | |
declareRunTimeSelectionTable (autoPtr, ODESolver, dictionary,(const ODESystem &ode, const dictionary &dict),(ode, dict)) | |
ODESolver (const ODESystem &ode, const dictionary &dict) | |
ODESolver (const ODESystem &ode, const scalarField &absTol, const scalarField &relTol) | |
virtual | ~ODESolver ()=default |
label | nEqns () const |
scalarField & | absTol () |
scalarField & | relTol () |
virtual bool | resize ()=0 |
template<class Type > | |
void | resizeField (UList< Type > &f) const |
void | resizeMatrix (scalarSquareMatrix &m) const |
virtual void | solve (scalar &x, scalarField &y, scalar &dxTry) const |
virtual void | solve (scalar &x, scalarField &y, stepState &step) const |
virtual void | solve (const scalar xStart, const scalar xEnd, scalarField &y, scalar &dxEst) const |
Static Public Member Functions | |
static autoPtr< ODESolver > | New (const ODESystem &ode, const dictionary &dict) |
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 |
ODESolver (const ODESolver &)=delete | |
void | operator= (const ODESolver &)=delete |
Protected Attributes | |
const ODESystem & | odes_ |
const label | maxN_ |
label | n_ |
scalarField | absTol_ |
scalarField | relTol_ |
label | maxSteps_ |
Friends | |
class | ODESystem |
ODESolver | ( | const ODESystem & | ode, |
const dictionary & | dict | ||
) |
Definition at line 56 of file ODESolver.C.
ODESolver | ( | const ODESystem & | ode, |
const scalarField & | absTol, | ||
const scalarField & | relTol | ||
) |
Definition at line 68 of file ODESolver.C.
|
virtualdefault |
|
protected |
Definition at line 36 of file ODESolver.C.
References forAll, Foam::mag(), Foam::max(), y, and Foam::y0().
|
protecteddelete |
TypeName | ( | "ODESolver" | ) |
declareRunTimeSelectionTable | ( | autoPtr | , |
ODESolver | , | ||
dictionary | , | ||
(const ODESystem &ode, const dictionary &dict) | , | ||
(ode, dict) | |||
) |
|
static |
Definition at line 27 of file ODESolverNew.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, and Foam::Info.
Referenced by thermoCoupleProbes::thermoCoupleProbes().
|
inline |
Definition at line 24 of file ODESolverI.H.
References ODESolver::n_.
|
inline |
Definition at line 30 of file ODESolverI.H.
|
inline |
Definition at line 36 of file ODESolverI.H.
|
pure virtual |
Implemented in seulex, SIBS, Rosenbrock34, RKF45, RKDP45, RKCK45, rodas34, rodas23, Rosenbrock23, Rosenbrock12, EulerSI, Euler, and Trapezoid.
Definition at line 85 of file ODESolver.C.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
Referenced by Trapezoid::resize(), Euler::resize(), EulerSI::resize(), Rosenbrock12::resize(), Rosenbrock23::resize(), rodas23::resize(), RKCK45::resize(), rodas34::resize(), RKDP45::resize(), RKF45::resize(), Rosenbrock34::resize(), SIBS::resize(), and seulex::resize().
|
inlinestatic |
Definition at line 43 of file ODESolverI.H.
References f(), n, and List::shallowCopy().
Referenced by adaptiveSolver::resize().
|
inline |
Definition at line 50 of file ODESolverI.H.
References f().
|
inline |
Definition at line 56 of file ODESolverI.H.
References SquareMatrix< Type >::shallowResize().
|
virtual |
Reimplemented in SIBS, Rosenbrock34, RKF45, RKDP45, RKCK45, rodas34, rodas23, Rosenbrock23, Rosenbrock12, EulerSI, Euler, and Trapezoid.
Definition at line 110 of file ODESolver.C.
References ODESolver::stepState::dxTry, Foam::solve(), x, and y.
|
virtual |
Reimplemented in seulex.
Definition at line 123 of file ODESolver.C.
References ODESolver::stepState::dxDid, ODESolver::stepState::dxTry, Foam::solve(), x, and y.
|
virtual |
Definition at line 136 of file ODESolver.C.
References ODESolver::stepState::dxDid, ODESolver::stepState::dxTry, Foam::exit(), Foam::FatalError, FatalErrorInFunction, ODESolver::stepState::first, ODESolver::stepState::last, Foam::nl, ODESolver::stepState::prevReject, ODESolver::stepState::reject, Foam::solve(), x, and y.
|
friend |
Definition at line 97 of file ODESolver.H.
|
protected |
Definition at line 60 of file ODESolver.H.
|
protected |
Definition at line 63 of file ODESolver.H.
|
mutableprotected |
Definition at line 66 of file ODESolver.H.
Referenced by ODESolver::nEqns().
|
protected |
Definition at line 69 of file ODESolver.H.
|
protected |
Definition at line 72 of file ODESolver.H.
|
protected |
Definition at line 75 of file ODESolver.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.