76 err =
solve(x, y, dydx0_, dx, yTemp_);
81 scalar scale =
max(safeScale_*
pow(err, -alphaDec_), minScale_);
87 <<
"stepsize underflow" 98 if (err >
pow(maxScale_/safeScale_, -1.0/alphaInc_))
101 min(
max(safeScale_*
pow(err, -alphaInc_), minScale_), maxScale_)*dx;
105 dxTry = safeScale_*maxScale_*dx;
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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Abstract base class for the systems of ordinary differential equations.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Macros for easy insertion into run-time selection tables.
adaptiveSolver(const ODESystem &ode, const dictionary &dict)
Construct from ODESystem.
bool resize(const label n)
Resize the ODE solver.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
static void resizeField(UList< Type > &f, const label n)
virtual label nEqns() const =0
Return the number of equations in the system.
virtual void derivatives(const scalar x, const scalarField &y, scalarField &dydx) const =0
Calculate the derivatives in dydx.