diagonalPreconditioner Class Reference

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

Inheritance diagram for diagonalPreconditioner:
Collaboration diagram for diagonalPreconditioner:

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...
 
 diagonalPreconditioner (const diagonalPreconditioner &)=delete
 Disallow default bitwise copy construction. 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...
 
void operator= (const diagonalPreconditioner &)=delete
 Disallow default bitwise assignment. 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() [1/2]

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

Construct from matrix components and preconditioner solver controls.

Definition at line 46 of file diagonalPreconditioner.C.

References UList< T >::begin(), lduMatrix::diag(), lduMatrix::solver::matrix(), List< T >::size(), and lduMatrix::preconditioner::solver_.

Here is the call graph for this function:

◆ diagonalPreconditioner() [2/2]

Disallow default bitwise copy construction.

◆ ~diagonalPreconditioner()

virtual ~diagonalPreconditioner ( )
inlinevirtual

Destructor.

Definition at line 81 of file diagonalPreconditioner.H.

Member Function Documentation

◆ TypeName()

TypeName ( "diagonal"  )

Runtime type information.

◆ precondition()

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 70 of file diagonalPreconditioner.C.

References UList< T >::begin(), and List< T >::size().

Referenced by diagonalPreconditioner::preconditionT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ preconditionT()

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 96 of file diagonalPreconditioner.H.

References diagonalPreconditioner::precondition().

Here is the call graph for this function:

◆ operator=()

void operator= ( const diagonalPreconditioner )
delete

Disallow default bitwise assignment.


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