LifeV
PreconditionerYosida Class Reference

PreconditionerYosida. More...

#include <PreconditionerYosida.hpp>

+ Inheritance diagram for PreconditionerYosida:
+ Collaboration diagram for PreconditionerYosida:

Protected Attributes

int M_velocityBlockSize
 
int M_pressureBlockSize
 
FESpacePtr_Type M_uFESpace
 
FESpacePtr_Type M_pFESpace
 
Real M_timestep
 
ADRAssembler< mesh_Type, matrixBlock_Type, vector_TypeM_adrVelocityAssembler
 
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

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

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

 PreconditionerYosida (const std::shared_ptr< Epetra_Comm > &comm=std::shared_ptr< Epetra_Comm >())
 default constructor. More...
 
virtual ~PreconditionerYosida ()
 constructor from matrix A. More...
 

Methods

void createParametersList (list_Type &list, const GetPot &dataFile, const std::string &section, const std::string &subsection="Yosida")
 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 setTimestep (const Real &timestep)
 Setter for the timestep. 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

PreconditionerYosida.

Author
Gwenol Grandperrin

The PreconditionerYosida is inspired by the Yosida method

Definition at line 62 of file PreconditionerYosida.hpp.

Member Typedef Documentation

◆ mesh_Type

Definition at line 70 of file PreconditionerYosida.hpp.

◆ map_Type

Definition at line 71 of file PreconditionerYosida.hpp.

◆ matrixBlock_Type

◆ matrixBlockView_Type

◆ matrix_Type

Definition at line 74 of file PreconditionerYosida.hpp.

◆ matrixPtr_Type

typedef std::shared_ptr<matrix_Type> matrixPtr_Type

Definition at line 75 of file PreconditionerYosida.hpp.

◆ vector_Type

Definition at line 76 of file PreconditionerYosida.hpp.

◆ vectorPtr_Type

typedef std::shared_ptr<vector_Type> vectorPtr_Type

Definition at line 77 of file PreconditionerYosida.hpp.

◆ super_Type

Definition at line 79 of file PreconditionerYosida.hpp.

◆ superPtr_Type

typedef std::shared_ptr<super_Type> superPtr_Type

Definition at line 80 of file PreconditionerYosida.hpp.

◆ preconditioner_Type

◆ preconditionerPtr_Type

typedef std::shared_ptr<preconditioner_Type> preconditionerPtr_Type

Definition at line 83 of file PreconditionerYosida.hpp.

◆ FESpacePtr_Type

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

Definition at line 85 of file PreconditionerYosida.hpp.

◆ list_Type

typedef Teuchos::ParameterList list_Type

Definition at line 87 of file PreconditionerYosida.hpp.

Constructor & Destructor Documentation

◆ PreconditionerYosida() [1/3]

PreconditionerYosida ( const std::shared_ptr< Epetra_Comm > &  comm = std::shared_ptr<Epetra_Comm>())

default constructor.

Definition at line 50 of file PreconditionerYosida.cpp.

◆ ~PreconditionerYosida()

~PreconditionerYosida ( )
virtual

constructor from matrix A.

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

Definition at line 62 of file PreconditionerYosida.cpp.

◆ PreconditionerYosida() [2/3]

PreconditionerYosida ( const PreconditionerYosida P)
inlineprivate

Definition at line 181 of file PreconditionerYosida.hpp.

+ Here is the caller graph for this function:

◆ PreconditionerYosida() [3/3]

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

Definition at line 183 of file PreconditionerYosida.hpp.

+ Here is the caller graph for this function:

Member Function Documentation

◆ createParametersList()

void createParametersList ( list_Type list,
const GetPot dataFile,
const std::string &  section,
const std::string &  subSection = "Yosida" 
)
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 68 of file PreconditionerYosida.cpp.

◆ condest()

Real condest ( )
virtual

Return an estimation of the conditionement number of the preconditioner.

Reimplemented from PreconditionerComposition.

Definition at line 100 of file PreconditionerYosida.cpp.

◆ buildPreconditioner()

int buildPreconditioner ( matrixPtr_Type A)
virtual

Build the preconditioner.

Implements PreconditionerComposition.

Definition at line 106 of file PreconditionerYosida.cpp.

◆ numBlocksRows()

int numBlocksRows ( ) const

Definition at line 365 of file PreconditionerYosida.cpp.

◆ numBlocksColumns()

int numBlocksColumns ( ) const

Definition at line 371 of file PreconditionerYosida.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 377 of file PreconditionerYosida.cpp.

+ Here is the caller graph for this function:

◆ setParameters()

void setParameters ( Teuchos::ParameterList &  list)
virtual

Method to setup the solver using Teuchos::ParameterList.

Parameters
listTeuchos::ParameterList object

Implements PreconditionerComposition.

Definition at line 386 of file PreconditionerYosida.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 398 of file PreconditionerYosida.cpp.

◆ setTimestep()

void setTimestep ( const Real timestep)

Setter for the timestep.

This method set the timestep used to compute the approximate Schur complement.

Parameters
timestepTimestep used to compute the solution of the Navier-Stokes equations

Definition at line 410 of file PreconditionerYosida.cpp.

Field Documentation

◆ M_velocityBlockSize

int M_velocityBlockSize
protected

Definition at line 164 of file PreconditionerYosida.hpp.

◆ M_pressureBlockSize

int M_pressureBlockSize
protected

Definition at line 165 of file PreconditionerYosida.hpp.

◆ M_uFESpace

FESpacePtr_Type M_uFESpace
protected

Definition at line 167 of file PreconditionerYosida.hpp.

◆ M_pFESpace

FESpacePtr_Type M_pFESpace
protected

Definition at line 168 of file PreconditionerYosida.hpp.

◆ M_timestep

Real M_timestep
protected

Definition at line 169 of file PreconditionerYosida.hpp.

◆ M_adrVelocityAssembler

ADRAssembler<mesh_Type, matrixBlock_Type, vector_Type> M_adrVelocityAssembler
protected

Definition at line 171 of file PreconditionerYosida.hpp.

◆ M_dataFile

GetPot M_dataFile
protected

Definition at line 174 of file PreconditionerYosida.hpp.

◆ M_fluidPrec

std::string M_fluidPrec
protected

Definition at line 175 of file PreconditionerYosida.hpp.

◆ M_fluidDataSection

std::string M_fluidDataSection
protected

Definition at line 176 of file PreconditionerYosida.hpp.

◆ M_schurPrec

std::string M_schurPrec
protected

Definition at line 177 of file PreconditionerYosida.hpp.

◆ M_schurDataSection

std::string M_schurDataSection
protected

Definition at line 178 of file PreconditionerYosida.hpp.


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