LifeV
Preconditioner Class Referenceabstract

Preconditioner - Abstract preconditioner class. More...

#include <Preconditioner.hpp>

+ Inheritance diagram for Preconditioner:
+ Collaboration diagram for Preconditioner:

Protected Attributes

std::string M_precType
 
Displayer M_displayer
 
list_Type M_list
 
bool M_preconditionerCreated
 

Public Types

typedef Epetra_Operator prec_raw_type
 
typedef std::shared_ptr< prec_raw_typeprec_type
 
typedef MatrixEpetra< Realoperator_raw_type
 
typedef std::shared_ptr< operator_raw_typeoperator_type
 
typedef Displayer::comm_Type comm_Type
 
typedef Displayer::commPtr_Type commPtr_Type
 
typedef Teuchos::ParameterList list_Type
 

Constructors & Destructor

 Preconditioner (const commPtr_Type &comm=commPtr_Type())
 Constructor. More...
 
 Preconditioner (const Preconditioner &preconditioner, const commPtr_Type &comm=commPtr_Type())
 Copy constructor. More...
 
virtual ~Preconditioner ()
 Destructor. More...
 

Methods

virtual void createParametersList (list_Type &list, const GetPot &dataFile, const std::string &section, const std::string &subSection)=0
 Create the list of parameters of the preconditioner. More...
 
virtual Int buildPreconditioner (operator_type &matrix)=0
 Build a preconditioner based on the given matrix. More...
 
virtual void resetPreconditioner ()=0
 Reset the preconditioner. More...
 
virtual Real condest ()=0
 Return An estimation of the condition number of the preconditioner. More...
 
virtual void showMe (std::ostream &output=std::cout) const
 Show informations about the preconditioner. More...
 

Epetra Operator Interface Methods

virtual Int SetUseTranspose (const bool useTranspose=false)
 Set the matrix to be used transposed (or not) More...
 
virtual bool UseTranspose ()
 Return true if the preconditioner is transposed. More...
 
virtual Int Apply (const Epetra_MultiVector &vector1, Epetra_MultiVector &vector2) const
 Apply the inverse of the preconditioner on vector1 and store the result in vector2. More...
 
virtual Int ApplyInverse (const Epetra_MultiVector &vector1, Epetra_MultiVector &vector2) const
 Apply the inverse of the preconditioner on vector1 and store the result in vector2. More...
 
virtual const Epetra_Map & OperatorRangeMap () const
 Return the Range map of the operator. More...
 
virtual const Epetra_Map & OperatorDomainMap () const
 Return the Domain map of the operator. More...
 

Set Methods

void setParametersList (const list_Type &list)
 The the internal list. More...
 
virtual void setDataFromGetPot (const GetPot &dataFile, const std::string &section)=0
 Set the data of the preconditioner using a GetPot object. More...
 
virtual void setSolver (SolverAztecOO &)
 Set the internal solver. More...
 

Get Methods

const bool & preconditionerCreated ()
 Return true if the preconditioner has been created. More...
 
virtual prec_raw_typepreconditioner ()=0
 Return a raw pointer on the preconditioner. More...
 
virtual prec_type preconditionerPtr ()=0
 Return a shared pointer on the preconditioner. More...
 
virtual std::string preconditionerType ()=0
 Return the type of preconditioner. More...
 
const list_TypeparametersList () const
 Return the parameters list. More...
 
list_TypeparametersList ()
 Return the parameters list. More...
 

Detailed Description

Preconditioner - Abstract preconditioner class.

Author
Simone Deparis simon.nosp@m.e.de.nosp@m.paris.nosp@m.@epf.nosp@m.l.ch

Definition at line 64 of file Preconditioner.hpp.

Member Typedef Documentation

◆ prec_raw_type

Definition at line 71 of file Preconditioner.hpp.

◆ prec_type

typedef std::shared_ptr<prec_raw_type> prec_type

Definition at line 72 of file Preconditioner.hpp.

◆ operator_raw_type

Definition at line 74 of file Preconditioner.hpp.

◆ operator_type

typedef std::shared_ptr<operator_raw_type> operator_type

Definition at line 75 of file Preconditioner.hpp.

◆ comm_Type

Definition at line 77 of file Preconditioner.hpp.

◆ commPtr_Type

Definition at line 78 of file Preconditioner.hpp.

◆ list_Type

typedef Teuchos::ParameterList list_Type

Definition at line 80 of file Preconditioner.hpp.

Constructor & Destructor Documentation

◆ Preconditioner() [1/2]

Preconditioner ( const commPtr_Type comm = commPtr_Type())

Constructor.

Parameters
commComminicator

Definition at line 47 of file Preconditioner.cpp.

+ Here is the caller graph for this function:

◆ Preconditioner() [2/2]

Preconditioner ( const Preconditioner preconditioner,
const commPtr_Type comm = commPtr_Type() 
)

Copy constructor.

Parameters
preconditionerPreconditioner
commComminicator

Definition at line 56 of file Preconditioner.cpp.

◆ ~Preconditioner()

~Preconditioner ( )
virtual

Destructor.

Definition at line 65 of file Preconditioner.cpp.

Member Function Documentation

◆ createParametersList()

virtual void createParametersList ( list_Type list,
const GetPot dataFile,
const std::string &  section,
const std::string &  subSection 
)
pure virtual

Create the list of parameters of the preconditioner.

Parameters
listA Parameter list to be filled
dataFileA GetPot object containing the data about the preconditioner
sectionThe section in "dataFile" where to find data about the preconditioner
subSectionThe subsection in "dataFile" where to find data about the preconditioner

Implemented in PreconditionerIfpack, PreconditionerLinearSolver, PreconditionerML, PreconditionerComposed, PreconditionerPCD, PreconditionerSIMPLE, PreconditionerComposition, PreconditionerYosida, and PreconditionerAztecOO.

◆ buildPreconditioner()

virtual Int buildPreconditioner ( operator_type matrix)
pure virtual

Build a preconditioner based on the given matrix.

Parameters
matrixMatrix upon which construct the preconditioner

Implemented in PreconditionerLinearSolver, PreconditionerIfpack, PreconditionerML, and PreconditionerAztecOO.

◆ resetPreconditioner()

virtual void resetPreconditioner ( )
pure virtual

◆ condest()

virtual Real condest ( )
pure virtual

◆ showMe()

void showMe ( std::ostream &  output = std::cout) const
virtual

Show informations about the preconditioner.

Reimplemented in PreconditionerML, PreconditionerIfpack, PreconditionerLinearSolver, and PreconditionerAztecOO.

Definition at line 100 of file Preconditioner.cpp.

◆ SetUseTranspose()

Int SetUseTranspose ( const bool  useTranspose = false)
virtual

Set the matrix to be used transposed (or not)

Parameters
useTransposeIf true the preconditioner is transposed

Reimplemented in PreconditionerML, PreconditionerIfpack, PreconditionerLinearSolver, PreconditionerComposed, and PreconditionerComposition.

Definition at line 79 of file Preconditioner.cpp.

◆ UseTranspose()

bool UseTranspose ( )
virtual

Return true if the preconditioner is transposed.

Reimplemented in PreconditionerML, PreconditionerIfpack, PreconditionerLinearSolver, PreconditionerComposed, and PreconditionerComposition.

Definition at line 142 of file Preconditioner.cpp.

◆ Apply()

Int Apply ( const Epetra_MultiVector vector1,
Epetra_MultiVector vector2 
) const
virtual

Apply the inverse of the preconditioner on vector1 and store the result in vector2.

Parameters
vector1Vector to which we apply the preconditioner
vector2Vector to the store the result

Reimplemented in PreconditionerComposed, PreconditionerLinearSolver, PreconditionerML, PreconditionerIfpack, and PreconditionerComposition.

Definition at line 86 of file Preconditioner.cpp.

◆ ApplyInverse()

Int ApplyInverse ( const Epetra_MultiVector vector1,
Epetra_MultiVector vector2 
) const
virtual

Apply the inverse of the preconditioner on vector1 and store the result in vector2.

Parameters
vector1Vector to which we apply the preconditioner
vector2Vector to the store the result

Reimplemented in PreconditionerLinearSolver, PreconditionerComposed, PreconditionerIfpack, PreconditionerML, and PreconditionerComposition.

Definition at line 93 of file Preconditioner.cpp.

◆ OperatorRangeMap()

const Epetra_Map & OperatorRangeMap ( ) const
virtual

Return the Range map of the operator.

Reimplemented in PreconditionerML, PreconditionerIfpack, PreconditionerComposed, PreconditionerLinearSolver, and PreconditionerComposition.

Definition at line 149 of file Preconditioner.cpp.

◆ OperatorDomainMap()

const Epetra_Map & OperatorDomainMap ( ) const
virtual

Return the Domain map of the operator.

Reimplemented in PreconditionerML, PreconditionerIfpack, PreconditionerComposed, PreconditionerLinearSolver, and PreconditionerComposition.

Definition at line 157 of file Preconditioner.cpp.

◆ setParametersList()

void setParametersList ( const list_Type list)

The the internal list.

Parameters
listList to be set into the preconditioner

Definition at line 109 of file Preconditioner.cpp.

◆ setDataFromGetPot()

virtual void setDataFromGetPot ( const GetPot dataFile,
const std::string &  section 
)
pure virtual

Set the data of the preconditioner using a GetPot object.

Parameters
dataFileA GetPot object containing the data about the preconditioner
sectionThe section in "dataFile" where to find data about the preconditioner

Implemented in PreconditionerLinearSolver, PreconditionerML, PreconditionerIfpack, PreconditionerComposition, PreconditionerPCD, PreconditionerSIMPLE, PreconditionerYosida, PreconditionerAztecOO, and PreconditionerComposed.

◆ setSolver()

void setSolver ( SolverAztecOO )
virtual

Set the internal solver.

Note: the argument is unused

Parameters
solverSolverAztecOO

Reimplemented in PreconditionerLinearSolver, and PreconditionerAztecOO.

Definition at line 115 of file Preconditioner.cpp.

◆ preconditionerCreated()

const bool & preconditionerCreated ( )

Return true if the preconditioner has been created.

Definition at line 124 of file Preconditioner.cpp.

◆ preconditioner()

virtual prec_raw_type* preconditioner ( )
pure virtual

◆ preconditionerPtr()

virtual prec_type preconditionerPtr ( )
pure virtual

◆ preconditionerType()

virtual std::string preconditionerType ( )
pure virtual

◆ parametersList() [1/2]

const Preconditioner::list_Type & parametersList ( ) const

Return the parameters list.

Definition at line 130 of file Preconditioner.cpp.

+ Here is the caller graph for this function:

◆ parametersList() [2/2]

Preconditioner::list_Type & parametersList ( )

Return the parameters list.

Definition at line 136 of file Preconditioner.cpp.

Field Documentation

◆ M_precType

std::string M_precType
protected

Definition at line 226 of file Preconditioner.hpp.

◆ M_displayer

Displayer M_displayer
protected

Definition at line 227 of file Preconditioner.hpp.

◆ M_list

list_Type M_list
protected

Definition at line 228 of file Preconditioner.hpp.

◆ M_preconditionerCreated

bool M_preconditionerCreated
protected

Definition at line 229 of file Preconditioner.hpp.


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