Go to the documentation of this file.
32 template<
class Type,
class DType,
class LUType>
35 const word& fieldName,
51 template<
class Type,
class DType,
class LUType>
55 const word preconditionerName(this->controlDict_.getWord(
"preconditioner"));
60 preconditionerName + typeName,
66 label nCells =
psi.size();
68 Type* __restrict__ psiPtr =
psi.begin();
71 Type* __restrict__ pAPtr = pA.begin();
74 Type* __restrict__ wAPtr = wA.begin();
80 this->matrix_.Amul(wA,
psi);
84 Type* __restrict__ rAPtr = rA.begin();
87 Type normFactor = this->normFactor(
psi, wA, pA);
91 Info<<
" Normalisation factor = " << normFactor <<
endl;
96 solverPerf.finalResidual() = solverPerf.initialResidual();
102 || !solverPerf.checkConvergence(this->tolerance_, this->relTol_)
120 preconPtr->precondition(wA, rA);
148 this->matrix_.Amul(wA, pA);
156 solverPerf.checkSingularity
180 solverPerf.finalResidual() =
186 nIter++ < this->maxIter_
187 && !solverPerf.checkConvergence(this->tolerance_, this->relTol_)
189 || nIter < this->minIter_
193 solverPerf.nIterations() =
A class for handling words, derived from Foam::string.
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
LduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
Ostream & endl(Ostream &os)
Add newline and flush stream.
Abstract base-class for LduMatrix solvers.
Type gSumCmptMag(const UList< Type > &f, const label comm)
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
Generic templated field type.
tmp< DimensionedField< scalar, GeoMesh > > stabilise(const DimensionedField< scalar, GeoMesh > &dsf, const dimensioned< scalar > &ds)
messageStream Info
Information stream (uses stdout - output is on the master only)
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual SolverPerformance< Type > solve(Field< Type > &psi) const
Solve the matrix with this solver.
Preconditioned conjugate gradient solver for symmetric lduMatrices using a run-time selectable precon...
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Traits class for primitives.
const volScalarField & psi
A cell is defined as a list of faces with extra functionality.
Type gSumCmptProd(const UList< Type > &f1, const UList< Type > &f2, const label comm)