30 template<
class Type,
class DType,
class LUType>
33 const word& fieldName,
49 template<
class Type,
class DType,
class LUType>
53 word preconditionerName(this->controlDict_.lookup(
"preconditioner"));
58 preconditionerName + typeName,
66 Type* __restrict__ psiPtr = psi.
begin();
69 Type* __restrict__ pAPtr = pA.
begin();
72 Type* __restrict__ pTPtr = pT.
begin();
75 Type* __restrict__ wAPtr = wA.
begin();
78 Type* __restrict__ wTPtr = wT.
begin();
84 this->matrix_.Amul(wA, psi);
85 this->matrix_.Tmul(wT, psi);
90 Type* __restrict__ rAPtr = rA.
begin();
91 Type* __restrict__ rTPtr = rT.begin();
94 Type normFactor = this->normFactor(psi, wA, pA);
98 Info<<
" Normalisation factor = " << normFactor <<
endl;
103 solverPerf.finalResidual() = solverPerf.initialResidual();
106 if (!solverPerf.checkConvergence(this->tolerance_, this->relTol_))
123 preconPtr->precondition(wA, rA);
124 preconPtr->preconditionT(wT, rT);
148 pTPtr[cell] = wTPtr[cell] +
cmptMultiply(beta, pTPtr[cell]);
154 this->matrix_.Amul(wA, pA);
155 this->matrix_.Tmul(wT, pT);
162 solverPerf.checkSingularity
187 solverPerf.finalResidual() =
192 nIter++ < this->maxIter_
193 && !(solverPerf.checkConvergence(this->tolerance_, this->relTol_))
197 solverPerf.nIterations() =
PBiCICG(const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict)
Construct from matrix components and solver data dictionary.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
A list of keyword definitions, which are a keyword followed by any number of values (e...
void size(const label)
Override size to be inconsistent with allocated storage.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Ostream & endl(Ostream &os)
Add newline and flush stream.
Traits class for primitives.
Type gSumCmptMag(const UList< Type > &f, const label comm)
virtual SolverPerformance< Type > solve(Field< Type > &psi) const
Solve the matrix with this solver.
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
Type gSumCmptProd(const UList< Type > &f1, const UList< Type > &f2, const label comm)
Pre-declare SubField and related Field type.
A class for handling words, derived from string.
iterator begin()
Return an iterator to begin traversing the UList.
dimensionSet cmptMag(const dimensionSet &)
const volScalarField & psi
Abstract base-class for LduMatrix solvers.
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
tmp< DimensionedField< scalar, GeoMesh > > stabilise(const DimensionedField< scalar, GeoMesh > &dsf, const dimensioned< scalar > &ds)
A cell is defined as a list of faces with extra functionality.
LduMatrix is a general matrix class in which the coefficients are stored as three arrays...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A class representing the concept of 1 (scalar(1)) used to avoid unnecessary manipulations for objects...