40 if (lowerPtr_ || upperPtr_)
42 Type* __restrict__ HpsiPtr = tHpsi.ref().begin();
44 const Type* __restrict__ psiPtr =
psi.begin();
49 const scalar* __restrict__ lowerPtr =
lower().
begin();
50 const scalar* __restrict__ upperPtr =
upper().
begin();
56 HpsiPtr[uPtr[
face]] -= lowerPtr[
face]*psiPtr[lPtr[
face]];
57 HpsiPtr[lPtr[
face]] -= upperPtr[
face]*psiPtr[uPtr[
face]];
78 if (lowerPtr_ || upperPtr_)
87 auto& faceHpsi = tfaceHpsi.ref();
100 <<
"Cannot calculate faceH"
101 " the matrix does not have any off-diagonal coefficients."
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
iterator begin() noexcept
Return an iterator to begin traversing the UList.
void size(const label n)
Older name for setAddressableSize.
A face is a list of labels corresponding to mesh vertices.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
lduMatrix(const lduMesh &mesh)
Construct (without coefficients) for an LDU addressed mesh.
tmp< Field< Type > > faceH(const Field< Type > &) const
const lduAddressing & lduAddr() const
Return the LDU addressing.
const scalarField & upper() const
tmp< Field< Type > > H(const Field< Type > &) const
const scalarField & lower() const
A class for managing temporary objects.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
const volScalarField & psi
volScalarField H(IOobject("H", runTime.timeName(), mesh.thisDb(), IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar(dimLength, Zero))
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
UList< label > labelUList
A UList of labels.