38 lduMatrix::preconditioner::
39 addasymMatrixConstructorToTable<DILUPreconditioner>
53 rD_(sol.matrix().
diag().size())
70 solveScalar* __restrict__ rDPtr = rD.
begin();
75 const scalar*
const __restrict__ upperPtr = matrix.
upper().
begin();
76 const scalar*
const __restrict__ lowerPtr = matrix.
lower().
begin();
86 const label nCells = rD.
size();
88 for (label cell=0; cell<nCells; cell++)
102 solveScalar* __restrict__ wAPtr = wA.begin();
103 const solveScalar* __restrict__ rAPtr = rA.begin();
104 const solveScalar* __restrict__ rDPtr = rD_.begin();
106 const label*
const __restrict__ uPtr =
107 solver_.matrix().lduAddr().upperAddr().begin();
108 const label*
const __restrict__ lPtr =
109 solver_.matrix().lduAddr().lowerAddr().begin();
110 const label*
const __restrict__ losortPtr =
111 solver_.matrix().lduAddr().losortAddr().begin();
113 const scalar*
const __restrict__ upperPtr =
114 solver_.matrix().upper().begin();
115 const scalar*
const __restrict__ lowerPtr =
116 solver_.matrix().lower().begin();
118 const label nCells = wA.size();
119 const label nFaces = solver_.matrix().upper().
size();
120 const label nFacesM1 = nFaces - 1;
122 for (label cell=0; cell<nCells; cell++)
124 wAPtr[cell] = rDPtr[cell]*rAPtr[cell];
127 for (label face=0; face<nFaces; face++)
129 const label sface = losortPtr[face];
130 wAPtr[uPtr[sface]] -=
131 rDPtr[uPtr[sface]]*lowerPtr[sface]*wAPtr[lPtr[sface]];
134 for (label face=nFacesM1; face>=0; face--)
149 solveScalar* __restrict__ wTPtr = wT.begin();
150 const solveScalar* __restrict__ rTPtr = rT.begin();
151 const solveScalar* __restrict__ rDPtr = rD_.begin();
153 const label*
const __restrict__ uPtr =
154 solver_.matrix().lduAddr().upperAddr().begin();
155 const label*
const __restrict__ lPtr =
156 solver_.matrix().lduAddr().lowerAddr().begin();
157 const label*
const __restrict__ losortPtr =
158 solver_.matrix().lduAddr().losortAddr().begin();
160 const scalar*
const __restrict__ upperPtr =
161 solver_.matrix().upper().begin();
162 const scalar*
const __restrict__ lowerPtr =
163 solver_.matrix().lower().begin();
165 const label nCells = wT.size();
166 const label nFaces = solver_.matrix().upper().size();
167 const label nFacesM1 = nFaces - 1;
169 for (label cell=0; cell<nCells; cell++)
171 wTPtr[cell] = rDPtr[cell]*rTPtr[cell];
174 for (label face=0; face<nFaces; face++)
177 rDPtr[uPtr[face]]*upperPtr[face]*wTPtr[lPtr[face]];
181 for (label face=nFacesM1; face>=0; face--)
183 const label sface = losortPtr[face];
184 wTPtr[lPtr[sface]] -=
185 rDPtr[lPtr[sface]]*lowerPtr[sface]*wTPtr[uPtr[sface]];
void size(const label n)
Older name for setAddressableSize.
static void calcReciprocalD(solveScalarField &, const lduMatrix &)
Calculate the reciprocal of the preconditioned diagonal.
A face is a list of labels corresponding to mesh vertices.
lduMatrix::preconditioner::addasymMatrixConstructorToTable< DILUPreconditioner > addDILUPreconditionerAsymMatrixConstructorToTable_
Field< solveScalar > solveScalarField
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const lduMatrix & matrix() const noexcept
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
virtual void precondition(solveScalarField &wA, const solveScalarField &rA, const direction cmpt=0) const
Return wA the preconditioned form of residual rA.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
DILUPreconditioner(const lduMatrix::solver &, const dictionary &solverControlsUnused)
Construct from matrix components and preconditioner solver controls.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
Abstract base-class for lduMatrix solvers.
virtual void preconditionT(solveScalarField &wT, const solveScalarField &rT, const direction cmpt=0) const
Return wT the transpose-matrix preconditioned form of residual rT.
iterator begin() noexcept
Return an iterator to begin traversing the UList.
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.
A cell is defined as a list of faces with extra functionality.
Simplified diagonal-based incomplete LU preconditioner for asymmetric matrices. The reciprocal of the...