35 lduMatrix::smoother::addsymMatrixConstructorToTable<DICSmoother>
44 const word& fieldName,
75 const scalar*
const __restrict__ rDPtr = rD_.begin();
76 const scalar*
const __restrict__ upperPtr = matrix_.upper().begin();
77 const label*
const __restrict__ uPtr =
78 matrix_.lduAddr().upperAddr().begin();
79 const label*
const __restrict__ lPtr =
80 matrix_.lduAddr().lowerAddr().begin();
84 scalar* __restrict__ rAPtr = rA.
begin();
101 for (
label facei=0; facei<nFaces; facei++)
103 label u = uPtr[facei];
104 rAPtr[u] -= rDPtr[u]*upperPtr[facei]*rAPtr[lPtr[facei]];
107 label nFacesM1 = nFaces - 1;
108 for (
label facei=nFacesM1; facei>=0; facei--)
110 label l = lPtr[facei];
111 rAPtr[l] -= rDPtr[l]*upperPtr[facei]*rAPtr[uPtr[facei]];
static void calcReciprocalD(scalarField &rD, const lduMatrix &matrix)
Calculate the reciprocal of the preconditioned diagonal.
Simplified diagonal-based incomplete Cholesky smoother for symmetric matrices.
void smooth(scalarField &psi, const scalarField &source, const direction cmpt, const label nSweeps) const
Smooth the solution for a given number of sweeps.
DICSmoother(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces)
Construct from matrix components.
void size(const label)
Override size to be inconsistent with allocated storage.
iterator begin()
Return an iterator to begin traversing the UList.
const lduMatrix & matrix_
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
A class for handling words, derived from string.
const volScalarField & psi
void sweep(volScalarField &field, const volScalarField &alpha, const label nLayers, const scalar alphaDiff=0.2)
lduMatrix::smoother::addsymMatrixConstructorToTable< DICSmoother > addDICSmootherSymMatrixConstructorToTable_
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
defineTypeNameAndDebug(combustionModel, 0)