38 lduMatrix::preconditioner::
39 addsymMatrixConstructorToTable<DICPreconditioner>
53 rD_(sol.matrix().
diag().size())
56 std::copy(
diag.begin(),
diag.end(), rD_.begin());
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();
87 for (label cell=0; cell<nCells; cell++)
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];
121 for (label face=0; face<nFaces; face++)
123 wAPtr[uPtr[face]] -= rDPtr[uPtr[face]]*upperPtr[face]*wAPtr[lPtr[face]];
126 for (label face=nFacesM1; face>=0; face--)
128 wAPtr[lPtr[face]] -= rDPtr[lPtr[face]]*upperPtr[face]*wAPtr[uPtr[face]];