49 boundaryCoeffs_[patchI][edgeI] = value;
60 <<
"solving faMatrix<scalar>"
67 solverPerformance::debug
70 auto&
psi = psi_.constCast();
73 addBoundaryDiag(
diag(), 0);
76 addBoundarySource(totalSource, 0);
85 psi_.boundaryField().scalarInterfaces(),
87 )->solve(
psi.primitiveFieldRef(), totalSource);
96 psi.correctBoundaryConditions();
98 psi.mesh().data().setSolverPerformance(
psi.name(), solverPerf);
108 addBoundaryDiag(boundaryDiag, 0);
119 source_ - boundaryDiag*psif,
121 psi_.boundaryField().scalarInterfaces(),
138 "H(" + psi_.name() +
')',
143 auto& Hphi = tHphi.ref();
145 Hphi.primitiveFieldRef() = (
lduMatrix::H(psi_.primitiveField()) + source_);
146 addBoundarySource(Hphi.primitiveFieldRef());
148 Hphi.primitiveFieldRef() /= psi_.mesh().S();
149 Hphi.correctBoundaryConditions();
labelList faceLabels(nFaceLabels)
A const Field/List wrapper with possible data conversion.
static tmp< GeometricField< scalar, faPatchField, areaMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=faPatchField< scalar >::calculatedType())
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
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
SolverPerformance< Type > solve()
Solve returning the solution statistics.
const GeometricField< scalar, faPatchField, areaMesh > & psi() const
tmp< GeometricField< Type, faPatchField, areaMesh > > H() const
Return the H operation source.
void addBoundarySource(Field< scalar > &source, const bool couples=true) const
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.
tmp< Field< Type > > residual() const
Return the matrix residual.
void addBoundaryDiag(scalarField &diag, const direction cmpt) const
static const word & extrapolatedCalculatedType() noexcept
The type name for extrapolatedCalculated patch fields combines zero-gradient and calculated.
static autoPtr< solver > New(const word &solverName, const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
Return a new solver of given type.
void residual(solveScalarField &rA, const solveScalarField &psi, const scalarField &source, const FieldField< Field, scalar > &interfaceBouCoeffs, const lduInterfaceFieldPtrsList &interfaces, const direction cmpt) const
const scalarField & diag() const
tmp< Field< Type > > H(const Field< Type > &) const
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
A class for managing temporary objects.
const volScalarField & psi
#define DebugInFunction
Report an information message using Foam::Info.
const dimensionSet dimArea(sqr(dimLength))
messageStream Info
Information stream (stdout output on master, null elsewhere).
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Field< solveScalar > solveScalarField
static constexpr const zero Zero
Global zero (0).
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
UList< label > labelUList
A UList of labels.
SolverPerformance< scalar > solverPerformance
SolverPerformance instantiated for a scalar.