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 = Pstream::nRequests();
126 updateMatrixInterfaces
141 solverPerf = lduMatrix::solver::New
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().setSolverPerformance(
psi.name(), solverPerfVec);
167 return solverPerfVec;
174 return solve(faMat_.psi().mesh().solverDict(faMat_.psi().name()));
194 for (
direction cmpt = 0; cmpt < Type::nComponents; ++cmpt)
203 boundaryCoeffs_.component(cmpt)
212 res.
component(cmpt) - boundaryDiagCmpt*psiCmpt,
A const Field/List wrapper with possible data conversion.
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 replace(const direction, const UList< cmptType > &)
Replace a component field of the field.
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
lduInterfaceFieldPtrsList scalarInterfaces() const
Generic GeometricField class.
void replace(const direction d, const GeometricField< cmptType, PatchField, GeoMesh > &gcf)
Replace specified field component with content from another field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const Internal & internalField() const
Return a const-reference to the dimensioned internal field.
A non-const Field/List wrapper with possible data conversion.
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
SolverPerformance< Type > solve()
Solve returning the solution statistics.
SolverPerformance< Type > solve()
Solve returning the solution statistics.
const GeometricField< Type, faPatchField, areaMesh > & psi() const
void addBoundarySource(Field< Type > &source, const bool couples=true) const
void setComponentReference(const label patchi, const label facei, const direction cmpt, const scalar value)
tmp< Field< Type > > residual() const
Return the matrix residual.
void addBoundaryDiag(scalarField &diag, const direction cmpt) const
const lduMesh & mesh() const
Return the LDU mesh from which the addressing is obtained.
static constexpr direction nComponents
Number of components in bool is 1.
A traits class, which is primarily used for primitives.
A class for managing temporary objects.
const volScalarField & psi
#define DebugInFunction
Report an information message using Foam::Info.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)