Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
ODESolver Class Referenceabstract

Abstract base-class for ODE system solvers. More...

Inheritance diagram for ODESolver:
Inheritance graph
[legend]
Collaboration diagram for ODESolver:
Collaboration graph
[legend]

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
 
scalarFieldabsTol ()
 
scalarFieldrelTol ()
 
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< ODESolverNew (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 ODESystemodes_
 
const label maxN_
 
label n_
 
scalarField absTol_
 
scalarField relTol_
 
label maxSteps_
 

Friends

class ODESystem
 

Detailed Description

Abstract base-class for ODE system solvers.

Source files

Definition at line 52 of file ODESolver.H.

Constructor & Destructor Documentation

◆ ODESolver() [1/3]

ODESolver ( const ODESolver )
protecteddelete

◆ ODESolver() [2/3]

ODESolver ( const ODESystem ode,
const dictionary dict 
)

Definition at line 56 of file ODESolver.C.

◆ ODESolver() [3/3]

ODESolver ( const ODESystem ode,
const scalarField absTol,
const scalarField relTol 
)

Definition at line 68 of file ODESolver.C.

◆ ~ODESolver()

virtual ~ODESolver ( )
virtualdefault

Member Function Documentation

◆ normalizeError()

Foam::scalar normalizeError ( const scalarField y0,
const scalarField y,
const scalarField err 
) const
protected

Definition at line 36 of file ODESolver.C.

References forAll, Foam::mag(), Foam::max(), y, and Foam::y0().

Here is the call graph for this function:

◆ operator=()

void operator= ( const ODESolver )
protecteddelete

◆ TypeName()

TypeName ( "ODESolver"  )

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
ODESolver  ,
dictionary  ,
(const ODESystem &ode, const dictionary &dict ,
(ode, dict  
)

◆ New()

Foam::autoPtr< Foam::ODESolver > New ( const ODESystem ode,
const dictionary 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nEqns()

Foam::label nEqns ( ) const
inline

Definition at line 24 of file ODESolverI.H.

References ODESolver::n_.

◆ absTol()

Foam::scalarField & absTol ( )
inline

Definition at line 30 of file ODESolverI.H.

◆ relTol()

Foam::scalarField & relTol ( )
inline

Definition at line 36 of file ODESolverI.H.

◆ resize()

bool resize ( )
pure virtual

◆ resizeField() [1/2]

void resizeField ( UList< Type > &  f,
const label  n 
)
inlinestatic

Definition at line 43 of file ODESolverI.H.

References f(), n, and List::shallowCopy().

Referenced by adaptiveSolver::resize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resizeField() [2/2]

void resizeField ( UList< Type > &  f) const
inline

Definition at line 50 of file ODESolverI.H.

References f().

Here is the call graph for this function:

◆ resizeMatrix()

void resizeMatrix ( scalarSquareMatrix m) const
inline

Definition at line 56 of file ODESolverI.H.

References SquareMatrix< Type >::shallowResize().

Here is the call graph for this function:

◆ solve() [1/3]

void solve ( scalar &  x,
scalarField y,
scalar &  dxTry 
) const
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.

Here is the call graph for this function:

◆ solve() [2/3]

void solve ( scalar &  x,
scalarField y,
stepState step 
) const
virtual

Reimplemented in seulex.

Definition at line 123 of file ODESolver.C.

References ODESolver::stepState::dxDid, ODESolver::stepState::dxTry, Foam::solve(), x, and y.

Here is the call graph for this function:

◆ solve() [3/3]

void solve ( const scalar  xStart,
const scalar  xEnd,
scalarField y,
scalar &  dxEst 
) const
virtual

Friends And Related Function Documentation

◆ ODESystem

friend class ODESystem
friend

Definition at line 97 of file ODESolver.H.

Member Data Documentation

◆ odes_

const ODESystem& odes_
protected

Definition at line 60 of file ODESolver.H.

◆ maxN_

const label maxN_
protected

Definition at line 63 of file ODESolver.H.

◆ n_

label n_
mutableprotected

Definition at line 66 of file ODESolver.H.

Referenced by ODESolver::nEqns().

◆ absTol_

scalarField absTol_
protected

Definition at line 69 of file ODESolver.H.

◆ relTol_

scalarField relTol_
protected

Definition at line 72 of file ODESolver.H.

◆ maxSteps_

label maxSteps_
protected

Definition at line 75 of file ODESolver.H.


The documentation for this class was generated from the following files: