G+Smo
24.08.0
Geometry + Simulation Modules
|
The p-multigrid class implements a generic p-multigrid solver that can be customized by passing assembler and coarse solver as template arguments.
Public Member Functions | |
virtual gsXBraidMultigridBase & | compute (const gsSparseMatrix< T > &mat, const T tstep, const int &numDegree, index_t typeMethod) |
virtual void | prolongation (const gsMatrix< T > &Xcoarse, gsMatrix< T > &Xfine, const int &numLevels, std::vector< memory::shared_ptr< gsMultiBasis< T > > > m_bases, gsBoundaryConditions< T > bcInfo, gsMultiPatch< T > mp, std::vector< gsSparseMatrix< T > > &m_prolongation_P, std::vector< gsSparseMatrix< T > > &m_restriction_P, std::vector< gsMatrix< T > > &m_prolongation_M, std::vector< gsMatrix< T > > &m_restriction_M, std::vector< gsSparseMatrix< T > > &m_prolongation_H, std::vector< gsSparseMatrix< T > > &m_restriction_H, const gsMatrix< T > &hp) |
Prolongate coarse space function to fine space. | |
virtual void | restriction (const gsMatrix< T > &Xfine, gsMatrix< T > &Xcoarse, const int &numLevels, std::vector< memory::shared_ptr< gsMultiBasis< T > > > m_bases, gsBoundaryConditions< T > bcInfo, gsMultiPatch< T > mp, std::vector< gsSparseMatrix< T > > &m_prolongation_P, std::vector< gsSparseMatrix< T > > &m_restriction_P, std::vector< gsMatrix< T > > &m_prolongation_M, std::vector< gsMatrix< T > > &m_restriction_M, std::vector< gsSparseMatrix< T > > &m_prolongation_H, std::vector< gsSparseMatrix< T > > &m_restriction_H, const gsMatrix< T > &hp) |
Restrict fine space function to coarse space. | |
void | setup (const gsFunctionExpr< T > &rhs, gsMatrix< T > &x, gsMatrix< T > f, const int &iterTot, const int &numLevels, const int &numDegree, const int &typeMultigrid, const gsMatrix< T > &hp, const int &typeCoarseOperator, T tstep, index_t typeMethod) |
Set-up p-multigrid solver. | |
void | solve (const gsFunctionExpr< T > &rhs, gsMatrix< T > &x, gsMatrix< T > f, const int &iterTot, const int &numLevels, const int &typeMultigrid, const gsMatrix< T > &hp, const int &typeCoarseOperator) |
Apply p-multigrid solver to given right-hand side on level l. | |
virtual void | solveMG (const gsMatrix< T > &rhs, std::vector< memory::shared_ptr< gsMultiBasis< T > > > m_bases, gsMatrix< T > &x, const int &numLevels, gsBoundaryConditions< T > bcInfo, gsMultiPatch< T > mp, std::vector< gsSparseMatrix< T > > &m_prolongation_P, std::vector< gsSparseMatrix< T > > &m_restriction_P, std::vector< gsMatrix< T > > &m_prolongation_M, std::vector< gsMatrix< T > > &m_restriction_M, std::vector< gsSparseMatrix< T > > &m_prolongation_H, std::vector< gsSparseMatrix< T > > &m_restriction_H, const gsMatrix< T > &hp) |
Apply p-multigrid solver to given right-hand side on level l. | |
virtual gsMatrix< T > | solveWithGuess (const gsMatrix< T > &b, const gsMatrix< T > &x0) |
Private Types | |
typedef gsXBraidMultigridBase< T > | Base |
Base class type. | |
Private Member Functions | |
virtual void | postsmoothing (const gsMatrix< T > &rhs, gsMatrix< T > &x, const int &numLevels, gsMatrix< T > &fineCorr, gsMatrix< T > &postRes, const gsMatrix< T > &hp) |
Apply fixed number of postsmoothing steps. | |
virtual void | presmoothing (const gsMatrix< T > &rhs, gsMatrix< T > &x, const int &numLevels, gsMatrix< T > &fineRes, const gsMatrix< T > &hp) |
Apply fixed number of presmoothing steps. | |
virtual gsMatrix< T > | prolongation_M (const int &numLevels, std::vector< memory::shared_ptr< gsMultiBasis< T > > > m_bases) |
Construct prolongation operator at level numLevels. | |
virtual gsSparseMatrix< T > | prolongation_P (const int &numLevels, std::vector< memory::shared_ptr< gsMultiBasis< T > > > m_bases) |
Construct prolongation operator at level numLevels. | |
virtual gsMatrix< T > | restriction_M (const int &numLevels, std::vector< memory::shared_ptr< gsMultiBasis< T > > > m_bases) |
Construct restriction operator at level numLevels. | |
virtual gsSparseMatrix< T > | restriction_P (const int &numLevels, std::vector< memory::shared_ptr< gsMultiBasis< T > > > m_bases) |
Construct restriction operator at level numLevels. | |
virtual void | solvecoarse (const gsMatrix< T > &rhs, gsMatrix< T > &x, const int &numLevels) |
Apply coarse solver. | |
Private Attributes | |
std::vector< gsMatrix< T > > | m_A_aprox |
std::vector of std::vector of block operator objects | |
std::vector < memory::shared_ptr < gsMultiBasis< T > > > | m_bases |
std::vector of multi-basis objects | |
memory::shared_ptr < gsBoundaryConditions< T > > | m_bcInfo_ptr |
Shared pointer to boundary conditions. | |
std::vector< std::vector < gsSparseMatrix< T > > > | m_block_operator |
std::vector of std::vector of block operator objects | |
std::vector< std::vector < gsSparseMatrix< T > > > | m_ddB |
std::vector of std::vector of block operator objects | |
std::vector< std::vector < gsMatrix< T > > > | m_ddBtilde |
std::vector of std::vector of block operator objects | |
std::vector< std::vector < gsSparseMatrix< T > > > | m_ddC |
std::vector of std::vector of block operator objects | |
std::vector< std::vector < gsMatrix< T > > > | m_ddCtilde |
std::vector of std::vector of block operator objects | |
std::vector< std::vector < gsSparseMatrix< T > > > | m_ILUT |
std::vector of factorized operators | |
memory::shared_ptr < gsMultiPatch< T > > | m_mp_ptr |
Shared pointer to multi-patch geometry. | |
std::vector< gsSparseMatrix< T > > | m_operator |
std::vector of operator objects | |
std::vector< std::vector < gsEigen::PermutationMatrix < Dynamic, Dynamic, index_t > > > | m_P |
std::vector of factorized operators | |
std::vector< std::vector < gsEigen::PermutationMatrix < Dynamic, Dynamic, index_t > > > | m_Pinv |
std::vector of factorized operators | |
std::vector< gsSparseMatrix< T > > | m_prolongation_H |
std::vector of prolongation operators | |
std::vector< gsMatrix< T > > | m_prolongation_M |
std::vector of prolongation operators | |
std::vector< gsSparseMatrix< T > > | m_prolongation_P |
std::vector of prolongation operators | |
std::vector< gsSparseMatrix< T > > | m_restriction_H |
std::vector of restriction operators | |
std::vector< gsMatrix< T > > | m_restriction_M |
std::vector of restriction operators | |
std::vector< gsSparseMatrix< T > > | m_restriction_P |
std::vector of restriction operators | |
std::vector< gsSparseMatrix< T > > | m_S |
std::vector of std::vector of block operator objects | |
std::vector< typename gsPreconditionerOp< T >::Ptr > | m_SCMS |
std::vector of SCM smoother object | |
std::vector< std::vector< int > > | m_shift |
std::vector of std::vector of shift objects | |
|
inlinevirtualinherited |
Set-up p-multigrid solver