LifeV
PreconditionerIfpack Class Reference

PreconditionerIfpack - Class implementing overlapping Schwarz preconditioner. More...

#include <PreconditionerIfpack.hpp>

+ Inheritance diagram for PreconditionerIfpack:
+ Collaboration diagram for PreconditionerIfpack:

Protected Attributes

prec_type M_preconditioner
 
std::shared_ptr< Epetra_Comm > M_comm
 
- Protected Attributes inherited from Preconditioner
std::string M_precType
 
Displayer M_displayer
 
list_Type M_list
 
bool M_preconditionerCreated
 

Private Attributes

Int M_overlapLevel
 
operator_raw_type::matrix_ptrtype M_operator
 

Public Types

typedef Preconditioner super
 
typedef Ifpack_Preconditioner prec_raw_type
 
typedef std::shared_ptr< prec_raw_typeprec_type
 
typedef super::operator_raw_type operator_raw_type
 
typedef super::operator_type operator_type
 

Constructors & Destructor

 PreconditionerIfpack (std::shared_ptr< Epetra_Comm > comm=std::shared_ptr< Epetra_Comm >(new Epetra_MpiComm(MPI_COMM_WORLD)))
 Empty constructor. More...
 
virtual ~PreconditionerIfpack ()
 Destructor. More...
 

Methods

Int buildPreconditioner (operator_type &matrix)
 Build a preconditioner based on the given matrix. More...
 
void resetPreconditioner ()
 Reset the preconditioner. More...
 
virtual void createParametersList (list_Type &list, const GetPot &dataFile, const std::string &section, const std::string &subSection)
 Create the list of parameters of the preconditioner. 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 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 void showMe (std::ostream &output=std::cout) const
 Show informations about the preconditioner. More...
 
static void createIfpackList (list_Type &list, const GetPot &dataFile, const std::string &section, const std::string &subSection="ifpack", const bool &verbose=true)
 Create the list of parameters of the preconditioner. More...
 

Set Methods

void setDataFromGetPot (const GetPot &dataFile, const std::string &section)
 Set the data of the preconditioner using a GetPot object. More...
 
Int SetUseTranspose (bool useTranspose=false)
 Set the matrix to be used transposed (or not) More...
 

Get Methods

Real condest ()
 Return An estimation of the condition number of the preconditioner. More...
 
super::prec_raw_typepreconditioner ()
 Return a raw pointer on the preconditioner. More...
 
super::prec_type preconditionerPtr ()
 Return a shared pointer on the preconditioner. More...
 
std::string preconditionerType ()
 Return the type of preconditioner. More...
 
const IntgetOverlapLevel () const
 Return the overlap level. More...
 
bool UseTranspose ()
 Return true if the preconditioner is transposed. More...
 
const Epetra_Map & OperatorRangeMap () const
 Return the Range map of the operator. More...
 
const Epetra_Map & OperatorDomainMap () const
 Return the Domain map of the operator. More...
 

Additional Inherited Members

- Public Types inherited from Preconditioner
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
 
- Public Member Functions inherited from Preconditioner
 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...
 
void setParametersList (const list_Type &list)
 The the internal list. More...
 
virtual void setSolver (SolverAztecOO &)
 Set the internal solver. More...
 
const bool & preconditionerCreated ()
 Return true if the preconditioner has been created. More...
 
const list_TypeparametersList () const
 Return the parameters list. More...
 
list_TypeparametersList ()
 Return the parameters list. More...
 

Detailed Description

PreconditionerIfpack - Class implementing overlapping Schwarz preconditioner.

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

Definition at line 68 of file PreconditionerIfpack.hpp.

Member Typedef Documentation

◆ super

Definition at line 76 of file PreconditionerIfpack.hpp.

◆ prec_raw_type

typedef Ifpack_Preconditioner prec_raw_type

Definition at line 78 of file PreconditionerIfpack.hpp.

◆ prec_type

typedef std::shared_ptr<prec_raw_type> prec_type

Definition at line 79 of file PreconditionerIfpack.hpp.

◆ operator_raw_type

◆ operator_type

Definition at line 82 of file PreconditionerIfpack.hpp.

Constructor & Destructor Documentation

◆ PreconditionerIfpack()

PreconditionerIfpack ( std::shared_ptr< Epetra_Comm >  comm = std::shared_ptr<Epetra_Comm> ( new Epetra_MpiComm ( MPI_COMM_WORLD ) ))

Empty constructor.

Definition at line 47 of file PreconditionerIfpack.cpp.

◆ ~PreconditionerIfpack()

~PreconditionerIfpack ( )
virtual

Destructor.

Definition at line 57 of file PreconditionerIfpack.cpp.

Member Function Documentation

◆ buildPreconditioner()

Int buildPreconditioner ( operator_type matrix)
virtual

Build a preconditioner based on the given matrix.

Parameters
matrixMatrix upon which construct the preconditioner

Implements Preconditioner.

Definition at line 67 of file PreconditionerIfpack.cpp.

◆ resetPreconditioner()

void resetPreconditioner ( )
virtual

Reset the preconditioner.

Implements Preconditioner.

Definition at line 100 of file PreconditionerIfpack.cpp.

◆ createParametersList()

void createParametersList ( list_Type list,
const GetPot dataFile,
const std::string &  section,
const std::string &  subSection 
)
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

Implements Preconditioner.

Definition at line 109 of file PreconditionerIfpack.cpp.

◆ createIfpackList()

void createIfpackList ( list_Type list,
const GetPot dataFile,
const std::string &  section,
const std::string &  subSection = "ifpack",
const bool &  verbose = true 
)
static

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

Definition at line 118 of file PreconditionerIfpack.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 from Preconditioner.

Definition at line 266 of file PreconditionerIfpack.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 from Preconditioner.

Definition at line 272 of file PreconditionerIfpack.cpp.

◆ showMe()

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

Show informations about the preconditioner.

Reimplemented from Preconditioner.

Definition at line 278 of file PreconditionerIfpack.cpp.

◆ setDataFromGetPot()

void setDataFromGetPot ( const GetPot dataFile,
const std::string &  section 
)
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

Implements Preconditioner.

Definition at line 287 of file PreconditionerIfpack.cpp.

◆ SetUseTranspose()

Int SetUseTranspose ( bool  useTranspose = false)
virtual

Set the matrix to be used transposed (or not)

Parameters
useTransposeIf true the preconditioner is transposed

Reimplemented from Preconditioner.

Definition at line 294 of file PreconditionerIfpack.cpp.

◆ condest()

Real condest ( )
virtual

Return An estimation of the condition number of the preconditioner.

Implements Preconditioner.

Definition at line 303 of file PreconditionerIfpack.cpp.

◆ preconditioner()

Preconditioner::prec_raw_type * preconditioner ( )
virtual

Return a raw pointer on the preconditioner.

Implements Preconditioner.

Definition at line 309 of file PreconditionerIfpack.cpp.

◆ preconditionerPtr()

PreconditionerIfpack::super::prec_type preconditionerPtr ( )
virtual

Return a shared pointer on the preconditioner.

Implements Preconditioner.

Definition at line 315 of file PreconditionerIfpack.cpp.

◆ preconditionerType()

std::string preconditionerType ( )
virtual

Return the type of preconditioner.

Implements Preconditioner.

Definition at line 321 of file PreconditionerIfpack.cpp.

◆ getOverlapLevel()

const Int & getOverlapLevel ( ) const

Return the overlap level.

Definition at line 327 of file PreconditionerIfpack.cpp.

◆ UseTranspose()

bool UseTranspose ( )
virtual

Return true if the preconditioner is transposed.

Reimplemented from Preconditioner.

Definition at line 333 of file PreconditionerIfpack.cpp.

◆ OperatorRangeMap()

const Epetra_Map & OperatorRangeMap ( ) const
virtual

Return the Range map of the operator.

Reimplemented from Preconditioner.

Definition at line 339 of file PreconditionerIfpack.cpp.

◆ OperatorDomainMap()

const Epetra_Map & OperatorDomainMap ( ) const
virtual

Return the Domain map of the operator.

Reimplemented from Preconditioner.

Definition at line 345 of file PreconditionerIfpack.cpp.

Field Documentation

◆ M_preconditioner

prec_type M_preconditioner
protected

Definition at line 211 of file PreconditionerIfpack.hpp.

◆ M_comm

std::shared_ptr<Epetra_Comm> M_comm
protected

Definition at line 212 of file PreconditionerIfpack.hpp.

◆ M_overlapLevel

Int M_overlapLevel
private

Definition at line 216 of file PreconditionerIfpack.hpp.

◆ M_operator

Definition at line 217 of file PreconditionerIfpack.hpp.


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