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>" 75 "faMatrix<Type>::solve",
82 addBoundarySource(source);
86 psi_.boundaryField().scalarInterfaces();
92 scalarField psiCmpt(psi_.primitiveField().component(cmpt));
93 addBoundaryDiag(
diag(), cmpt);
99 boundaryCoeffs_.component(cmpt)
104 internalCoeffs_.component(cmpt)
114 const label startRequest = UPstream::nRequests();
126 updateMatrixInterfaces
149 )->
solve(psiCmpt, sourceCmpt, cmpt);
156 solverPerfVec.replace(cmpt, solverPerf);
157 solverPerfVec.solverName() = solverPerf.
solverName();
159 psi.primitiveFieldRef().replace(cmpt, psiCmpt);
163 psi.correctBoundaryConditions();
165 psi.mesh().data().setSolverPerformance(
psi.name(), solverPerfVec);
167 return solverPerfVec;
174 return solve(faMat_.solverDict());
196 auto& res = tres().ref();
210 boundaryCoeffs_.component(cmpt)
219 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.
Generic GeometricField class.
::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)