30 template<
class Type,
class DType,
class LUType>
40 calcInvD(rD_, sol.
matrix());
46 template<
class Type,
class DType,
class LUType>
53 DType* __restrict__ rDPtr = rD.
begin();
55 const label*
const __restrict__ uPtr = matrix.
lduAddr().upperAddr().begin();
56 const label*
const __restrict__ lPtr = matrix.
lduAddr().lowerAddr().begin();
58 const LUType*
const __restrict__ upperPtr = matrix.
upper().
begin();
59 const LUType*
const __restrict__ lowerPtr = matrix.
lower().
begin();
65 dot(
dot(upperPtr[
face], lowerPtr[face]),
inv(rDPtr[lPtr[face]]));
79 template<
class Type,
class DType,
class LUType>
86 Type* __restrict__ wAPtr = wA.
begin();
87 const Type* __restrict__ rAPtr = rA.
begin();
88 const DType* __restrict__ rDPtr = rD_.begin();
90 const label*
const __restrict__ uPtr =
91 this->solver_.matrix().lduAddr().upperAddr().begin();
92 const label*
const __restrict__ lPtr =
93 this->solver_.matrix().lduAddr().lowerAddr().begin();
94 const label*
const __restrict__ losortPtr =
95 this->solver_.matrix().lduAddr().losortAddr().begin();
97 const LUType*
const __restrict__ upperPtr =
98 this->solver_.matrix().upper().begin();
99 const LUType*
const __restrict__ lowerPtr =
100 this->solver_.matrix().lower().begin();
103 label nFaces = this->solver_.matrix().upper().size();
104 label nFacesM1 = nFaces - 1;
116 sface = losortPtr[
face];
117 wAPtr[uPtr[sface]] -=
118 dot(rDPtr[uPtr[sface]],
dot(lowerPtr[sface], wAPtr[lPtr[sface]]));
124 dot(rDPtr[lPtr[
face]],
dot(upperPtr[face], wAPtr[uPtr[face]]));
129 template<
class Type,
class DType,
class LUType>
136 Type* __restrict__ wTPtr = wT.
begin();
137 const Type* __restrict__ rTPtr = rT.
begin();
138 const DType* __restrict__ rDPtr = rD_.begin();
140 const label*
const __restrict__ uPtr =
141 this->solver_.matrix().lduAddr().upperAddr().begin();
142 const label*
const __restrict__ lPtr =
143 this->solver_.matrix().lduAddr().lowerAddr().begin();
144 const label*
const __restrict__ losortPtr =
145 this->solver_.matrix().lduAddr().losortAddr().begin();
147 const LUType*
const __restrict__ upperPtr =
148 this->solver_.matrix().upper().begin();
149 const LUType*
const __restrict__ lowerPtr =
150 this->solver_.matrix().lower().begin();
153 label nFaces = this->solver_.matrix().upper().size();
154 label nFacesM1 = nFaces - 1;
164 dot(rDPtr[uPtr[
face]],
dot(upperPtr[face], wTPtr[lPtr[face]]));
172 sface = losortPtr[
face];
173 wTPtr[lPtr[sface]] -=
174 dot(rDPtr[lPtr[sface]],
dot(lowerPtr[sface], wTPtr[uPtr[sface]]));
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A face is a list of labels corresponding to mesh vertices.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
void size(const label)
Override size to be inconsistent with allocated storage.
Field< LUType > & lower()
virtual void precondition(Field< Type > &wA, const Field< Type > &rA) const
Return wA the preconditioned form of residual rA.
const LduMatrix< Type, DType, LUType > & matrix() const
void dot(FieldField< Field1, typename innerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Abstract base-class for LduMatrix preconditioners.
iterator begin()
Return an iterator to begin traversing the UList.
Field< LUType > & upper()
virtual void preconditionT(Field< Type > &wT, const Field< Type > &rT) const
Return wT the transpose-matrix preconditioned form of.
Abstract base-class for LduMatrix solvers.
TDILUPreconditioner(const typename LduMatrix< Type, DType, LUType >::solver &sol, const dictionary &preconditionerDict)
Construct from matrix components and preconditioner data dictionary.
const lduAddressing & lduAddr() const
Return the LDU addressing.
A cell is defined as a list of faces with extra functionality.
LduMatrix is a general matrix class in which the coefficients are stored as three arrays...
static void calcInvD(Field< DType > &rD, const LduMatrix< Type, DType, LUType > &matrix)
Calculate the reciprocal of the preconditioned diagonal.