4/5th Order Cash-Karp Runge-Kutta ODE solver. More...
Public Member Functions | |
TypeName ("RKCK45") | |
Runtime type information. More... | |
RKCK45 (const ODESystem &ode, const dictionary &dict) | |
Construct from ODE. More... | |
scalar | solve (const scalar x0, const scalarField &y0, const scalarField &dydx0, const scalar dx, scalarField &y) const |
Solve a single step dx and return the error. More... | |
void | solve (scalar &x, scalarField &y, scalar &dxTry) const |
Solve the ODE system and the update the state. More... | |
virtual void | solve (scalar &x, scalarField &y, scalar &dxTry) const |
Inherit solve from ODESolver. More... | |
virtual void | solve (scalar &x, scalarField &y, stepState &step) const |
Inherit solve from ODESolver. More... | |
virtual void | solve (const scalar xStart, const scalar xEnd, scalarField &y, scalar &dxEst) const |
Inherit solve from ODESolver. More... | |
![]() | |
TypeName ("ODESolver") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, ODESolver, dictionary,(const ODESystem &ode, const dictionary &dict),(ode, dict)) | |
ODESolver (const ODESystem &ode, const dictionary &dict) | |
Construct for given ODESystem. More... | |
ODESolver (const ODESystem &ode, const scalarField &absTol, const scalarField &relTol) | |
Construct for given ODESystem specifying tolerances. More... | |
virtual | ~ODESolver () |
Destructor. More... | |
scalarField & | absTol () |
scalarField & | relTol () |
virtual void | solve (scalar &x, scalarField &y, stepState &step) const |
Solve the ODE system as far as possible upto dxTry. More... | |
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. More... | |
![]() | |
adaptiveSolver (const ODESystem &ode, const dictionary &dict) | |
Construct from ODESystem. More... | |
virtual | ~adaptiveSolver () |
Destructor. More... | |
void | solve (const ODESystem &ode, scalar &x, scalarField &y, scalar &dxTry) const |
Solve the ODE system and the update the state. More... | |
Private Attributes | |
scalarField | yTemp_ |
scalarField | k2_ |
scalarField | k3_ |
scalarField | k4_ |
scalarField | k5_ |
scalarField | k6_ |
scalarField | err_ |
Error-estimate field. More... | |
Static Private Attributes | |
static const scalar | c2 = 1.0/5.0 |
RKCK Constants. More... | |
static const scalar | c3 = 3.0/10.0 |
static const scalar | c4 = 3.0/5.0 |
static const scalar | c5 = 1.0 |
static const scalar | c6 = 7.0/8.0 |
static const scalar | a21 = 1.0/5.0 |
static const scalar | a31 = 3.0/40.0 |
static const scalar | a32 = 9.0/40.0 |
static const scalar | a41 = 3.0/10.0 |
static const scalar | a42 = -9.0/10.0 |
static const scalar | a43 = 6.0/5.0 |
static const scalar | a51 = -11.0/54.0 |
static const scalar | a52 = 5.0/2.0 |
static const scalar | a53 = -70.0/27.0 |
static const scalar | a54 = 35.0/27.0 |
static const scalar | a61 = 1631.0/55296.0 |
static const scalar | a62 = 175.0/512.0 |
static const scalar | a63 = 575.0/13824.0 |
static const scalar | a64 = 44275.0/110592.0 |
static const scalar | a65 = 253.0/4096.0 |
static const scalar | b1 = 37.0/378.0 |
static const scalar | b3 = 250.0/621.0 |
static const scalar | b4 = 125.0/594.0 |
static const scalar | b6 = 512.0/1771.0 |
static const scalar | e1 = RKCK45::b1 - 2825.0/27648.0 |
static const scalar | e3 = RKCK45::b3 - 18575.0/48384.0 |
static const scalar | e4 = RKCK45::b4 - 13525.0/55296.0 |
static const scalar | e5 = -277.00/14336.0 |
static const scalar | e6 = RKCK45::b6 - 0.25 |
Additional Inherited Members | |
![]() | |
static autoPtr< ODESolver > | New (const ODESystem &ode, const dictionary &dict) |
Select null constructed. More... | |
![]() | |
scalar | normalizeError (const scalarField &y0, const scalarField &y, const scalarField &err) const |
Return the nomalized scalar error. More... | |
ODESolver (const ODESolver &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const ODESolver &) |
Disallow default bitwise assignment. More... | |
![]() | |
const ODESystem & | odes_ |
Reference to ODESystem. More... | |
label | n_ |
Size of the ODESystem. More... | |
scalarField | absTol_ |
Absolute convergence tolerance per step. More... | |
scalarField | relTol_ |
Relative convergence tolerance per step. More... | |
label | maxSteps_ |
The maximum number of sub-steps allowed for the integration step. More... | |
4/5th Order Cash-Karp Runge-Kutta ODE solver.
"A variable order Runge-Kutta method for initial value problems with rapidly varying right-hand sides" Cash, J.R., Karp, A.H. ACM Transactions on Mathematical Software, vol. 16, 1990, pp. 201–222. "Solving Ordinary Differential Equations I: Nonstiff Problems, second edition", Hairer, E., Nørsett, S., Wanner, G., Springer-Verlag, Berlin. 1993, ISBN 3-540-56670-8.
RKCK45 | ( | const ODESystem & | ode, |
const dictionary & | dict | ||
) |
TypeName | ( | "RKCK45" | ) |
Runtime type information.
|
virtual |
Solve a single step dx and return the error.
Implements adaptiveSolver.
Definition at line 91 of file RKCK45.C.
References Foam::constant::physicoChemical::c2, forAll, y, and Foam::y0().
|
virtual |
|
inline |
Inherit solve from ODESolver.
Definition at line 178 of file ODESolver.H.
void solve |
Inherit solve from ODESolver.
Definition at line 86 of file ODESolver.C.
void solve |
Inherit solve from ODESolver.
Definition at line 99 of file ODESolver.C.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.