34 lduMatrix::solver::addsymMatrixConstructorToTable<PBiCGStab>
37 lduMatrix::solver::addasymMatrixConstructorToTable<PBiCGStab>
46 const word& fieldName,
84 scalar* __restrict__ psiPtr =
psi.
begin();
87 scalar* __restrict__ pAPtr = pA.
begin();
90 scalar* __restrict__ yAPtr = yA.
begin();
93 matrix_.Amul(yA,
psi, interfaceBouCoeffs_, interfaces_, cmpt);
97 scalar* __restrict__ rAPtr = rA.
begin();
100 const scalar normFactor = this->normFactor(
psi, source, yA, pA);
102 if (lduMatrix::debug >= 2)
104 Info<<
" Normalisation factor = " << normFactor <<
endl;
109 gSumMag(rA, matrix().mesh().comm())
121 scalar* __restrict__ AyAPtr = AyA.
begin();
124 scalar* __restrict__ sAPtr = sA.
begin();
127 scalar* __restrict__ zAPtr = zA.
begin();
130 scalar* __restrict__ tAPtr = tA.
begin();
152 const scalar rA0rAold = rA0rA;
154 rA0rA =
gSumProd(rA0, rA, matrix().mesh().comm());
178 const scalar beta = (rA0rA/rA0rAold)*(
alpha/
omega);
188 preconPtr->precondition(yA, pA, cmpt);
191 matrix_.Amul(AyA, yA, interfaceBouCoeffs_, interfaces_, cmpt);
193 const scalar rA0AyA =
gSumProd(rA0, AyA, matrix().mesh().comm());
195 alpha = rA0rA/rA0AyA;
205 gSumMag(sA, matrix().mesh().comm())/normFactor;
222 preconPtr->precondition(zA, sA, cmpt);
225 matrix_.Amul(tA, zA, interfaceBouCoeffs_, interfaces_, cmpt);
227 const scalar tAtA =
gSumSqr(tA, matrix().mesh().comm());
241 gSumMag(rA, matrix().mesh().comm())
void size(const label)
Override size to be inconsistent with allocated storage.
Preconditioned bi-conjugate gradient stabilised solver for asymmetric lduMatrices using a run-time se...
PBiCGStab(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
Construct from matrix components and solver data stream.
virtual solverPerformance solve(scalarField &psi, const scalarField &source, const direction cmpt=0) const
Solve the matrix with this solver.
iterator begin()
Return an iterator to begin traversing the UList.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A cell is defined as a list of faces with extra functionality.
A list of keyword definitions, which are a keyword followed by any number of values (e....
static autoPtr< preconditioner > New(const solver &sol, const dictionary &solverControls)
Return a new preconditioner.
static word getName(const dictionary &)
Find the preconditioner name (directly or from a sub-dictionary)
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
Convenience class to handle the input of constant rotational speed. Reads an omega entry with default...
Abstract base class for run-time selectable region solvers.
A class for handling words, derived from string.
const volScalarField & psi
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
scalar gSumMag(const FieldField< Field, Type > &f)
scalar gSumSqr(const UList< Type > &f, const label comm)
Ostream & endl(Ostream &os)
Add newline and flush stream.
scalar gSumProd(const UList< Type > &f1, const UList< Type > &f2, const label comm)
dimensioned< scalar > mag(const dimensioned< Type > &)
defineTypeNameAndDebug(combustionModel, 0)
lduMatrix::solver::addasymMatrixConstructorToTable< PBiCGStab > addPBiCGStabAsymMatrixConstructorToTable_
lduMatrix::solver::addsymMatrixConstructorToTable< PBiCGStab > addPBiCGStabSymMatrixConstructorToTable_