43 absTol_(n_, dict.lookupOrDefault<scalar>(
"absTol", SMALL)),
44 relTol_(n_, dict.lookupOrDefault<scalar>(
"relTol", 1
e-4)),
78 maxErr =
max(maxErr,
mag(err[i])/tol);
112 scalar dxTry0 = step.
dxTry;
117 if ((x + step.
dxTry - xEnd)*(x + step.
dxTry - xStart) > 0)
127 if ((x - xEnd)*(xEnd - xStart) >= 0)
129 if (nStep > 0 && step.
last)
149 <<
"Integration steps greater than maximum " << maxSteps_
150 <<
"xStart = " << xStart <<
", xEnd = " << xEnd
151 <<
", x = " << x <<
", dxDid = " << step.
dxDid
#define forAll(list, i)
Loop across all elements in list.
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)
const double e
Elementary charge.
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.
const ODESystem & odes_
Reference to ODESystem.
label maxSteps_
The maximum number of sub-steps allowed for the integration step.
ODESolver(const ODESolver &)
Disallow default bitwise copy construct.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
defineTypeNameAndDebug(combustionModel, 0)
virtual void solve(scalar &x, scalarField &y, scalar &dxTry) const
Solve the ODE system as far as possible upto dxTry.
scalarField relTol_
Relative convergence tolerance per step.
scalar normalizeError(const scalarField &y0, const scalarField &y, const scalarField &err) const
Return the nomalized scalar error.
scalarField absTol_
Absolute convergence tolerance per step.
dimensioned< scalar > mag(const dimensioned< Type > &)
virtual label nEqns() const =0
Return the number of equations in the system.
label n_
Size of the ODESystem.