gko::multigrid::MultigridLevel#

Abstract interface for a single level of an algebraic-multigrid hierarchy. Exposes the fine operator \(A\) and three derived LinOps (the restriction \(R\), the coarse operator \(A_c\), and the prolongation \(P\)) so that gko::solver::Multigrid can drive any generator that implements this interface without knowing how the level was assembled.

Concrete level generators (Pgm, Pmis, Rs, UniformCoarsening, FixedCoarsening) implement this interface. New generators derive from LinOp and the EnableMultigridLevel<ValueType> mixin, which stores the four operators (set through set_multigrid_level) and provides the composition \(P A_c R\) used as the level’s apply.

class MultigridLevel#

This class represents two levels in a multigrid hierarchy.

The MultigridLevel is an interface that allows to get the individual components of multigrid level. Each implementation of a multigrid level should inherit from this interface. Use EnableMultigridLevel<ValueType> to implement this interface with composition by default.

Subclassed by

  • gko::multigrid::EnableMultigridLevel< default_precision >

  • gko::multigrid::EnableMultigridLevel< ValueType >

Public Functions

virtual std::shared_ptr<const LinOp> get_fine_op() const = 0#

Returns the operator on fine level.

Returns:

the operator on fine level.

virtual std::shared_ptr<const LinOp> get_restrict_op() const = 0#

Returns the restrict operator.

Returns:

the restrict operator.

virtual std::shared_ptr<const LinOp> get_coarse_op() const = 0#

Returns the operator on coarse level.

Returns:

the operator on coarse level.

virtual std::shared_ptr<const LinOp> get_prolong_op() const = 0#

Returns the prolong operator.

Returns:

the prolong operator.