39 lduMatrix::smoother::addsymMatrixConstructorToTable<FDICSmoother>
48 const word& fieldName,
64 rD_(matrix_.
diag().size()),
65 rDuUpper_(matrix_.upper().size()),
66 rDlUpper_(matrix_.upper().size())
68 solveScalar* __restrict__ rDPtr = rD_.
begin();
69 solveScalar* __restrict__ rDuUpperPtr = rDuUpper_.
begin();
70 solveScalar* __restrict__ rDlUpperPtr = rDlUpper_.
begin();
72 const label*
const __restrict__ uPtr =
74 const label*
const __restrict__ lPtr =
76 const scalar*
const __restrict__ upperPtr =
104 const solveScalar*
const __restrict__ rDuUpperPtr = rDuUpper_.begin();
105 const solveScalar*
const __restrict__ rDlUpperPtr = rDlUpper_.begin();
107 const label*
const __restrict__ uPtr =
108 matrix_.lduAddr().upperAddr().begin();
109 const label*
const __restrict__ lPtr =
110 matrix_.lduAddr().lowerAddr().begin();
114 solveScalar* __restrict__ rAPtr = rA.begin();
116 for (label sweep=0; sweep<nSweeps; sweep++)
133 const label nFaces = matrix_.upper().size();
136 rAPtr[uPtr[
face]] -= rDuUpperPtr[
face]*rAPtr[lPtr[
face]];
139 const label nFacesM1 = nFaces - 1;
142 rAPtr[lPtr[
face]] -= rDlUpperPtr[
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 Cholesky smoother for symmetric matrices.
void smooth(solveScalarField &psi, const scalarField &source, const direction cmpt, const label nSweeps) const
Smooth the solution for a given number of sweeps.
FDICSmoother(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.
virtual 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 lduAddressing & lduAddr() const
Return the LDU addressing.
const scalarField & diag() const
const scalarField & upper() 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
lduMatrix::smoother::addsymMatrixConstructorToTable< FDICSmoother > addFDICSmootherSymMatrixConstructorToTable_
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
UPtrList< const lduInterfaceField > lduInterfaceFieldPtrsList
List of coupled interface fields to be used in coupling.
#define forAll(list, i)
Loop across all elements in list.