36 lduMatrix::preconditioner::
37 addsymMatrixConstructorToTable<diagonalPreconditioner>
40 lduMatrix::preconditioner::
41 addasymMatrixConstructorToTable<diagonalPreconditioner>
48 Foam::diagonalPreconditioner::diagonalPreconditioner
55 rD(sol.matrix().
diag().size())
57 solveScalar* __restrict__ rDPtr = rD.
begin();
60 const label nCells = rD.
size();
79 solveScalar* __restrict__ wAPtr = wA.begin();
80 const solveScalar* __restrict__ rAPtr = rA.begin();
81 const solveScalar* __restrict__ rDPtr = rD.begin();
83 const label nCells = wA.size();
85 for (label cell=0; cell<nCells; cell++)
87 wAPtr[cell] = rDPtr[cell]*rAPtr[cell];
void size(const label n)
Older name for setAddressableSize.
virtual void precondition(solveScalarField &wA, const solveScalarField &rA, const direction cmpt=0) const
Return wA the preconditioned form of residual rA.
Field< solveScalar > solveScalarField
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const solver & solver_
Reference to the base-solver this preconditioner is used with.
const lduMatrix & matrix() const noexcept
lduMatrix::preconditioner::addasymMatrixConstructorToTable< diagonalPreconditioner > adddiagonalPreconditionerAsymMatrixConstructorToTable_
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
Abstract base-class for lduMatrix solvers.
Diagonal preconditioner for both symmetric and asymmetric matrices.
iterator begin() noexcept
Return an iterator to begin traversing the UList.
defineTypeNameAndDebug(combustionModel, 0)
lduMatrix::preconditioner::addsymMatrixConstructorToTable< diagonalPreconditioner > adddiagonalPreconditionerSymMatrixConstructorToTable_
lduMatrix is a general matrix class in which the coefficients are stored as three arrays...
A cell is defined as a list of faces with extra functionality.