38 lduMatrix::smoother::addsymMatrixConstructorToTable<GaussSeidelSmoother>
41 lduMatrix::smoother::addasymMatrixConstructorToTable<GaussSeidelSmoother>
50 const word& fieldName,
72 const word& fieldName_,
82 solveScalar* __restrict__ psiPtr =
psi.
begin();
84 const label nCells =
psi.
size();
87 solveScalar* __restrict__ bPrimePtr = bPrime.
begin();
89 const scalar*
const __restrict__ diagPtr = matrix_.
diag().
begin();
90 const scalar*
const __restrict__ upperPtr =
92 const scalar*
const __restrict__ lowerPtr =
95 const label*
const __restrict__ uPtr =
98 const label*
const __restrict__ ownStartPtr =
114 for (label sweep=0; sweep<nSweeps; sweep++)
143 label fEnd = ownStartPtr[0];
145 for (label celli=0; celli<nCells; celli++)
149 fEnd = ownStartPtr[celli + 1];
152 psii = bPrimePtr[celli];
155 for (label facei=fStart; facei<fEnd; facei++)
157 psii -= upperPtr[facei]*psiPtr[uPtr[facei]];
161 psii /= diagPtr[celli];
164 for (label facei=fStart; facei<fEnd; facei++)
166 bPrimePtr[uPtr[facei]] -= lowerPtr[facei]*psii;
169 psiPtr[celli] = psii;
A const Field/List wrapper with possible data conversion.
A field of fields is a PtrList of fields with reference counting.
A lduMatrix::smoother for Gauss-Seidel.
static void smooth(const word &fieldName, solveScalarField &psi, const lduMatrix &matrix, const solveScalarField &source, const FieldField< Field, scalar > &interfaceBouCoeffs, const lduInterfaceFieldPtrsList &interfaces, const direction cmpt, const label nSweeps)
Smooth for the given number of sweeps.
virtual void scalarSmooth(solveScalarField &psi, const solveScalarField &Source, const direction cmpt, const label nSweeps) const
Smooth the solution for a given number of sweeps.
iterator begin() noexcept
Return an iterator to begin traversing the UList.
void size(const label n)
Older name for setAddressableSize.
static label nRequests()
Get number of outstanding requests.
const labelUList & ownerStartAddr() const
Return owner start addressing.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
const lduAddressing & lduAddr() const
Return the LDU addressing.
void initMatrixInterfaces(const bool add, const FieldField< Field, scalar > &interfaceCoeffs, const lduInterfaceFieldPtrsList &interfaces, const solveScalarField &psiif, solveScalarField &result, const direction cmpt) const
void updateMatrixInterfaces(const bool add, const FieldField< Field, scalar > &interfaceCoeffs, const lduInterfaceFieldPtrsList &interfaces, const solveScalarField &psiif, solveScalarField &result, const direction cmpt, const label startRequest) const
Update interfaced interfaces for matrix operations.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const volScalarField & psi
lduMatrix::smoother::addasymMatrixConstructorToTable< GaussSeidelSmoother > addGaussSeidelSmootherAsymMatrixConstructorToTable_
lduMatrix::smoother::addsymMatrixConstructorToTable< GaussSeidelSmoother > addGaussSeidelSmootherSymMatrixConstructorToTable_