GEOS
Public Types | Public Member Functions | Protected Attributes | List of all members
geos::multiscale::MsrsbLevelBuilderBase< LAI > Class Template Referenceabstract

Base class for MsRSB level builders. More...

#include <MsrsbLevelBuilderBase.hpp>

Inheritance diagram for geos::multiscale::MsrsbLevelBuilderBase< LAI >:
Inheritance graph
[legend]

Public Types

using Base = LevelBuilderBase< LAI >
 Alias for base type.
 
using Vector = typename Base::Vector
 Alias for vector type.
 
using Matrix = typename Base::Matrix
 Alias for matrix type.
 
using Operator = typename Base::Operator
 Alias for operator type.
 
- Public Types inherited from geos::multiscale::LevelBuilderBase< LAI >
using Vector = typename LAI::ParallelVector
 Alias for vector type.
 
using Matrix = typename LAI::ParallelMatrix
 Alias for matrix type.
 
using Operator = LinearOperator< Vector >
 Alias for operator type.
 

Public Member Functions

 MsrsbLevelBuilderBase (string name, LinearSolverParameters params)
 Constructor. More...
 
virtual Matrix const & prolongation () const override
 
virtual Operator const & restriction () const override
 
virtual Matrix const & matrix () const override
 
virtual PreconditionerBase< LAI > const * presmoother () const override
 
PreconditionerBase< LAI > * presmoother ()
 
virtual PreconditionerBase< LAI > const * postsmoother () const override
 
PreconditionerBase< LAI > * postsmoother ()
 
multiscale::DofManagerdofManager ()
 
multiscale::DofManager const & dofManager () const
 
virtual void compute (Matrix const &fineMatrix) override
 Compute the current level. More...
 
virtual bool updateProlongation (Matrix const &fineMatrix)=0
 Update current level's prolongation using a new previous level matrix. More...
 
- Public Member Functions inherited from geos::multiscale::LevelBuilderBase< LAI >
 LevelBuilderBase (string name, LinearSolverParameters params)
 Constructor. More...
 
virtual ~LevelBuilderBase ()=default
 Destructor.
 
virtual void initializeFineLevel (DomainPartition &domain, geos::DofManager const &dofManager, MPI_Comm const &comm)=0
 Initialize the finest level (level 0). More...
 
virtual void initializeCoarseLevel (LevelBuilderBase< LAI > &fineLevel, Matrix const &fineMatrix)=0
 Initialize a coarse level (levels 1 and above). More...
 
virtual std::unique_ptr< PreconditionerBase< LAI > > makeCoarseSolver () const =0
 Instantiate coarsest level solver. More...
 

Protected Attributes

MsrsbLevelBuilderBase const * m_fineLevel {}
 Pointer to the fine level.
 
Matrix m_prolongation
 Prolongation matrix P.
 
std::unique_ptr< Operatorm_restriction
 Restriction (kept as abstract operator to allow for memory efficiency, e.g. when R = P^T)
 
Matrix m_matrix
 Level operator matrix.
 
multiscale::DofManager m_dofManager
 DofManager for the matrix.
 
std::unique_ptr< PreconditionerBase< LAI > > m_preSmoother
 Pre-smoothing operator.
 
std::unique_ptr< PreconditionerBase< LAI > > m_postSmoother
 Post-smoothing operator.
 
LinearSolverParameters m_params
 Linear solver top-level parameters.
 
string m_name
 Level name (label)
 
- Protected Attributes inherited from geos::multiscale::LevelBuilderBase< LAI >
string m_name
 Level name (label)
 
LinearSolverParameters m_params
 Linear solver top-level parameters.
 

Additional Inherited Members

- Static Public Member Functions inherited from geos::multiscale::LevelBuilderBase< LAI >
static std::unique_ptr< LevelBuilderBase< LAI > > create (string name, LinearSolverParameters params)
 Factory interface to create level instances. More...
 

Detailed Description

template<typename LAI>
class geos::multiscale::MsrsbLevelBuilderBase< LAI >

Base class for MsRSB level builders.

Template Parameters
LAIlinear algebra interface type

Definition at line 37 of file MsrsbLevelBuilderBase.hpp.

Constructor & Destructor Documentation

◆ MsrsbLevelBuilderBase()

template<typename LAI >
geos::multiscale::MsrsbLevelBuilderBase< LAI >::MsrsbLevelBuilderBase ( string  name,
LinearSolverParameters  params 
)
explicit

Constructor.

Parameters
namelevel name
paramslinear solver parameters

Member Function Documentation

◆ compute()

template<typename LAI >
virtual void geos::multiscale::MsrsbLevelBuilderBase< LAI >::compute ( Matrix const &  fineMatrix)
overridevirtual

Compute the current level.

Parameters
fineMatrixthe previous (fine) level system matrix

Implements geos::multiscale::LevelBuilderBase< LAI >.

◆ dofManager() [1/2]

template<typename LAI >
multiscale::DofManager& geos::multiscale::MsrsbLevelBuilderBase< LAI >::dofManager ( )
inline
Returns
the level's multiscale DofManager

Definition at line 104 of file MsrsbLevelBuilderBase.hpp.

◆ dofManager() [2/2]

template<typename LAI >
multiscale::DofManager const& geos::multiscale::MsrsbLevelBuilderBase< LAI >::dofManager ( ) const
inline
Returns
the level's multiscale DofManager

Definition at line 109 of file MsrsbLevelBuilderBase.hpp.

◆ matrix()

template<typename LAI >
virtual Matrix const& geos::multiscale::MsrsbLevelBuilderBase< LAI >::matrix ( ) const
inlineoverridevirtual
Returns
current level's system matrix

Implements geos::multiscale::LevelBuilderBase< LAI >.

Definition at line 70 of file MsrsbLevelBuilderBase.hpp.

◆ postsmoother() [1/2]

template<typename LAI >
PreconditionerBase< LAI >* geos::multiscale::MsrsbLevelBuilderBase< LAI >::postsmoother ( )
inline
Returns
current level's post-smoothing operator (mutable access)

Definition at line 96 of file MsrsbLevelBuilderBase.hpp.

◆ postsmoother() [2/2]

template<typename LAI >
virtual PreconditionerBase< LAI > const* geos::multiscale::MsrsbLevelBuilderBase< LAI >::postsmoother ( ) const
inlineoverridevirtual
Returns
current level's post-smoothing operator

Implements geos::multiscale::LevelBuilderBase< LAI >.

Definition at line 88 of file MsrsbLevelBuilderBase.hpp.

◆ presmoother() [1/2]

template<typename LAI >
PreconditionerBase< LAI >* geos::multiscale::MsrsbLevelBuilderBase< LAI >::presmoother ( )
inline
Returns
current level's pre-smoothing operator (mutable access)

Definition at line 83 of file MsrsbLevelBuilderBase.hpp.

◆ presmoother() [2/2]

template<typename LAI >
virtual PreconditionerBase< LAI > const* geos::multiscale::MsrsbLevelBuilderBase< LAI >::presmoother ( ) const
inlineoverridevirtual
Returns
current level's pre-smoothing operator

Implements geos::multiscale::LevelBuilderBase< LAI >.

Definition at line 75 of file MsrsbLevelBuilderBase.hpp.

◆ prolongation()

template<typename LAI >
virtual Matrix const& geos::multiscale::MsrsbLevelBuilderBase< LAI >::prolongation ( ) const
inlineoverridevirtual
Returns
current level's prolongation operator

Implements geos::multiscale::LevelBuilderBase< LAI >.

Definition at line 60 of file MsrsbLevelBuilderBase.hpp.

◆ restriction()

template<typename LAI >
virtual Operator const& geos::multiscale::MsrsbLevelBuilderBase< LAI >::restriction ( ) const
inlineoverridevirtual
Returns
current level's restriction operator

Implements geos::multiscale::LevelBuilderBase< LAI >.

Definition at line 65 of file MsrsbLevelBuilderBase.hpp.

◆ updateProlongation()

template<typename LAI >
virtual bool geos::multiscale::MsrsbLevelBuilderBase< LAI >::updateProlongation ( Matrix const &  fineMatrix)
pure virtual

Update current level's prolongation using a new previous level matrix.

Parameters
fineMatrixthe previous level matrix
Returns
whether an update was actually performed (it may not be when the change is below threshold)

Implemented in geos::multiscale::MsrsbLevelBuilderCoupled< LAI >, and geos::multiscale::MsrsbLevelBuilder< LAI >.


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