EnableMultigridLevel< ValueType > Class Template Reference

EnableMultigridLevel&lt; ValueType &gt; Class Template Reference#

Reference API: gko::multigrid::EnableMultigridLevel< ValueType > Class Template Reference
Reference API
gko::multigrid::EnableMultigridLevel< ValueType > Class Template Reference

#include <ginkgo/core/multigrid/multigrid_level.hpp>

Inheritance diagram for gko::multigrid::EnableMultigridLevel< ValueType >:
[legend]

Public Types

using value_type = ValueType
 
- Public Types inherited from gko::UseComposition< ValueType >
using value_type = ValueType
 

Public Member Functions

std::shared_ptr< const LinOpget_fine_op () const override
 
std::shared_ptr< const LinOpget_restrict_op () const override
 
std::shared_ptr< const LinOpget_coarse_op () const override
 
std::shared_ptr< const LinOpget_prolong_op () const override
 
- Public Member Functions inherited from gko::UseComposition< ValueType >
std::shared_ptr< Composition< ValueType > > get_composition () const
 
std::shared_ptr< const LinOpget_operator_at (size_type index) const
 

Protected Member Functions

void set_multigrid_level (std::shared_ptr< const LinOp > prolong_op, std::shared_ptr< const LinOp > coarse_op, std::shared_ptr< const LinOp > restrict_op)
 
void set_fine_op (std::shared_ptr< const LinOp > fine_op)
 
 EnableMultigridLevel (std::shared_ptr< const LinOp > fine_op)
 
- Protected Member Functions inherited from gko::UseComposition< ValueType >
void set_composition (LinOp &&... linop)
 

Detailed Description

template<typename ValueType>
class gko::multigrid::EnableMultigridLevel< ValueType >

The EnableMultigridLevel gives the default implementation of MultigridLevel with composition and provides set_multigrid_level function.

A class inherit from EnableMultigridLevel should use the this->get_compositions()->apply(...) as its own apply, which represents op(b) = prolong(coarse(restrict(b))).

Constructor & Destructor Documentation

◆ EnableMultigridLevel()

template<typename ValueType >
gko::multigrid::EnableMultigridLevel< ValueType >::EnableMultigridLevel ( std::shared_ptr< const LinOp fine_op)
inlineexplicitprotected

Creates a EnableMultigridLevel with the given fine operator

Parameters
fine_opThe fine operator associated to the multigrid_level
Note
the multigrid is generated in the generation not the construction, so the user needs to call set_multigrid_level to set the corresponding information after generation.

Member Function Documentation

◆ get_coarse_op()

template<typename ValueType >
std::shared_ptr< const LinOp > gko::multigrid::EnableMultigridLevel< ValueType >::get_coarse_op ( ) const
inlineoverridevirtual

Returns the operator on coarse level.

Returns
the operator on coarse level.

Implements gko::multigrid::MultigridLevel.

References gko::UseComposition< ValueType >::get_operator_at().

◆ get_fine_op()

template<typename ValueType >
std::shared_ptr< const LinOp > gko::multigrid::EnableMultigridLevel< ValueType >::get_fine_op ( ) const
inlineoverridevirtual

Returns the operator on fine level.

Returns
the operator on fine level.

Implements gko::multigrid::MultigridLevel.

◆ get_prolong_op()

template<typename ValueType >
std::shared_ptr< const LinOp > gko::multigrid::EnableMultigridLevel< ValueType >::get_prolong_op ( ) const
inlineoverridevirtual

Returns the prolong operator.

Returns
the prolong operator.

Implements gko::multigrid::MultigridLevel.

References gko::UseComposition< ValueType >::get_operator_at().

◆ get_restrict_op()

template<typename ValueType >
std::shared_ptr< const LinOp > gko::multigrid::EnableMultigridLevel< ValueType >::get_restrict_op ( ) const
inlineoverridevirtual

Returns the restrict operator.

Returns
the restrict operator.

Implements gko::multigrid::MultigridLevel.

References gko::UseComposition< ValueType >::get_operator_at().

◆ set_fine_op()

template<typename ValueType >
void gko::multigrid::EnableMultigridLevel< ValueType >::set_fine_op ( std::shared_ptr< const LinOp fine_op)
inlineprotected

Sets the multigrid level fine operator, which is used to update fine operator when the MultigridLevel changes the precision of the operator.

Parameters
fine_opthe fine operator

◆ set_multigrid_level()

template<typename ValueType >
void gko::multigrid::EnableMultigridLevel< ValueType >::set_multigrid_level ( std::shared_ptr< const LinOp prolong_op,
std::shared_ptr< const LinOp coarse_op,
std::shared_ptr< const LinOp restrict_op 
)
inlineprotected

Sets the multigrid level information. The stored composition will be prolong_op x coarse_op x restrict_op.

Parameters
prolong_opthe prolong operator
coarse_opthe coarse operator
restrict_opthe restrict operator

References gko::UseComposition< ValueType >::set_composition().


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