36 lduMatrix::preconditioner::
37 addsymMatrixConstructorToTable<distributedDICPreconditioner>
53 const auto& lduAddr = matrix.
lduAddr();
55 const label*
const __restrict__ uPtr = lduAddr.
upperAddr().
begin();
56 const label*
const __restrict__ lPtr = lduAddr.lowerAddr().begin();
57 const scalar*
const __restrict__ upperPtr = matrix.upper().begin();
59 const label nFaces = matrix.upper().size();
66 if (cellColour[
cell] == colouri)
74 for (label face=0; face<nFaces; face++)
88 const auto& matrix = solver_.matrix();
89 const auto& lduAddr = matrix.lduAddr();
91 solveScalar* __restrict__ wAPtr = wA.begin();
92 const solveScalar* __restrict__ rDPtr = rD_.begin();
94 const label*
const __restrict__ uPtr = lduAddr.upperAddr().begin();
95 const label*
const __restrict__ lPtr = lduAddr.lowerAddr().begin();
96 const scalar*
const __restrict__ upperPtr = matrix.upper().begin();
98 const label nFaces = matrix.upper().size();
101 const auto& cellColour = *cellColourPtr_;
102 for (label face=0; face<nFaces; face++)
104 const label cell = lPtr[face];
105 if (cellColour[cell] == colouri)
108 rDPtr[uPtr[face]]*upperPtr[face]*wAPtr[cell];
114 for (label face=0; face<nFaces; face++)
117 rDPtr[uPtr[face]]*upperPtr[face]*wAPtr[lPtr[face]];
127 const lduMatrix::solver& sol,
128 const dictionary&
dict 131 distributedDILUPreconditioner(sol,
dict)
A face is a list of labels corresponding to mesh vertices.
Field< solveScalar > solveScalarField
const solver & solver_
Reference to the base-solver this preconditioner is used with.
Version of DICpreconditioner that uses preconditioning across processor (and coupled) boundaries...
autoPtr< labelList > cellColourPtr_
Local (cell) colouring from global interfaces.
const lduMatrix & matrix() const noexcept
virtual const labelUList & upperAddr() const =0
Return upper addressing.
iterator begin() noexcept
Return an iterator to begin traversing the UList.
virtual void forwardInternal(solveScalarField &wA, const label colouri) const
Update preconditioned variable walking forward on internal faces.
defineTypeNameAndDebug(combustionModel, 0)
const lduAddressing & lduAddr() const
Return the LDU addressing.
A cell is defined as a list of faces with extra functionality.
virtual void forwardInternalDiag(solveScalarField &rD, const label colouri) const
Update diagonal for colour.
distributedDICPreconditioner(const lduMatrix::solver &, const dictionary &solverControlsUnused)
Construct from matrix components and preconditioner solver controls.
lduMatrix::preconditioner::addsymMatrixConstructorToTable< distributedDICPreconditioner > adddistributedDICPreconditionerSymMatrixConstructorToTable_