40 lduMatrix::smoother::addsymMatrixConstructorToTable<DICSmoother>
49 const word& fieldName,
64 rD_(matrix_.
diag().size())
83 const solveScalar*
const __restrict__ rDPtr = rD_.begin();
84 const scalar*
const __restrict__ upperPtr = matrix_.upper().begin();
85 const label*
const __restrict__ uPtr =
86 matrix_.lduAddr().upperAddr().begin();
87 const label*
const __restrict__ lPtr =
88 matrix_.lduAddr().lowerAddr().begin();
92 solveScalar* __restrict__ rAPtr = rA.
begin();
111 const label nFaces = matrix_.upper().size();
112 for (label facei=0; facei<nFaces; facei++)
114 const label u = uPtr[facei];
115 rAPtr[u] -= rDPtr[u]*upperPtr[facei]*rAPtr[lPtr[facei]];
118 const label nFacesM1 = nFaces - 1;
119 for (label facei=nFacesM1; facei>=0; facei--)
121 const label l = lPtr[facei];
122 rAPtr[l] -= rDPtr[l]*upperPtr[facei]*rAPtr[uPtr[facei]];
141 ConstPrecisionAdaptor<scalar, solveScalar>(source),
const scalarField & diag() const
static void calcReciprocalD(solveScalarField &, const lduMatrix &)
Calculate the reciprocal of the preconditioned diagonal.
Field< solveScalar > solveScalarField
lduMatrix::smoother::addsymMatrixConstructorToTable< DICSmoother > addDICSmootherSymMatrixConstructorToTable_
Simplified diagonal-based incomplete Cholesky smoother for symmetric matrices.
A field of fields is a PtrList of fields with reference counting.
void smooth(volScalarField &field, const scalar coeff)
#define forAll(list, i)
Loop across all elements in list.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
const lduMatrix & matrix_
void sweep(volScalarField &field, const volScalarField &alpha, const label nLayers, const scalar alphaDiff=0.2)
A class for handling words, derived from Foam::string.
iterator begin() noexcept
Return an iterator to begin traversing the UList.
defineTypeNameAndDebug(combustionModel, 0)
DICSmoother(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces)
Construct from matrix components.
lduMatrix is a general matrix class in which the coefficients are stored as three arrays...
void smooth(solveScalarField &psi, const scalarField &source, const direction cmpt, const label nSweeps) const
Smooth the solution for a given number of sweeps.
const volScalarField & psi
void scalarSmooth(solveScalarField &psi, const solveScalarField &source, const direction cmpt, const label nSweeps) const
Smooth the solution for a given number of sweeps.