| FEAT 3
    Finite Element Analysis Toolbox | 
Multigrid hierarchy management class template. More...
#include <multigrid.hpp>
| Classes | |
| class | LevelInfo | 
| Multigrid level info class.  More... | |
| Public Types | |
| typedef MultiGridLevelBase< SystemMatrix_, SystemFilter_, TransferOperator_ > | LevelType | 
| the level base class type  More... | |
| typedef LevelType::SolverType | SolverType | 
| the coarse-grid solver/smoother type  More... | |
| typedef MultiGridLevelStd< SystemMatrix_, SystemFilter_, TransferOperator_ > | StdLevelType | 
| the standard level class type  More... | |
| typedef LevelType::SystemFilterType | SystemFilterType | 
| the system filter type  More... | |
| typedef LevelType::SystemMatrixType | SystemMatrixType | 
| the system matrix type  More... | |
| typedef LevelType::SystemVectorType | SystemVectorType | 
| the system vector type  More... | |
| typedef LevelType::TransferOperatorType | TransferOperatorType | 
| the transfer operator type  More... | |
| Public Member Functions | |
| MultiGridHierarchy (std::size_t size_virt) | |
| Constructor.  More... | |
| virtual | ~MultiGridHierarchy () | 
| Destructor.  More... | |
| void | done () | 
| Finalization method.  More... | |
| void | done_numeric () | 
| Numeric finalization method.  More... | |
| void | done_symbolic () | 
| Symbolic finalization method.  More... | |
| LevelType & | get_level (Index lvl) | 
| Returns a level in the hierarchy.  More... | |
| const LevelType & | get_level (Index lvl) const | 
| Returns a level in the hierarchy.   More... | |
| double | get_time_coarse (int lvl=-1) const | 
| Returns the time for coarse grid solver application.  More... | |
| double | get_time_defect (int lvl=-1) const | 
| Returns the time for defect computation.  More... | |
| double | get_time_smooth (int lvl=-1) const | 
| Returns the time for smoother application.  More... | |
| double | get_time_transfer (int lvl=-1) const | 
| Returns the time for grid transfer application.  More... | |
| bool | have_numeric () const | 
| Specifies whether the symbolic initialization was performed.  More... | |
| bool | have_symbolic () const | 
| Specifies whether the symbolic initialization was performed.  More... | |
| void | init () | 
| Initialization method.  More... | |
| void | init_numeric () | 
| Numeric initialization method.  More... | |
| void | init_symbolic () | 
| Symbolic initialization method.  More... | |
| void | push_level (const SystemMatrixType &system_matrix, const SystemFilterType &system_filter, const TransferOperatorType &transfer_operator, std::shared_ptr< SolverType > smoother_pre, std::shared_ptr< SolverType > smoother_post, std::shared_ptr< SolverType > smoother_peak, std::shared_ptr< SolverType > coarse_solver=nullptr) | 
| Pushes a standard refined level into the hierarchy.  More... | |
| void | push_level (const SystemMatrixType &system_matrix, const SystemFilterType &system_filter, std::shared_ptr< SolverType > coarse_solver) | 
| Pushes a standard coarse-grid level into the hierarchy.  More... | |
| void | push_level (std::shared_ptr< LevelType > level) | 
| Pushes a new (custom) level into the hierarchy.  More... | |
| void | reset_timings () | 
| Resets the internal timing statistics.  More... | |
| Index | size_physical () const | 
| Returns the physical hierarchy size.  More... | |
| Index | size_virtual () const | 
| Returns the virtual hierarchy size.  More... | |
| Protected Member Functions | |
| LevelInfo & | _get_level_info (Index lvl) | 
| Returns a level info in the hierarchy.  More... | |
| Protected Attributes | |
| bool | _have_init_numeric | 
| specifies whether init_numeric() has been called  More... | |
| bool | _have_init_symbolic | 
| specifies whether init_symbolic() has been called  More... | |
| std::deque< LevelInfo > | _levels | 
| the deque of all level info objects  More... | |
| std::size_t | _virt_size | 
| the virtual multigrid hierarchy sizes  More... | |
| Friends | |
| class | MultiGrid< SystemMatrix_, SystemFilter_, TransferOperator_ > | 
| MultiGrid is our friend.  More... | |
Multigrid hierarchy management class template.
| SystemMatrix_ | The class representing the system matrix. | 
| SystemFilter_ | The class representing the system filter. | 
| TransferOperator_ | The class representing the transfer operator. | 
Definition at line 417 of file multigrid.hpp.
| typedef MultiGridLevelBase<SystemMatrix_, SystemFilter_, TransferOperator_> FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::LevelType | 
the level base class type
Definition at line 424 of file multigrid.hpp.
| typedef LevelType::SolverType FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::SolverType | 
the coarse-grid solver/smoother type
Definition at line 437 of file multigrid.hpp.
| typedef MultiGridLevelStd<SystemMatrix_, SystemFilter_, TransferOperator_> FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::StdLevelType | 
the standard level class type
Definition at line 426 of file multigrid.hpp.
| typedef LevelType::SystemFilterType FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::SystemFilterType | 
the system filter type
Definition at line 431 of file multigrid.hpp.
| typedef LevelType::SystemMatrixType FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::SystemMatrixType | 
the system matrix type
Definition at line 429 of file multigrid.hpp.
| typedef LevelType::SystemVectorType FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::SystemVectorType | 
the system vector type
Definition at line 433 of file multigrid.hpp.
| typedef LevelType::TransferOperatorType FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::TransferOperatorType | 
the transfer operator type
Definition at line 435 of file multigrid.hpp.
| 
 | inlineexplicit | 
Constructor.
| [in] | size_virt | The virtual multigrid hierarchy size on all processes. | 
Definition at line 586 of file multigrid.hpp.
| 
 | inlinevirtual | 
Destructor.
Definition at line 597 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_levels.
| 
 | inlineprotected | 
Returns a level info in the hierarchy.
| [in] | lvl | The index of the level info to be returned. | 
Definition at line 563 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_levels, FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::size_physical(), and XASSERTM.
| 
 | inline | 
Finalization method.
This function performs both the symbolic and numeric finalization, i.e. it simply performs
this->done_numeric(); this->done_symbolic();
Definition at line 827 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::done_numeric(), and FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::done_symbolic().
| 
 | inline | 
Numeric finalization method.
This method is called to release any data allocated in the numeric initialization step of the sub-solvers in the multigrid hierarchy.
Definition at line 792 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_have_init_numeric, FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_levels, and XASSERTM.
Referenced by FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::done().
| 
 | inline | 
Symbolic finalization method.
This method is called to release any data allocated in the symbolic initialization step of the sub-solvers in the multigrid hierarchy.
Definition at line 755 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_have_init_numeric, FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_have_init_symbolic, FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_levels, and XASSERTM.
Referenced by FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::done().
| 
 | inline | 
Returns a level in the hierarchy.
| [in] | lvl | The index of the level to be returned. | 
Definition at line 718 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_levels, FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::size_physical(), and XASSERTM.
| 
 | inline | 
Returns a level in the hierarchy.
| [in] | lvl | The index of the level to be returned. | 
Definition at line 725 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_levels, FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::size_physical(), and XASSERTM.
| 
 | inline | 
Returns the time for coarse grid solver application.
| [in] | lvl | The level for which the timing is to be retrieved. If set to -1, the sum of all level timings is returned. | 
Definition at line 896 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_levels, and XASSERT.
| 
 | inline | 
Returns the time for defect computation.
| [in] | lvl | The level for which the timing is to be retrieved. If set to -1, the sum of all level timings is returned. | 
Definition at line 919 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_levels, and XASSERT.
| 
 | inline | 
Returns the time for smoother application.
| [in] | lvl | The level for which the timing is to be retrieved. If set to -1, the sum of all level timings is returned. | 
Definition at line 873 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_levels, and XASSERT.
| 
 | inline | 
Returns the time for grid transfer application.
| [in] | lvl | The level for which the timing is to be retrieved. If set to -1, the sum of all level timings is returned. | 
Definition at line 942 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_levels, and XASSERT.
| 
 | inline | 
Specifies whether the symbolic initialization was performed.
true between a call of init_symbolic() and done_symbolic(), otherwise false. Definition at line 850 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_have_init_numeric.
| 
 | inline | 
Specifies whether the symbolic initialization was performed.
true between a call of init_symbolic() and done_symbolic(), otherwise false. Definition at line 839 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_have_init_symbolic.
| 
 | inline | 
Initialization method.
This function performs both the symbolic and numeric initialization, i.e. it simply performs
this->init_symbolic(); this->init_numeric();
Definition at line 812 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::init_numeric(), and FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::init_symbolic().
| 
 | inline | 
Numeric initialization method.
This method is called to perform numeric initialization of the sub-solvers in the multigrid hierarchy.
Before this function can be called, the symbolic initialization must be performed. 
Definition at line 774 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_have_init_numeric, FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_have_init_symbolic, FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_levels, and XASSERTM.
Referenced by FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::init().
| 
 | inline | 
Symbolic initialization method.
This method is called to perform symbolic initialization of the sub-solvers in the multigrid hierarchy.
Definition at line 737 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_have_init_numeric, FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_have_init_symbolic, FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_levels, and XASSERTM.
Referenced by FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::init().
| 
 | inline | 
Pushes a standard refined level into the hierarchy.
| [in] | system_matrix | A reference to the system matrix. | 
| [in] | system_filter | A reference to the system filter. | 
| [in] | transfer_operator | A reference to the transfer operator onto this level. | 
| [in] | smoother_pre | A shared pointer to the pre-smoother. May be nullptrif no pre-smoother is to be used. | 
| [in] | smoother_post | A shared pointer to the post-smoother. May be nullptrif no post-smoother is to be used. | 
| [in] | smoother_peak | A shared pointer to the peak-smoother. Is set to nullptr, the multigrid will use both the pre- and post-smoothers as the peak-smoother. | 
| [in] | coarse_solver | A shared pointer to the coarse grid solver. This one is usually nullptr, unless one wants to use this refined level also as a coarse-grid level. | 
smoother_pre, smoother_post, smoother_peak and coarse_solver pointers need not point to different objects. This class will ensure the correct handling of unique solver objects independent of whether more that one pointer references the same unique object on one level. Definition at line 675 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::push_level().
| 
 | inline | 
Pushes a standard coarse-grid level into the hierarchy.
| [in] | system_matrix | A reference to the system matrix. | 
| [in] | system_filter | A reference to the system filter. | 
| [in] | coarse_solver | A shared pointer to the coarse grid solver. May be nullptrif no coarse-grid solver is to be used. | 
Definition at line 631 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::push_level().
| 
 | inline | 
Pushes a new (custom) level into the hierarchy.
| [in] | level | A shared pointer to the new level. | 
Definition at line 610 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_have_init_numeric, FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_have_init_symbolic, FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_levels, FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_virt_size, and XASSERTM.
Referenced by FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::push_level().
| 
 | inline | 
Resets the internal timing statistics.
Definition at line 858 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_levels.
| 
 | inline | 
Returns the physical hierarchy size.
Definition at line 694 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_levels.
Referenced by FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_get_level_info(), and FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::get_level().
| 
 | inline | 
Returns the virtual hierarchy size.
Definition at line 704 of file multigrid.hpp.
References FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_virt_size.
| 
 | friend | 
MultiGrid is our friend.
Definition at line 384 of file multigrid.hpp.
| 
 | protected | 
specifies whether init_numeric() has been called
Definition at line 577 of file multigrid.hpp.
Referenced by FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::done_numeric(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::done_symbolic(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::have_numeric(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::init_numeric(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::init_symbolic(), and FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::push_level().
| 
 | protected | 
specifies whether init_symbolic() has been called
Definition at line 575 of file multigrid.hpp.
Referenced by FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::done_symbolic(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::have_symbolic(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::init_numeric(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::init_symbolic(), and FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::push_level().
| 
 | protected | 
the deque of all level info objects
Definition at line 571 of file multigrid.hpp.
Referenced by FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::~MultiGridHierarchy(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::_get_level_info(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::done_numeric(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::done_symbolic(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::get_level(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::get_time_coarse(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::get_time_defect(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::get_time_smooth(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::get_time_transfer(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::init_numeric(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::init_symbolic(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::push_level(), FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::reset_timings(), and FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::size_physical().
| 
 | protected | 
the virtual multigrid hierarchy sizes
Definition at line 573 of file multigrid.hpp.
Referenced by FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::push_level(), and FEAT::Solver::MultiGridHierarchy< SystemMatrix_, SystemFilter_, TransferOperator_ >::size_virtual().