Public Member Functions | List of all members
diagonalPreconditioner Class Reference

Diagonal preconditioner for both symmetric and asymmetric matrices. More...

Inheritance diagram for diagonalPreconditioner:
Inheritance graph
[legend]
Collaboration diagram for diagonalPreconditioner:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("diagonal")
 Runtime type information. More...
 
 diagonalPreconditioner (const lduMatrix::solver &, const dictionary &solverControlsUnused)
 Construct from matrix components and preconditioner solver controls. More...
 
virtual ~diagonalPreconditioner ()
 Destructor. More...
 
virtual void precondition (scalarField &wA, const scalarField &rA, const direction cmpt=0) const
 Return wA the preconditioned form of residual rA. More...
 
virtual void preconditionT (scalarField &wT, const scalarField &rT, const direction cmpt=0) const
 Return wT the transpose-matrix preconditioned form of residual rT. More...
 
- Public Member Functions inherited from lduMatrix::preconditioner
virtual const wordtype () const =0
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, preconditioner, symMatrix,( const solver &sol, const dictionary &solverControls ),(sol, solverControls))
 
 declareRunTimeSelectionTable (autoPtr, preconditioner, asymMatrix,( const solver &sol, const dictionary &solverControls ),(sol, solverControls))
 
 preconditioner (const solver &sol)
 
virtual ~preconditioner ()
 Destructor. More...
 
virtual void read (const dictionary &)
 Read and reset the preconditioner parameters. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from lduMatrix::preconditioner
static word getName (const dictionary &)
 Find the preconditioner name (directly or from a sub-dictionary) More...
 
static autoPtr< preconditionerNew (const solver &sol, const dictionary &solverControls)
 Return a new preconditioner. More...
 
- Protected Attributes inherited from lduMatrix::preconditioner
const solversolver_
 Reference to the base-solver this preconditioner is used with. More...
 

Detailed Description

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 '/'.

Source files

Definition at line 51 of file diagonalPreconditioner.H.

Constructor & Destructor Documentation

diagonalPreconditioner ( const lduMatrix::solver sol,
const dictionary solverControlsUnused 
)

Construct from matrix components and preconditioner solver controls.

Definition at line 47 of file diagonalPreconditioner.C.

References diagonalPreconditioner::precondition().

Here is the call graph for this function:

virtual ~diagonalPreconditioner ( )
inlinevirtual

Destructor.

Definition at line 87 of file diagonalPreconditioner.H.

References diagonalPreconditioner::precondition(), and diagonalPreconditioner::preconditionT().

Here is the call graph for this function:

Member Function Documentation

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::diagonalPreconditioner(), diagonalPreconditioner::preconditionT(), and diagonalPreconditioner::~diagonalPreconditioner().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void preconditionT ( scalarField wT,
const scalarField rT,
const direction  cmpt = 0 
) const
inlinevirtual

Return wT the transpose-matrix preconditioned form of residual rT.

Reimplemented from lduMatrix::preconditioner.

Definition at line 103 of file diagonalPreconditioner.H.

References diagonalPreconditioner::precondition().

Referenced by diagonalPreconditioner::~diagonalPreconditioner().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: