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>"
65 "faMatrix<Type>::solve",
72 addBoundarySource(source);
76 psi_.boundaryField().scalarInterfaces();
82 for (
direction cmpt = 0; cmpt < Type::nComponents; ++cmpt)
86 scalarField psiCmpt(psi_.primitiveField().component(cmpt));
87 addBoundaryDiag(
diag(), cmpt);
93 boundaryCoeffs_.component(cmpt)
98 internalCoeffs_.component(cmpt)
108 const label startRequest = Pstream::nRequests();
120 updateMatrixInterfaces
143 )->
solve(psiCmpt, sourceCmpt, cmpt);
150 solverPerfVec.replace(cmpt, solverPerf);
151 solverPerfVec.solverName() = solverPerf.
solverName();
153 psi.primitiveFieldRef().replace(cmpt, psiCmpt);
157 psi.correctBoundaryConditions();
159 psi.mesh().setSolverPerformance(
psi.name(), solverPerfVec);
161 return solverPerfVec;
168 return solve(faMat_.psi().mesh().solverDict(faMat_.psi().name()));
185 addBoundarySource(res);
188 psi_.boundaryField().scalarInterfaces();
191 for (
direction cmpt = 0; cmpt < Type::nComponents; ++cmpt)
193 scalarField psiCmpt(psi_.internalField().component(cmpt));
196 addBoundaryDiag(boundaryDiagCmpt, cmpt);
200 boundaryCoeffs_.component(cmpt)
209 res.
component(cmpt) - boundaryDiagCmpt*psiCmpt,
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)
Set reference level for a component of the solution.
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.
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 Field wrapper with possible data conversion.
FieldType & ref()
Allow modification without const-ref check.
const GeometricField< Type, faPatchField, areaMesh > & psi() const
Traits class for primitives.
A const Field wrapper with possible data conversion.
tmp< Field< Type > > residual() const
Return the matrix residual.
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