Diagonal preconditioner for both symmetric and asymmetric matrices. More...
#include <OpenFOAM/diagonalPreconditioner.H>
Diagonal preconditioner for both symmetric and asymmetric matrices.
The reciprocal of the diagonal is calculated and stored for reuse because on most systems '*' is faster than '/'.
Definition at line 52 of file diagonalPreconditioner.H.
Public Member Functions | |
TypeName ("diagonal") | |
Runtime type information.
| |
diagonalPreconditioner (const lduMatrix::solver &, const dictionary &solverControlsUnused) | |
Construct from matrix components and preconditioner solver controls.
| |
virtual | ~diagonalPreconditioner () |
virtual void | precondition (scalarField &wA, const scalarField &rA, const direction cmpt=0) const |
Return wA the preconditioned form of residual rA.
| |
virtual void | preconditionT (scalarField &wT, const scalarField &rT, const direction cmpt=0) const |
Return wT the transpose-matrix preconditioned form of residual rT.
|
diagonalPreconditioner | ( | const lduMatrix::solver & | sol, |
const dictionary & | solverControlsUnused | ||
) |
Construct from matrix components and preconditioner solver controls.
Definition at line 47 of file diagonalPreconditioner.C.
virtual ~diagonalPreconditioner | ( | ) | [inline, virtual]
|
Definition at line 89 of file diagonalPreconditioner.H.
TypeName | ( | "diagonal" | ) |
Runtime type information.
void precondition | ( | scalarField & | wA, |
const scalarField & | rA, | ||
const direction | cmpt = 0
|
||
) | const [virtual]
|
Return wA the preconditioned form of residual rA.
Implements lduMatrix::preconditioner.
Definition at line 71 of file diagonalPreconditioner.C.
References UList< T >::begin(), and List< T >::size().
Referenced by diagonalPreconditioner::preconditionT().
virtual void preconditionT | ( | scalarField & | wT, |
const scalarField & | rT, | ||
const direction | cmpt = 0
|
||
) | const [inline, virtual]
|
Return wT the transpose-matrix preconditioned form of residual rT.
Reimplemented from lduMatrix::preconditioner.
Definition at line 105 of file diagonalPreconditioner.H.
References diagonalPreconditioner::precondition().