80 err_[i] = dx*dydx0[i];
86 y[i] =
y0[i] + err_[i];
89 return normalizeError(
y0,
y, err_);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Euler-implicit integration scheme.
Euler(const ODESystem &ode, const dictionary &dict)
Construct from ODESystem.
virtual bool resize()
Resize the ODE solver.
virtual 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.
Abstract base-class for ODE system solvers.
scalar normalizeError(const scalarField &y0, const scalarField &y, const scalarField &err) const
Return the nomalized scalar error.
ODESolver(const ODESolver &)=delete
No copy construct.
label n_
Size of the ODESystem (adjustable).
const ODESystem & odes_
Reference to ODESystem.
virtual bool resize()=0
Resize the ODE solver.
static void resizeField(UList< Type > &f, const label n)
Abstract base class for the systems of ordinary differential equations.
adaptiveSolver(const ODESystem &ode, const dictionary &dict)
Construct from ODESystem.
bool resize(const label n)
Resize the ODE solver.
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.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
An ODE solver for chemistry.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
dimensionedScalar y0(const dimensionedScalar &ds)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
#define forAll(list, i)
Loop across all elements in list.