Public Member Functions | List of all members

4/5th Order Runge-Kutta-Fehlberg ODE solver More...

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

Public Member Functions

 TypeName ("RKF45")
 
 RKF45 (const ODESystem &ode, const dictionary &dict)
 
virtual ~RKF45 ()=default
 
virtual bool resize ()
 
virtual scalar solve (const scalar x0, const scalarField &y0, const scalarField &dydx0, const scalar dx, scalarField &y) const
 
virtual void solve (scalar &x, scalarField &y, scalar &dxTry) 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
 
- Public Member Functions inherited from ODESolver
 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 ()
 
template<class Type >
void resizeField (UList< Type > &f) const
 
void resizeMatrix (scalarSquareMatrix &m) 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
 
- Public Member Functions inherited from adaptiveSolver
 adaptiveSolver (const ODESystem &ode, const dictionary &dict)
 
virtual ~adaptiveSolver ()=default
 
bool resize (const label n)
 
void solve (const ODESystem &ode, scalar &x, scalarField &y, scalar &dxTry) const
 

Additional Inherited Members

- Static Public Member Functions inherited from ODESolver
static autoPtr< ODESolverNew (const ODESystem &ode, const dictionary &dict)
 
template<class Type >
static void resizeField (UList< Type > &f, const label n)
 
- Protected Member Functions inherited from ODESolver
scalar normalizeError (const scalarField &y0, const scalarField &y, const scalarField &err) const
 
 ODESolver (const ODESolver &)=delete
 
void operator= (const ODESolver &)=delete
 
- Protected Attributes inherited from ODESolver
const ODESystemodes_
 
const label maxN_
 
label n_
 
scalarField absTol_
 
scalarField relTol_
 
label maxSteps_
 

Detailed Description

4/5th Order Runge-Kutta-Fehlberg ODE solver

References:

    Fehlberg, E. (1969).
    Low-order classical Runge-Kutta formulas with stepsize control
    and their application to some heat transfer problems.
    NASA Technical Report 315.

    Hairer, E., Nørsett, S. P., & Wanner, G. (1993).
    Solving Ordinary Differential Equations I: Nonstiff Problems,
    second edition.
    Springer-Verlag, Berlin.

This method embeds the 4-th order integration step into the 5-th order step and allows to perform an adaptive step-size control using these two order without the need of re-evaluation.

Source files

Definition at line 68 of file RKF45.H.

Constructor & Destructor Documentation

◆ RKF45()

RKF45 ( const ODESystem ode,
const dictionary dict 
)

Definition at line 71 of file RKF45.C.

◆ ~RKF45()

virtual ~RKF45 ( )
virtualdefault

Member Function Documentation

◆ TypeName()

TypeName ( "RKF45"  )

◆ resize()

bool resize ( )
virtual

Implements ODESolver.

Definition at line 87 of file RKF45.C.

References adaptiveSolver::resize(), and ODESolver::resize().

Here is the call graph for this function:

◆ solve() [1/5]

Foam::scalar solve ( const scalar  x0,
const scalarField y0,
const scalarField dydx0,
const scalar  dx,
scalarField y 
) const
virtual

Implements adaptiveSolver.

Definition at line 109 of file RKF45.C.

References Foam::constant::physicoChemical::c2, forAll, y, and Foam::y0().

Here is the call graph for this function:

◆ solve() [2/5]

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

Reimplemented from ODESolver.

Definition at line 177 of file RKF45.C.

References adaptiveSolver::solve(), x, and y.

Here is the call graph for this function:

◆ solve() [3/5]

void solve

Definition at line 110 of file ODESolver.C.

◆ solve() [4/5]

void solve

Definition at line 123 of file ODESolver.C.

◆ solve() [5/5]

void solve

Definition at line 136 of file ODESolver.C.


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