Public Member Functions | |
adaptiveSolver (const ODESystem &ode, const dictionary &dict) | |
Construct from ODESystem. More... | |
virtual | ~adaptiveSolver () |
Destructor. More... | |
virtual scalar | solve (const scalar x0, const scalarField &y0, const scalarField &dydx0, const scalar dx, scalarField &y) const =0 |
Solve a single step dx and return the error. 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 | |
scalar | safeScale_ |
Step-size adjustment controls. More... | |
scalar | alphaInc_ |
scalar | alphaDec_ |
scalar | minScale_ |
scalar | maxScale_ |
scalarField | dydx0_ |
Cache for dydx at the initial time. More... | |
scalarField | yTemp_ |
Temprorary for the test-step solution. More... | |
adaptiveSolver | ( | const ODESystem & | ode, |
const dictionary & | dict | ||
) |
Construct from ODESystem.
Definition at line 32 of file adaptiveSolver.C.
|
inlinevirtual |
Destructor.
Definition at line 70 of file adaptiveSolver.H.
|
pure virtual |
Solve a single step dx and return the error.
Implemented in Rosenbrock34, RKDP45, RKF45, RKCK45, rodas34, rodas23, Rosenbrock23, Rosenbrock12, EulerSI, and Trapezoid.
Referenced by Trapezoid::solve(), Euler< Type >::solve(), EulerSI::solve(), Rosenbrock12::solve(), Rosenbrock23::solve(), rodas23::solve(), rodas34::solve(), RKCK45::solve(), RKDP45::solve(), RKF45::solve(), and Rosenbrock34::solve().
void solve | ( | const ODESystem & | ode, |
scalar & | x, | ||
scalarField & | y, | ||
scalar & | dxTry | ||
) | const |
Solve the ODE system and the update the state.
Definition at line 50 of file adaptiveSolver.C.
References ODESystem::derivatives(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::max(), Foam::min(), Foam::pow(), solve(), x, and y.
|
private |
Step-size adjustment controls.
Definition at line 52 of file adaptiveSolver.H.
|
private |
Definition at line 52 of file adaptiveSolver.H.
|
private |
Definition at line 52 of file adaptiveSolver.H.
|
private |
Definition at line 52 of file adaptiveSolver.H.
|
private |
Definition at line 52 of file adaptiveSolver.H.
|
mutableprivate |
Cache for dydx at the initial time.
Definition at line 55 of file adaptiveSolver.H.
|
mutableprivate |
Temprorary for the test-step solution.
Definition at line 58 of file adaptiveSolver.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.