LifeV
PreconditionerSIMPLE Class Reference

PreconditionerSIMPLE. More...

#include <PreconditionerSIMPLE.hpp>

+ Inheritance diagram for PreconditionerSIMPLE:
+ Collaboration diagram for PreconditionerSIMPLE:

Protected Attributes

int M_velocityBlockSize
 
int M_pressureBlockSize
 
FESpacePtr_Type M_uFESpace
 
FESpacePtr_Type M_pFESpace
 
Real M_dampingFactor
 
std::string M_SIMPLEType
 
GetPot M_dataFile
 
std::string M_fluidPrec
 
std::string M_fluidDataSection
 
std::string M_schurPrec
 
std::string M_schurDataSection
 
- Protected Attributes inherited from PreconditionerComposition
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 Member Functions

 PreconditionerSIMPLE (const PreconditionerSIMPLE &P)
 
 PreconditionerSIMPLE (const std::shared_ptr< PreconditionerSIMPLE > &)
 

Public Types

typedef RegionMesh< LinearTetramesh_Type
 
typedef MapEpetra map_Type
 
typedef MatrixEpetraStructured< RealmatrixBlock_Type
 
typedef MatrixEpetraStructuredView< RealmatrixBlockView_Type
 
typedef MatrixEpetra< Realmatrix_Type
 
typedef std::shared_ptr< matrix_TypematrixPtr_Type
 
typedef VectorEpetra vector_Type
 
typedef std::shared_ptr< vector_TypevectorPtr_Type
 
typedef Preconditioner super_Type
 
typedef std::shared_ptr< super_TypesuperPtr_Type
 
typedef ComposedOperator< Preconditionerpreconditioner_Type
 
typedef std::shared_ptr< preconditioner_TypepreconditionerPtr_Type
 
typedef std::shared_ptr< FESpace< mesh_Type, map_Type > > FESpacePtr_Type
 
typedef Teuchos::ParameterList list_Type
 

Constructors, destructor

 PreconditionerSIMPLE (std::shared_ptr< Epetra_Comm > comm=std::shared_ptr< Epetra_Comm >(new Epetra_MpiComm(MPI_COMM_WORLD)))
 default constructor More...
 
virtual ~PreconditionerSIMPLE ()
 constructor from matrix A. More...
 

Methods

void createParametersList (list_Type &list, const GetPot &dataFile, const std::string &section, const std::string &subsection="SIMPLE")
 Create the list of parameters of the preconditioner. More...
 
double condest ()
 Return an estimation of the conditionement number of the preconditioner. More...
 
int buildPreconditioner (matrixPtr_Type &A)
 Build the preconditioner. More...
 

Get Methods

int numBlocksRows () const
 
int numBlocksColumns () const
 

Set Methods

void setDataFromGetPot (const GetPot &dataFile, const std::string &section)
 Setter using GetPot. More...
 
virtual void setParameters (Teuchos::ParameterList &list)
 Method to setup the solver using Teuchos::ParameterList. More...
 
void setFESpace (FESpacePtr_Type uFESpace, FESpacePtr_Type pFESpace)
 Setter for the FESpace. More...
 
void setDampingFactor (const Real &dampingFactor)
 Setter for the damping factor. More...
 

Additional Inherited Members

- Public Types inherited from PreconditionerComposition
typedef Preconditioner super_Type
 
typedef std::shared_ptr< super_TypesuperPtr_Type
 
typedef Epetra_Operator operator_Type
 
typedef std::shared_ptr< operator_TypeoperatorPtr_Type
 
typedef ComposedOperator< operator_Typeprec_Type
 
typedef std::shared_ptr< prec_TypeprecPtr_Type
 
typedef MatrixEpetra< Realmatrix_Type
 
typedef std::shared_ptr< matrix_TypematrixPtr_Type
 
typedef Teuchos::ParameterList list_Type
 
- 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 PreconditionerComposition
 PreconditionerComposition (std::shared_ptr< Epetra_Comm > comm=std::shared_ptr< Epetra_Comm >(new Epetra_MpiComm(MPI_COMM_WORLD)))
 Constructor. More...
 
 ~PreconditionerComposition ()
 Destructor. More...
 
void resetPreconditioner ()
 Reset the preconditioner. More...
 
Int SetUseTranspose (const bool useTranspose=false)
 Set the matrix to be used transposed (or not) More...
 
Int Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Apply the inverse of the preconditioner on vector1 and store the result in vector2. More...
 
Int ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
 Apply the inverse of the preconditioner on vector1 and store the result in vector2. 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...
 
void setComm (std::shared_ptr< Epetra_Comm > comm)
 
bool isPreconditionerSet () const
 Preconditioner is set? More...
 
operator_Typepreconditioner ()
 Get a standard pointer to the preconditioner. More...
 
operatorPtr_Type preconditionerPtr ()
 get a std::shared_ptr to the preconditioner. More...
 
virtual std::string preconditionerType ()
 Return the type name of the preconditioner. More...
 
UInt numOperators () const
 Return the number of operators in the composition. More...
 
- 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...
 
virtual Int buildPreconditioner (operator_type &matrix)=0
 Build a preconditioner based on the given matrix. More...
 
virtual void showMe (std::ostream &output=std::cout) const
 Show informations about the preconditioner. 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...
 
- Protected Member Functions inherited from PreconditionerComposition
int pushBack (matrixPtr_Type A, const bool useInverse=false, const bool useTranspose=false)
 Add A to the right of the composition. More...
 
int pushBack (operatorPtr_Type oper, const bool useInverse=false, const bool useTranspose=false, matrixPtr_Type baseMatrix=matrixPtr_Type())
 
int pushBack (matrixPtr_Type A, superPtr_Type preconditioner, const bool useInverse=false, const bool useTranspose=false)
 Use a preconditioner to build the inverse of A and add it to the right of the composition. More...
 
int pushBack (matrixPtr_Type embeddedA, superPtr_Type preconditioner, const VectorBlockStructure &blockStructure, const UInt &blockIndex, const MapEpetra &fullMap, const bool useInverse=false, const bool useTranspose=false, const bool buildPreconditioner=true)
 Use a preconditioner to build the inverse of A and add it to the right of the composition. More...
 
int pushBack (operatorPtr_Type embeddedOperator, const VectorBlockStructure &blockStructure, const UInt &blockIndex, const MapEpetra &fullMap, const bool useInverse, const bool useTranspose)
 

Detailed Description

PreconditionerSIMPLE.

Author
Gwenol Grandperrin

The PreconditionerSIMPLE class provides the SIMPLE block preconditioner

Definition at line 64 of file PreconditionerSIMPLE.hpp.

Member Typedef Documentation

◆ mesh_Type

Definition at line 72 of file PreconditionerSIMPLE.hpp.

◆ map_Type

Definition at line 73 of file PreconditionerSIMPLE.hpp.

◆ matrixBlock_Type

◆ matrixBlockView_Type

◆ matrix_Type

Definition at line 76 of file PreconditionerSIMPLE.hpp.

◆ matrixPtr_Type

typedef std::shared_ptr<matrix_Type> matrixPtr_Type

Definition at line 77 of file PreconditionerSIMPLE.hpp.

◆ vector_Type

Definition at line 78 of file PreconditionerSIMPLE.hpp.

◆ vectorPtr_Type

typedef std::shared_ptr<vector_Type> vectorPtr_Type

Definition at line 79 of file PreconditionerSIMPLE.hpp.

◆ super_Type

Definition at line 81 of file PreconditionerSIMPLE.hpp.

◆ superPtr_Type

typedef std::shared_ptr<super_Type> superPtr_Type

Definition at line 82 of file PreconditionerSIMPLE.hpp.

◆ preconditioner_Type

◆ preconditionerPtr_Type

typedef std::shared_ptr<preconditioner_Type> preconditionerPtr_Type

Definition at line 85 of file PreconditionerSIMPLE.hpp.

◆ FESpacePtr_Type

typedef std::shared_ptr<FESpace<mesh_Type, map_Type> > FESpacePtr_Type

Definition at line 87 of file PreconditionerSIMPLE.hpp.

◆ list_Type

typedef Teuchos::ParameterList list_Type

Definition at line 89 of file PreconditionerSIMPLE.hpp.

Constructor & Destructor Documentation

◆ PreconditionerSIMPLE() [1/3]

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

default constructor

Definition at line 50 of file PreconditionerSIMPLE.cpp.

+ Here is the caller graph for this function:

◆ ~PreconditionerSIMPLE()

~PreconditionerSIMPLE ( )
virtual

constructor from matrix A.

Parameters
AEpetraMatrix<double> matrix upon which construct the preconditioner default destructor

Definition at line 60 of file PreconditionerSIMPLE.cpp.

◆ PreconditionerSIMPLE() [2/3]

PreconditionerSIMPLE ( const PreconditionerSIMPLE P)
inlineprivate

Definition at line 187 of file PreconditionerSIMPLE.hpp.

+ Here is the caller graph for this function:

◆ PreconditionerSIMPLE() [3/3]

PreconditionerSIMPLE ( const std::shared_ptr< PreconditionerSIMPLE > &  )
inlineprivate

Definition at line 189 of file PreconditionerSIMPLE.hpp.

Member Function Documentation

◆ createParametersList()

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

Definition at line 66 of file PreconditionerSIMPLE.cpp.

◆ condest()

Real condest ( )
virtual

Return an estimation of the conditionement number of the preconditioner.

Reimplemented from PreconditionerComposition.

Definition at line 101 of file PreconditionerSIMPLE.cpp.

◆ buildPreconditioner()

int buildPreconditioner ( matrixPtr_Type A)
virtual

Build the preconditioner.

Implements PreconditionerComposition.

Definition at line 107 of file PreconditionerSIMPLE.cpp.

◆ numBlocksRows()

int numBlocksRows ( ) const

Definition at line 387 of file PreconditionerSIMPLE.cpp.

◆ numBlocksColumns()

int numBlocksColumns ( ) const

Definition at line 393 of file PreconditionerSIMPLE.cpp.

◆ setDataFromGetPot()

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

Setter using GetPot.

This method use GetPot to load data from a file and then set the preconditioner.

Parameters
dataFileis a GetPot dataFile
sectionis the section containing the data

Implements PreconditionerComposition.

Definition at line 399 of file PreconditionerSIMPLE.cpp.

◆ setParameters()

void setParameters ( Teuchos::ParameterList &  list)
virtual

Method to setup the solver using Teuchos::ParameterList.

Parameters
listTeuchos::ParameterList object

Implements PreconditionerComposition.

Definition at line 408 of file PreconditionerSIMPLE.cpp.

◆ setFESpace()

void setFESpace ( FESpacePtr_Type  uFESpace,
FESpacePtr_Type  pFESpace 
)

Setter for the FESpace.

This method set the pointer for the FESpaces needed for the construction of the operators Ap, Fp and Mp.

Parameters
uFESpacestd::shared_ptr on the FESpace for the velocity
pFESpacestd::shared_ptr on the FESpace for the pressure

Definition at line 421 of file PreconditionerSIMPLE.cpp.

◆ setDampingFactor()

void setDampingFactor ( const Real dampingFactor)

Setter for the damping factor.

This method set damping factor used to build the preconditioner

Parameters
dampingFactorDamping factor

Definition at line 431 of file PreconditionerSIMPLE.cpp.

+ Here is the caller graph for this function:

Field Documentation

◆ M_velocityBlockSize

int M_velocityBlockSize
protected

Definition at line 170 of file PreconditionerSIMPLE.hpp.

◆ M_pressureBlockSize

int M_pressureBlockSize
protected

Definition at line 171 of file PreconditionerSIMPLE.hpp.

◆ M_uFESpace

FESpacePtr_Type M_uFESpace
protected

Definition at line 172 of file PreconditionerSIMPLE.hpp.

◆ M_pFESpace

FESpacePtr_Type M_pFESpace
protected

Definition at line 173 of file PreconditionerSIMPLE.hpp.

◆ M_dampingFactor

Real M_dampingFactor
protected

Definition at line 175 of file PreconditionerSIMPLE.hpp.

◆ M_SIMPLEType

std::string M_SIMPLEType
protected

Definition at line 177 of file PreconditionerSIMPLE.hpp.

◆ M_dataFile

GetPot M_dataFile
protected

Definition at line 180 of file PreconditionerSIMPLE.hpp.

◆ M_fluidPrec

std::string M_fluidPrec
protected

Definition at line 181 of file PreconditionerSIMPLE.hpp.

◆ M_fluidDataSection

std::string M_fluidDataSection
protected

Definition at line 182 of file PreconditionerSIMPLE.hpp.

◆ M_schurPrec

std::string M_schurPrec
protected

Definition at line 183 of file PreconditionerSIMPLE.hpp.

◆ M_schurDataSection

std::string M_schurDataSection
protected

Definition at line 184 of file PreconditionerSIMPLE.hpp.


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