52 derivatives(
x,
y, li, dfdx0);
57 jacobian(
x,
y, li, dfdx1, d2fdxdyAnalytic);
60 Info<<
"[derivatives] dfdx = ( ";
63 Info<<
"[ jacobian] dfdx = ( ";
66 Info<<
"[ ratio] dfdx = ( ";
74 for (
label i = 0; i < nEqns(); ++ i)
79 derivatives(
x,
y0, li, dfdx0);
80 derivatives(
x,
y1, li, dfdx1);
82 for (
label j = 0; j < nEqns(); j++)
84 d2fdxdyFiniteDifference(j, i) = (dfdx1[j] - dfdx0[j])/(2*dy[i]);
91 for (
label i = 0; i < nEqns(); ++ i)
94 Info<<
"[derivatives] d2fdxdy[" << i <<
"] = ( ";
98 for (
label i = 0; i < nEqns(); ++ i)
101 Info<<
"[ jacobian] d2fdxdy[" << i <<
"] = ( ";
105 for (
label i = 0; i < nEqns(); ++ i)
109 Info<<
"[ ratio] d2fdxdy[" << i <<
"] = ( ";
static const Foam::dimensionedScalar A("A", Foam::dimPressure, 611.21)
#define forAll(list, i)
Loop across all elements in list.
ODESystem()
Construct null.
virtual ~ODESystem()
Destructor.
void check(const scalar x, const scalarField &y, const scalarField &dy, const label li) const
Print correspondence between derivatives and Jacobian methods.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
tmp< DimensionedField< scalar, GeoMesh > > stabilise(const DimensionedField< scalar, GeoMesh > &dsf, const dimensioned< scalar > &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedScalar y0(const dimensionedScalar &ds)
dimensionedScalar y1(const dimensionedScalar &ds)