LifeV
MonolithicBlockComposedDND Class Reference

MonolithicBlockComposedDND - Modular preconditioner for (e.g.) geometry implicit monolithic FSI, three factors splitting. More...

#include <MonolithicBlockComposedDND.hpp>

+ Inheritance diagram for MonolithicBlockComposedDND:
+ Collaboration diagram for MonolithicBlockComposedDND:

Static Public Member Functions

static MonolithicBlockcreateComposedDNDGI ()
 
static MonolithicBlockcreateComposedDND2GI ()
 
- Static Public Member Functions inherited from MonolithicBlockComposedDN
static MonolithicBlockcreateComposedDN ()
 
static MonolithicBlockcreateComposedDN2 ()
 
static MonolithicBlockcreateComposedDNGI ()
 
static MonolithicBlockcreateComposedDN2GI ()
 

Public Types

typedef MonolithicBlockComposedDN super_Type
 

Constructors and destructor

 MonolithicBlockComposedDND (const std::vector< Int > &flag, const std::vector< Int > &order)
 
 ~MonolithicBlockComposedDND ()
 

Public Methods

void blockAssembling ()
 sums the coupling matrices with the corresponding blocks More...
 

Protected Members

bool M_swapped
 

Additional Inherited Members

- Public Types inherited from MonolithicBlockComposedDN
typedef MonolithicBlockComposed super_Type
 
- Public Types inherited from MonolithicBlockComposed
enum  Block { solid, fluid, mesh }
 
typedef MonolithicBlock super_Type
 
typedef super_Type::fespacePtr_Type fespacePtr_Type
 
typedef ComposedOperator< Epetra_OperatoroperatorPtr_Type
 
- Public Types inherited from MonolithicBlock
typedef VectorEpetra vector_Type
 
typedef std::shared_ptr< vector_TypevectorPtr_Type
 
typedef MatrixEpetra< Realmatrix_Type
 
typedef std::shared_ptr< matrix_TypematrixPtr_Type
 
typedef std::shared_ptr< Epetra_OperatorepetraOperatorPtr_Type
 
typedef std::shared_ptr< Preconditionerepetra_preconditioner_ptrtype
 
typedef matrix_Type::matrix_type epetraMatrix_Type
 
typedef SolverAztecOO solver_Type
 
typedef std::shared_ptr< SolverAztecOOsolverPtr_Type
 
typedef FESpace< RegionMesh< LinearTetra >, MapEpetrafespace_Type
 
typedef std::shared_ptr< fespace_TypefespacePtr_Type
 
typedef std::shared_ptr< MapEpetramapPtr_Type
 
typedef std::shared_ptr< BCHandlerbchandlerPtr_Type
 
- Public Member Functions inherited from MonolithicBlockComposedDN
 MonolithicBlockComposedDN (const std::vector< Int > &flag, const std::vector< Int > &order)
 
void setDataFromGetPot (const GetPot &dataFile, const std::string &section)
 sets the parameters related to M_blockPrecs from the data file More...
 
int solveSystem (const vector_Type &rhs, vector_Type &step, solverPtr_Type &linearSolver)
 Solves the preconditioned linear system. More...
 
virtual void coupler (mapPtr_Type &map, const std::map< ID, ID > &locDofMap, const vectorPtr_Type &numerationInterface, const Real &timeStep, const Real &coefficient, const Real &rescaleFactor)
 Computes the coupling. More...
 
virtual void push_back_precs (matrixPtr_Type &Mat)
 pushes back the preconditioner for a block More...
 
bool set ()
 returns the true if the preconditioner has at leas one factor computed More...
 
void setComm (std::shared_ptr< Epetra_Comm > comm)
 
const std::vector< std::shared_ptr< Preconditioner > > & blockPrecs () const
 
- Public Member Functions inherited from MonolithicBlockComposed
 MonolithicBlockComposed (const std::vector< Int > &flags, const std::vector< Int > &order)
 Constructor. More...
 
 ~MonolithicBlockComposed ()
 
void GlobalAssemble ()
 runs GlobalAssemble on the blocks More...
 
void coupler (mapPtr_Type &map, const std::map< ID, ID > &locDofMap, const vectorPtr_Type &numerationInterface, const Real &timeStep, const Real &coefficient, const Real &rescaleFactor, UInt couplingBlock)
 adds a default coupling matrix for a specified block. More...
 
virtual void push_back_matrix (const matrixPtr_Type &Mat, const bool recompute)
 pushes a block at the end of the vector More...
 
virtual void push_back_oper (MonolithicBlockComposed &Oper)
 Merges an input MonolithicBlockComposed operator with this one. More...
 
virtual void push_back_coupling (matrixPtr_Type &coupling)
 Pushes an extra coupling matrix at the end of the vector of coupling matrices. More...
 
virtual void replace_matrix (const matrixPtr_Type &oper, UInt position)
 replaces a block More...
 
virtual void replace_coupling (const matrixPtr_Type &Mat, UInt index)
 replaces a coupling block More...
 
virtual void addToCoupling (const matrixPtr_Type &Mat, UInt position)
 pushes a block at the end of the vector More...
 
void addToCoupling (const Real &entry, UInt row, UInt col, UInt position)
 
const std::vector< bool > & recompute ()
 returns the vector of flags (by const reference). More...
 
const std::vector< matrixPtr_Type > & couplingVector () const
 returns the vector of pointers to the coupling blocks (by const reference). More...
 
void setRecompute (UInt position, bool flag)
 turns on/off the recomputation of the preconditioner for a specified factor More...
 
const UInt whereIsBlock (UInt position) const
 
- Public Member Functions inherited from MonolithicBlock
virtual void replace_bch (bchandlerPtr_Type &, UInt)
 replaces a BCHandler More...
 
virtual void applyBoundaryConditions (const Real &time)
 Applies the correspondent boundary conditions to every block. More...
 
virtual void applyBoundaryConditions (const Real &time, const UInt block)
 Applies the correspondent boundary conditions to a specified block. More...
 
virtual void resetBlocks ()
 resets the blocks (frees the shared pointers) More...
 
virtual void reset ()
 resets the blocks, boundary conditions, FE spaces. More...
 
virtual void setRobin (matrixPtr_Type &, vectorPtr_Type &)
 Applies the robin preconditioners. More...
 
void couplingMatrix (matrixPtr_Type &bigMatrix, Int flag, const std::vector< fespacePtr_Type > &problem, const std::vector< UInt > &offset, const std::map< ID, ID > &locDofMap, const vectorPtr_Type &numerationInterface, const Real &timeStep=1.e-3, const Real &value=1., const Real &coefficient=1., const Real &rescaleFactor=1.)
 builds the coupling matrix. More...
 
void setConditions (std::vector< bchandlerPtr_Type > &vec)
 sets the vector of raw pointer to the BCHandler More...
 
void setSpaces (std::vector< fespacePtr_Type > &vec)
 sets the vector of raw pointer to the FESpaces More...
 
void setOffsets (UInt blocks,...)
 sets the vector of raw pointer to the offsets of the different blocks More...
 
void robinCoupling (MonolithicBlock::matrixPtr_Type &matrix, Real &alphaf, Real &alphas, UInt coupling, const MonolithicBlock::fespacePtr_Type &FESpace1, const UInt &offset1, const MonolithicBlock::fespacePtr_Type &FESpace2, const UInt &offset2, const std::map< ID, ID > &locDofMap, const MonolithicBlock::vectorPtr_Type &numerationInterface)
 computes the Robin coupling matrix More...
 
virtual void addToBlock (const matrixPtr_Type &Mat, UInt position)
 
virtual void push_back_oper (MonolithicBlock &Oper)
 Pushes a new block. More...
 
 MonolithicBlock ()
 Empty Constructor. More...
 
virtual ~MonolithicBlock ()
 Destructor. More...
 
virtual void setupSolver (solver_Type &, const GetPot &)
 Sets the parameters needed by the preconditioner from data file. More...
 
virtual void replace_precs (const epetraOperatorPtr_Type &, UInt)
 replace a block preconditioner More...
 
virtual void push_back_precs (const epetraOperatorPtr_Type &)
 pushes back a block preconditioner More...
 
const std::vector< matrixPtr_Type > & blockVector ()
 returns the vector of pointers to the blocks (by const reference). More...
 
const std::vector< bchandlerPtr_Type > & BChVector ()
 returns the vector of pointers to the BCHandlers (by const reference). More...
 
const std::vector< fespacePtr_Type > & FESpaceVector ()
 returns the vector of pointers to the FE spaces (by const reference). More...
 
const std::vector< UInt > & offsetVector ()
 returns the vector of the offsets (by const reference). More...
 
- Protected Member Functions inherited from MonolithicBlockComposedDN
virtual void replace_precs (matrixPtr_Type &Mat, UInt position)
 Protected Methods. More...
 
- Protected Member Functions inherited from MonolithicBlockComposed
void blockAssembling (const UInt k)
 sums the coupling matrix in the specified position with the corresponding block More...
 
virtual void swap (const UInt i, const UInt j)
 swaps the blocks More...
 
- Protected Member Functions inherited from MonolithicBlock
template<typename Operator >
void swap (std::shared_ptr< Operator > &operFrom, std::shared_ptr< Operator > &OperTo)
 swaps two std::shared_ptr. The tamplate argument of the shared_ptr is templated More...
 
template<typename Operator >
void insert (std::vector< Operator > &operFrom, std::vector< Operator > &OperTo)
 swaps two std::shared_ptr. The tamplate argument of the shared_ptr is templated More...
 
- Protected Attributes inherited from MonolithicBlockComposedDN
std::shared_ptr< PreconditionerComposedM_blockPrecs
 
- Protected Attributes inherited from MonolithicBlockComposed
std::vector< bool > M_recompute
 vector of flags saying if the matrix is to be recomputed every time More...
 
std::vector< matrixPtr_TypeM_coupling
 vector of coupling matrices More...
 
std::unique_ptr< std::vector< Int > > M_couplingFlags
 vector of flags specifying the coupling strategy for each block. More...
 
std::unique_ptr< std::vector< Int > > M_blockReordering
 vector of reordering for the different blocks. More...
 
- Protected Attributes inherited from MonolithicBlock
std::vector< bchandlerPtr_TypeM_bch
 
std::vector< matrixPtr_TypeM_blocks
 
std::vector< fespacePtr_TypeM_FESpace
 
std::vector< UIntM_offset
 
vectorPtr_Type M_numerationInterface
 
std::shared_ptr< Epetra_Comm > M_comm
 

Detailed Description

MonolithicBlockComposedDND - Modular preconditioner for (e.g.) geometry implicit monolithic FSI, three factors splitting.

Author
Paolo Crosetto

Class implementing a modular preconditioner for FSI with the fluid geometry implicit. The preconditioner si split into three factor, which can be recomputed every time or reused.

Definition at line 53 of file MonolithicBlockComposedDND.hpp.

Member Typedef Documentation

◆ super_Type

Constructor & Destructor Documentation

◆ MonolithicBlockComposedDND()

MonolithicBlockComposedDND ( const std::vector< Int > &  flag,
const std::vector< Int > &  order 
)
inline

Definition at line 66 of file MonolithicBlockComposedDND.hpp.

◆ ~MonolithicBlockComposedDND()

Definition at line 72 of file MonolithicBlockComposedDND.hpp.

Member Function Documentation

◆ blockAssembling()

void blockAssembling ( )
virtual

sums the coupling matrices with the corresponding blocks

Everything (but the boundary conditions assembling) must have been set before calling this

Reimplemented from MonolithicBlockComposed.

Definition at line 35 of file MonolithicBlockComposedDND.cpp.

◆ createComposedDNDGI()

static MonolithicBlock* createComposedDNDGI ( )
inlinestatic

Definition at line 84 of file MonolithicBlockComposedDND.hpp.

◆ createComposedDND2GI()

static MonolithicBlock* createComposedDND2GI ( )
inlinestatic

Definition at line 93 of file MonolithicBlockComposedDND.hpp.

Field Documentation

◆ M_swapped

bool M_swapped
private

Definition at line 108 of file MonolithicBlockComposedDND.hpp.


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