35 addsymMatrixConstructorToTable<nonBlockingGaussSeidelSmoother>
39 addasymMatrixConstructorToTable<nonBlockingGaussSeidelSmoother>
48 const word& fieldName,
78 blockStart_ =
min(blockStart_,
min(faceCells));
84 Pout<<
"nonBlockingGaussSeidelSmoother :" 85 <<
" Starting block on cell " << blockStart_
86 <<
" out of " << nCells <<
endl;
95 const word& fieldName_,
98 const label blockStart,
106 scalar* __restrict__ psiPtr = psi.
begin();
111 scalar* __restrict__ bPrimePtr = bPrime.
begin();
113 const scalar*
const __restrict__ diagPtr = matrix_.
diag().
begin();
114 const scalar*
const __restrict__ upperPtr =
116 const scalar*
const __restrict__ lowerPtr =
119 const label*
const __restrict__ uPtr =
122 const label*
const __restrict__ ownStartPtr =
165 label fEnd = ownStartPtr[0];
167 for (
label celli=0; celli<blockStart; celli++)
171 fEnd = ownStartPtr[celli + 1];
174 curPsi = bPrimePtr[celli];
177 for (
label curFace=fStart; curFace<fEnd; curFace++)
179 curPsi -= upperPtr[curFace]*psiPtr[uPtr[curFace]];
183 curPsi /= diagPtr[celli];
186 for (
label curFace=fStart; curFace<fEnd; curFace++)
188 bPrimePtr[uPtr[curFace]] -= lowerPtr[curFace]*curPsi;
191 psiPtr[celli] = curPsi;
204 for (
label celli=blockStart; celli < nCells; celli++)
208 fEnd = ownStartPtr[celli + 1];
211 curPsi = bPrimePtr[celli];
214 for (
label curFace=fStart; curFace<fEnd; curFace++)
216 curPsi -= upperPtr[curFace]*psiPtr[uPtr[curFace]];
220 curPsi /= diagPtr[celli];
223 for (
label curFace=fStart; curFace<fEnd; curFace++)
225 bPrimePtr[uPtr[curFace]] -= lowerPtr[curFace]*curPsi;
228 psiPtr[celli] = curPsi;
nonBlockingGaussSeidelSmoother(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces)
Construct from components.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
lduMatrix::smoother::addsymMatrixConstructorToTable< nonBlockingGaussSeidelSmoother > addnonBlockingGaussSeidelSmootherSymMatrixConstructorToTable_
void size(const label)
Override size to be inconsistent with allocated storage.
void initMatrixInterfaces(const FieldField< Field, scalar > &interfaceCoeffs, const lduInterfaceFieldPtrsList &interfaces, const scalarField &psiif, scalarField &result, const direction cmpt) const
Initialise the update of interfaced interfaces.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void smooth(volScalarField &field, const scalar coeff)
void sweep(volScalarField &field, const volScalarField &alpha, const label nLayers, const scalar alphaDiff=0.2)
Abstract base-class for lduMatrix smoothers.
void negate()
Negate this field.
A class for handling words, derived from string.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
iterator begin()
Return an iterator to begin traversing the UList.
virtual const labelUList & patchAddr(const label patchNo) const =0
Return patch to internal addressing given patch number.
void updateMatrixInterfaces(const FieldField< Field, scalar > &interfaceCoeffs, const lduInterfaceFieldPtrsList &interfaces, const scalarField &psiif, scalarField &result, const direction cmpt) const
Update interfaced interfaces for matrix operations.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool set(const label) const
Is element set.
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
lduMatrix::smoother::addasymMatrixConstructorToTable< nonBlockingGaussSeidelSmoother > addnonBlockingGaussSeidelSmootherAsymMatrixConstructorToTable_
label size() const
Return the number of elements in the UPtrList.
lduMatrix is a general matrix class in which the coefficients are stored as three arrays...
fvModels source(alpha1, mixture.thermo1().rho())
const lduAddressing & lduAddr() const
Return the LDU addressing.
prefixOSstream Pout(cout, "Pout")
static void smooth(const word &fieldName, scalarField &psi, const lduMatrix &matrix, const label blockStart, const scalarField &source, const FieldField< Field, scalar > &interfaceBouCoeffs, const lduInterfaceFieldPtrsList &interfaces, const direction cmpt, const label nSweeps)
Smooth for the given number of sweeps.
const labelUList & ownerStartAddr() const
Return owner start addressing.