Public Member Functions | List of all members
DiagonalPreconditioner< Type, DType, LUType > Class Template Reference

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

Inheritance diagram for DiagonalPreconditioner< Type, DType, LUType >:
Inheritance graph
[legend]
Collaboration diagram for DiagonalPreconditioner< Type, DType, LUType >:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("diagonal")
 
 DiagonalPreconditioner (const typename LduMatrix< Type, DType, LUType >::solver &sol, const dictionary &preconditionerDict)
 
virtual ~DiagonalPreconditioner ()=default
 
virtual void read (const dictionary &preconditionerDict)
 
virtual void precondition (Field< Type > &wA, const Field< Type > &rA) const
 
virtual void preconditionT (Field< Type > &wT, const Field< Type > &rT) const
 
- Public Member Functions inherited from LduMatrix::preconditioner
virtual const wordtype () const =0
 
 declareRunTimeSelectionTable (autoPtr, preconditioner, symMatrix,(const solver &sol, const dictionary &preconditionerDict),(sol, preconditionerDict))
 
 declareRunTimeSelectionTable (autoPtr, preconditioner, asymMatrix,(const solver &sol, const dictionary &preconditionerDict),(sol, preconditionerDict))
 
 preconditioner (const solver &sol)
 
virtual ~preconditioner ()=default
 

Additional Inherited Members

- Static Public Member Functions inherited from LduMatrix::preconditioner
static autoPtr< preconditionerNew (const solver &sol, const dictionary &preconditionerDict)
 
- Protected Attributes inherited from LduMatrix::preconditioner
const solversolver_
 

Detailed Description

template<class Type, class DType, class LUType>
class Foam::DiagonalPreconditioner< Type, DType, LUType >

Diagonal preconditioner for both symmetric and asymmetric matrices.

The inverse (reciprocal for scalar) of the diagonal is calculated and stored.

Source files

Definition at line 51 of file DiagonalPreconditioner.H.

Constructor & Destructor Documentation

◆ DiagonalPreconditioner()

DiagonalPreconditioner ( const typename LduMatrix< Type, DType, LUType >::solver sol,
const dictionary preconditionerDict 
)

Definition at line 27 of file DiagonalPreconditioner.C.

References LduMatrix::diag(), and Foam::inv().

Here is the call graph for this function:

◆ ~DiagonalPreconditioner()

virtual ~DiagonalPreconditioner ( )
virtualdefault

Member Function Documentation

◆ TypeName()

TypeName ( "diagonal"  )

◆ read()

void read ( const dictionary preconditionerDict)
virtual

Reimplemented from LduMatrix::preconditioner.

Definition at line 51 of file DiagonalPreconditioner.C.

◆ precondition()

void precondition ( Field< Type > &  wA,
const Field< Type > &  rA 
) const
virtual

Implements LduMatrix::preconditioner.

Definition at line 57 of file DiagonalPreconditioner.C.

References Foam::dot().

Referenced by DiagonalPreconditioner< Type, DType, LUType >::preconditionT().

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

◆ preconditionT()

virtual void preconditionT ( Field< Type > &  wT,
const Field< Type > &  rT 
) const
inlinevirtual

Reimplemented from LduMatrix::preconditioner.

Definition at line 107 of file DiagonalPreconditioner.H.

References DiagonalPreconditioner< Type, DType, LUType >::precondition().

Here is the call graph for this function:

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