39 lduMatrix::smoother::addsymMatrixConstructorToTable<FDICSmoother>
48 const word& fieldName,
63 rD_(matrix_.
diag().size()),
64 rDuUpper_(matrix_.
upper().size()),
65 rDlUpper_(matrix_.
upper().size())
67 solveScalar* __restrict__ rDPtr = rD_.
begin();
68 solveScalar* __restrict__ rDuUpperPtr = rDuUpper_.
begin();
69 solveScalar* __restrict__ rDlUpperPtr = rDlUpper_.
begin();
71 const label*
const __restrict__ uPtr =
73 const label*
const __restrict__ lPtr =
75 const scalar*
const __restrict__ upperPtr =
103 const solveScalar*
const __restrict__ rDuUpperPtr = rDuUpper_.begin();
104 const solveScalar*
const __restrict__ rDlUpperPtr = rDlUpper_.begin();
106 const label*
const __restrict__ uPtr =
107 matrix_.lduAddr().upperAddr().begin();
108 const label*
const __restrict__ lPtr =
109 matrix_.lduAddr().lowerAddr().begin();
113 solveScalar* __restrict__ rAPtr = rA.
begin();
132 const label nFaces = matrix_.upper().size();
133 for (label face=0; face<nFaces; face++)
135 rAPtr[uPtr[face]] -= rDuUpperPtr[face]*rAPtr[lPtr[face]];
138 const label nFacesM1 = nFaces - 1;
139 for (label face=nFacesM1; face>=0; face--)
141 rAPtr[lPtr[face]] -= rDlUpperPtr[face]*rAPtr[uPtr[face]];
160 ConstPrecisionAdaptor<scalar, solveScalar>(source),
void size(const label n)
Older name for setAddressableSize.
lduMatrix::smoother::addsymMatrixConstructorToTable< FDICSmoother > addFDICSmootherSymMatrixConstructorToTable_
static void calcReciprocalD(solveScalarField &, const lduMatrix &)
Calculate the reciprocal of the preconditioned diagonal.
A face is a list of labels corresponding to mesh vertices.
Field< solveScalar > solveScalarField
string upper(const std::string &s)
Return string copy transformed with std::toupper on each character.
void smooth(solveScalarField &psi, const scalarField &source, const direction cmpt, const label nSweeps) const
Smooth the solution for a given number of sweeps.
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
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.
FDICSmoother(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces)
Construct from matrix components.
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.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
iterator begin() noexcept
Return an iterator to begin traversing the UList.
Simplified diagonal-based incomplete Cholesky smoother for symmetric matrices.
defineTypeNameAndDebug(combustionModel, 0)
lduMatrix is a general matrix class in which the coefficients are stored as three arrays...
const lduAddressing & lduAddr() const
Return the LDU addressing.
const volScalarField & psi
virtual void scalarSmooth(solveScalarField &psi, const solveScalarField &source, const direction cmpt, const label nSweeps) const
Smooth the solution for a given number of sweeps.