Go to the documentation of this file.
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>"
68 "faMatrix<Type>::solve",
75 addBoundarySource(source);
79 psi_.boundaryField().scalarInterfaces();
81 for (
direction cmpt = 0; cmpt < Type::nComponents; ++cmpt)
85 scalarField psiCmpt(psi_.primitiveField().component(cmpt));
86 addBoundaryDiag(
diag(), cmpt);
92 boundaryCoeffs_.component(cmpt)
97 internalCoeffs_.component(cmpt)
107 const label startRequest = Pstream::nRequests();
119 updateMatrixInterfaces
142 )->
solve(psiCmpt, sourceCmpt, cmpt);
149 solverPerfVec.replace(cmpt, solverPerf);
150 solverPerfVec.solverName() = solverPerf.
solverName();
152 psi.primitiveFieldRef().replace(cmpt, psiCmpt);
156 psi.correctBoundaryConditions();
158 psi.mesh().setSolverPerformance(
psi.name(), solverPerfVec);
160 return solverPerfVec;
167 return solve(faMat_.psi().mesh().solverDict(faMat_.psi().name()));
187 for (
direction cmpt = 0; cmpt < Type::nComponents; ++cmpt)
189 scalarField psiCmpt(psi_.internalField().component(cmpt));
196 boundaryCoeffs_.component(cmpt)
205 res.
component(cmpt) - boundaryDiagCmpt*psiCmpt,
207 psi_.boundaryField().scalarInterfaces(),
A field of fields is a PtrList of fields with reference counting.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
Ostream & endl(Ostream &os)
Add newline and flush stream.
void setComponentReference(const label patchi, const label facei, const direction cmpt, const scalar value)
void addBoundaryDiag(scalarField &diag, const direction cmpt) const
messageStream Info
Information stream (uses stdout - output is on the master only)
#define DebugInFunction
Report an information message using Foam::Info.
word name(const complex &c)
Return string representation of complex.
SolverPerformance< Type > solve()
Solve returning the solution statistics.
void replace(const direction, const UList< cmptType > &)
Replace a component field of the field.
void addBoundarySource(Field< Type > &source, const bool couples=true) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
A non-const Field/List wrapper with possible data conversion.
const GeometricField< Type, faPatchField, areaMesh > & psi() const
Traits class for primitives.
A const Field/List wrapper with possible data conversion.
tmp< Field< Type > > residual() const
Return the matrix residual.
Container< Type > & ref() const
SolverPerformance< Type > solve()
Solve returning the solution statistics.
Generic GeometricField class.
const volScalarField & psi
void residual(solveScalarField &rA, const solveScalarField &psi, const scalarField &source, const FieldField< Field, scalar > &interfaceBouCoeffs, const lduInterfaceFieldPtrsList &interfaces, const direction cmpt) const