32 void Foam::SIBS::SIMPR
44 scalar
h = deltaX/nSteps;
47 for (label i=0; i<
n_; i++)
49 for (label j=0; j<
n_; j++)
51 a(i, j) = -
h*dfdy(i, j);
59 for (label i=0; i<
n_; i++)
61 yEnd[i] =
h*(dydx[i] +
h*dfdx[i]);
69 for (label i=0; i<
n_; i++)
71 ytemp[i] =
y[i] + del[i];
74 scalar
x = xStart +
h;
78 for (label nn=2; nn<=nSteps; nn++)
80 for (label i=0; i<
n_; i++)
82 yEnd[i] =
h*yEnd[i] - del[i];
87 for (label i=0; i<
n_; i++)
89 ytemp[i] += (del[i] += 2.0*yEnd[i]);
96 for (label i=0; i<
n_; i++)
98 yEnd[i] =
h*yEnd[i] - del[i];
103 for (label i=0; i<
n_; i++)
void LUDecompose(scalarSquareMatrix &matrix, labelList &pivotIndices)
LU decompose the matrix with pivoting.
const ODESystem & odes_
Reference to ODESystem.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const dimensionedScalar h
Planck constant.
List< label > labelList
A List of labels.
label n_
Size of the ODESystem (adjustable)
SquareMatrix< scalar > scalarSquareMatrix
virtual void derivatives(const scalar x, const scalarField &y, scalarField &dydx) const =0
Calculate the derivatives in dydx.
void LUBacksubstitute(const scalarSquareMatrix &luMmatrix, const labelList &pivotIndices, List< Type > &source)
LU back-substitution with given source, returning the solution in the source.