38 lduMatrix::preconditioner::
39 addsymMatrixConstructorToTable<DICPreconditioner>
53 rD_(sol.matrix().
diag().size())
70 solveScalar* __restrict__ rDPtr = rD.
begin();
74 const scalar*
const __restrict__ upperPtr = matrix.
upper().
begin();
77 const label nFaces = matrix.
upper().
size();
85 const label nCells = rD.
size();
101 solveScalar* __restrict__ wAPtr = wA.begin();
102 const solveScalar* __restrict__ rAPtr = rA.begin();
103 const solveScalar* __restrict__ rDPtr = rD_.begin();
105 const label*
const __restrict__ uPtr =
106 solver_.matrix().lduAddr().upperAddr().begin();
107 const label*
const __restrict__ lPtr =
108 solver_.matrix().lduAddr().lowerAddr().begin();
109 const scalar*
const __restrict__ upperPtr =
110 solver_.matrix().upper().begin();
112 const label nCells = wA.size();
113 const label nFaces = solver_.matrix().upper().
size();
114 const label nFacesM1 = nFaces - 1;
116 for (label cell=0; cell<nCells; cell++)
118 wAPtr[cell] = rDPtr[cell]*rAPtr[cell];
Simplified diagonal-based incomplete Cholesky preconditioner for symmetric matrices (symmetric equiva...
DICPreconditioner(const lduMatrix::solver &, const dictionary &solverControlsUnused)
Construct from matrix components and preconditioner solver controls.
virtual void precondition(solveScalarField &wA, const solveScalarField &rA, const direction cmpt=0) const
Return wA the preconditioned form of residual rA.
static void calcReciprocalD(solveScalarField &, const lduMatrix &)
Calculate the reciprocal of the preconditioned diagonal.
iterator begin() noexcept
Return an iterator to begin traversing the UList.
void size(const label n)
Older name for setAddressableSize.
A cell is defined as a list of faces with extra functionality.
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.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
const solver & solver_
Reference to the base-solver this preconditioner is used with.
preconditioner(const solver &sol)
Construct for given solver.
Abstract base-class for lduMatrix solvers.
const lduMatrix & matrix() 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 & upper() const
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< solveScalar > solveScalarField
lduMatrix::preconditioner::addsymMatrixConstructorToTable< DICPreconditioner > addDICPreconditionerSymMatrixConstructorToTable_
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)