45 internalCoeffs_[patchi][facei].component(cmpt) +=
46 diag()[psi_.mesh().boundary()[patchi].faceCells()[facei]];
48 boundaryCoeffs_[patchi][facei].component(cmpt) +=
49 diag()[psi_.mesh().boundary()[patchi].faceCells()[facei]]*value;
60 <<
"solving faMatrix<Type>" 70 auto&
psi = psi_.constCast();
74 "faMatrix<Type>::solve",
81 addBoundarySource(source);
85 psi_.boundaryField().scalarInterfaces();
91 scalarField psiCmpt(psi_.primitiveField().component(cmpt));
92 addBoundaryDiag(
diag(), cmpt);
98 boundaryCoeffs_.component(cmpt)
103 internalCoeffs_.component(cmpt)
113 const label startRequest = UPstream::nRequests();
125 updateMatrixInterfaces
148 )->
solve(psiCmpt, sourceCmpt, cmpt);
155 solverPerfVec.replace(cmpt, solverPerf);
156 solverPerfVec.solverName() = solverPerf.
solverName();
158 psi.primitiveFieldRef().replace(cmpt, psiCmpt);
162 psi.correctBoundaryConditions();
164 psi.mesh().data().setSolverPerformance(
psi.name(), solverPerfVec);
166 return solverPerfVec;
173 return solve(faMat_.solverDict());
195 auto& res = tres().ref();
209 boundaryCoeffs_.component(cmpt)
218 res.component(cmpt) - boundaryDiagCmpt*psiCmpt,
void size(const label n)
Older name for setAddressableSize.
const dictionary & solverDict() const
Return the solver dictionary for psi.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
void residual(solveScalarField &rA, const solveScalarField &psi, const scalarField &source, const FieldField< Field, scalar > &interfaceBouCoeffs, const lduInterfaceFieldPtrsList &interfaces, const direction cmpt) const
SolverPerformance< Type > solve()
Solve returning the solution statistics.
const Internal & internalField() const noexcept
Return a const-reference to the dimensioned internal field.
void setComponentReference(const label patchi, const label facei, const direction cmpt, const scalar value)
Set reference level for a component of the solution on a given patch face.
lduInterfaceFieldPtrsList scalarInterfaces() const
Return a list of pointers for each patch field with only those pointing to interfaces being set...
void addBoundaryDiag(scalarField &diag, const direction cmpt) const
Ostream & endl(Ostream &os)
Add newline and flush stream.
A traits class, which is primarily used for primitives and vector-space.
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.
::Foam::direction nComponents(const expressions::valueTypeCode) noexcept
The number of components associated with given valueTypeCode.
A non-const Field/List wrapper with possible data conversion.
void addBoundarySource(Field< Type > &source, const bool couples=true) const
tmp< DimensionedField< cmptType, GeoMesh > > component(const direction d) const
Return a component field of the field.
A field of fields is a PtrList of fields with reference counting.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
SolverPerformance< Type > solve()
Solve returning the solution statistics.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
#define DebugInFunction
Report an information message using Foam::Info.
A const Field/List wrapper with possible data conversion.
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
Container< Type > & ref() const
Return non-const reference to the contents of a non-null managed pointer.
void replace(const direction, const FieldField< Field, cmptType > &)
Replace a component field of the field.
tmp< Field< Type > > residual() const
Return the matrix residual.
messageStream Info
Information stream (stdout output on master, null elsewhere)
const volScalarField & psi
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
A class for managing temporary objects.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
static constexpr const zero Zero
Global zero (0)