gko::multigrid::MultigridLevel#

Abstract interface for a single level of an algebraic-multigrid hierarchy. Exposes the fine operator \(A\) together with three 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, FixedCoarsening, …) implement this interface. New generators derive from LinOp (for example through EnableLinOp) together with the EnableMultigridLevel<ValueType> mixin, which supplies the storage and accessor boilerplate; the generator then calls set_multigrid_level with its operators.

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.