AlgebraicMultigrid 0.1
C++ algebraic multigrid.
Loading...
Searching...
No Matches
AMG::InterpolatorBase< EleType > Class Template Referenceabstract

Base class for interpolators that implement prolongation and restriction as linear operators constructed by the make_operators virtual function. More...

#include <interpolator.hpp>

Inheritance diagram for AMG::InterpolatorBase< EleType >:
AMG::LinearInterpolator< EleType >

Public Member Functions

 InterpolatorBase (size_t n_levels)
 
 InterpolatorBase ()
 Construct a new Interpolator Base object.
 
virtual void make_operators (size_t n_h_dofs, size_t n_H_dofs, size_t level)=0
 Construct P and R matrices based on dofs and level information.
 
Eigen::Matrix< EleType, -1, 1 > prolongation (const Eigen::Matrix< EleType, -1, 1 > &v, size_t level)
 Prolongation operator on v and updating result inplace.
 
Eigen::Matrix< EleType, -1, 1 > restriction (const Eigen::Matrix< EleType, -1, 1 > &v, size_t level)
 Restriction operator on v.
 
const Eigen::SparseMatrix< EleType > & get_P (size_t level) const
 
const Eigen::SparseMatrix< EleType > & get_R (size_t level) const
 
void set_level_to_P (size_t level, Eigen::SparseMatrix< EleType > &P)
 
void set_level_to_R (size_t level, Eigen::SparseMatrix< EleType > &R)
 

Private Attributes

std::vector< Eigen::SparseMatrix< EleType > > level_to_P
 
std::vector< Eigen::SparseMatrix< EleType > > level_to_R
 

Detailed Description

template<class EleType>
class AMG::InterpolatorBase< EleType >

Base class for interpolators that implement prolongation and restriction as linear operators constructed by the make_operators virtual function.

Template Parameters
EleType

Constructor & Destructor Documentation

◆ InterpolatorBase() [1/2]

template<class EleType >
AMG::InterpolatorBase< EleType >::InterpolatorBase ( size_t n_levels)
inline

◆ InterpolatorBase() [2/2]

template<class EleType >
AMG::InterpolatorBase< EleType >::InterpolatorBase ( )
inline

Construct a new Interpolator Base object.

No a-priori knowledge about number of levels in multigrid.

Member Function Documentation

◆ get_P()

template<class EleType >
const Eigen::SparseMatrix< EleType > & AMG::InterpolatorBase< EleType >::get_P ( size_t level) const
inline

◆ get_R()

template<class EleType >
const Eigen::SparseMatrix< EleType > & AMG::InterpolatorBase< EleType >::get_R ( size_t level) const
inline

◆ make_operators()

template<class EleType >
virtual void AMG::InterpolatorBase< EleType >::make_operators ( size_t n_h_dofs,
size_t n_H_dofs,
size_t level )
pure virtual

Construct P and R matrices based on dofs and level information.

Parameters
n_h_dofsNumber of dofs in the finer level.
n_H_dofsNumber of dofs in the coarser level.
levelCurrent level.

Implemented in AMG::LinearInterpolator< EleType >.

◆ prolongation()

template<class EleType >
Eigen::Matrix< EleType, -1, 1 > AMG::InterpolatorBase< EleType >::prolongation ( const Eigen::Matrix< EleType, -1, 1 > & v,
size_t level )
inline

Prolongation operator on v and updating result inplace.

Parameters
v
level

◆ restriction()

template<class EleType >
Eigen::Matrix< EleType, -1, 1 > AMG::InterpolatorBase< EleType >::restriction ( const Eigen::Matrix< EleType, -1, 1 > & v,
size_t level )
inline

Restriction operator on v.

Parameters
v
level

◆ set_level_to_P()

template<class EleType >
void AMG::InterpolatorBase< EleType >::set_level_to_P ( size_t level,
Eigen::SparseMatrix< EleType > & P )
inline

◆ set_level_to_R()

template<class EleType >
void AMG::InterpolatorBase< EleType >::set_level_to_R ( size_t level,
Eigen::SparseMatrix< EleType > & R )
inline

Member Data Documentation

◆ level_to_P

template<class EleType >
std::vector<Eigen::SparseMatrix<EleType> > AMG::InterpolatorBase< EleType >::level_to_P
private

◆ level_to_R

template<class EleType >
std::vector<Eigen::SparseMatrix<EleType> > AMG::InterpolatorBase< EleType >::level_to_R
private

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