40 lduMatrix::smoother::addasymMatrixConstructorToTable<DILUSmoother>
49 const word& fieldName,
65 rD_(matrix_.
diag().size())
84 const solveScalar*
const __restrict__ rDPtr = rD_.begin();
86 const label*
const __restrict__ uPtr =
87 matrix_.lduAddr().upperAddr().begin();
88 const label*
const __restrict__ lPtr =
89 matrix_.lduAddr().lowerAddr().begin();
91 const scalar*
const __restrict__ upperPtr = matrix_.upper().begin();
92 const scalar*
const __restrict__ lowerPtr = matrix_.lower().begin();
96 solveScalar* __restrict__ rAPtr = rA.begin();
98 for (label sweep=0; sweep<nSweeps; sweep++)
115 const label nFaces = matrix_.upper().size();
116 for (label face=0; face<nFaces; face++)
118 const label u = uPtr[face];
119 rAPtr[u] -= rDPtr[u]*lowerPtr[face]*rAPtr[lPtr[face]];
122 const label nFacesM1 = nFaces - 1;
125 const label l = lPtr[
face];
126 rAPtr[l] -= rDPtr[l]*upperPtr[
face]*rAPtr[uPtr[
face]];
A const Field/List wrapper with possible data conversion.
static void calcReciprocalD(solveScalarField &, const lduMatrix &)
Calculate the reciprocal of the preconditioned diagonal.
Simplified diagonal-based incomplete LU smoother for asymmetric matrices.
void smooth(solveScalarField &psi, const scalarField &source, const direction cmpt, const label nSweeps) const
Smooth the solution for a given number of sweeps.
DILUSmoother(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
Construct from matrix components.
void scalarSmooth(solveScalarField &psi, const solveScalarField &source, const direction cmpt, const label nSweeps) const
Smooth the solution for a given number of sweeps.
A field of fields is a PtrList of fields with reference counting.
iterator begin() noexcept
Return an iterator to begin traversing the UList.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A face is a list of labels corresponding to mesh vertices.
const FieldField< Field, scalar > & interfaceIntCoeffs() const noexcept
const lduMatrix & matrix_
const lduInterfaceFieldPtrsList & interfaces_
smoother(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces)
Construct for given field name, matrix etc.
const lduInterfaceFieldPtrsList & interfaces() const noexcept
const FieldField< Field, scalar > & interfaceBouCoeffs_
const lduMatrix & matrix() const noexcept
const FieldField< Field, scalar > & interfaceBouCoeffs() const noexcept
const word & fieldName() const noexcept
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
const scalarField & diag() const
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const volScalarField & psi
void smooth(volScalarField &field, const scalar coeff)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< solveScalar > solveScalarField
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
UPtrList< const lduInterfaceField > lduInterfaceFieldPtrsList
List of coupled interface fields to be used in coupling.
lduMatrix::smoother::addasymMatrixConstructorToTable< DILUSmoother > addDILUSmootherAsymMatrixConstructorToTable_
#define forAll(list, i)
Loop across all elements in list.