38 lduMatrix::solver::addasymMatrixConstructorToTable<PBiCG>
47 const word& fieldName,
86 const label nCells =
psi.
size();
88 solveScalar* __restrict__ psiPtr =
psi.
begin();
91 solveScalar* __restrict__ pAPtr = pA.
begin();
94 solveScalar* __restrict__ wAPtr = wA.
begin();
97 matrix_.Amul(wA,
psi, interfaceBouCoeffs_, interfaces_, cmpt);
102 solveScalar* __restrict__ rAPtr = rA.
begin();
104 matrix().setResidualField
112 const solveScalar normFactor = this->normFactor(
psi, tsource(), wA, pA);
114 if ((log_ >= 2) || (lduMatrix::debug >= 2))
116 Info<<
" Normalisation factor = " << normFactor <<
endl;
133 solveScalar* __restrict__ pTPtr = pT.
begin();
136 solveScalar* __restrict__ wTPtr = wT.
begin();
139 matrix_.Tmul(wT,
psi, interfaceIntCoeffs_, interfaces_, cmpt);
143 solveScalar* __restrict__ rTPtr = rT.
begin();
146 solveScalar wArT = 0;
160 const solveScalar wArTold = wArT;
163 preconPtr->precondition(wA, rA, cmpt);
164 preconPtr->preconditionT(wT, rT, cmpt);
179 const solveScalar
beta = wArT/wArTold;
190 matrix_.Amul(wA, pA, interfaceBouCoeffs_, interfaces_, cmpt);
191 matrix_.Tmul(wT, pT, interfaceIntCoeffs_, interfaces_, cmpt);
193 const solveScalar wApT =
gSumProd(wA, pT, matrix().
mesh().comm());
204 const solveScalar
alpha = wArT/wApT;
230 <<
"PBiCG has failed to converge within the maximum number"
231 " of iterations " <<
max(defaultMaxIter_, maxIter_) <<
nl
232 <<
" Please try the more robust PBiCGStab solver."
236 matrix().setResidualField
A const Field/List wrapper with possible data conversion.
A field of fields is a PtrList of fields with reference counting.
const word & getName() const
Get name.
Preconditioned bi-conjugate gradient solver for asymmetric lduMatrices using a run-time selectable pr...
A non-const Field/List wrapper with possible data conversion.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
iterator begin() noexcept
Return an iterator to begin traversing the UList.
void size(const label n)
Older name for setAddressableSize.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A cell is defined as a list of faces with extra functionality.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
Base class for solution control classes.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const volScalarField & psi
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
scalarProduct< Type, Type >::type gSumProd(const UList< Type > &f1, const UList< Type > &f2, const label comm)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
typeOfMag< Type >::type gSumMag(const FieldField< Field, Type > &f)
lduMatrix::solver::addasymMatrixConstructorToTable< PBiCG > addPBiCGAsymMatrixConstructorToTable_
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
dimensionedScalar beta("beta", dimless/dimTemperature, laminarTransport)