gko::experimental::distributed::preconditioner::
Schwarz#

Additive Schwarz preconditioner. Applies a user-supplied local solver to each rank’s diagonal block; remote couplings are not iterated over, which makes the operation embarrassingly parallel across ranks. The factory also supports an L1 smoother variant (off-diagonal absolute row sums folded into the local diagonal before generation) and an algebraic coarse-grid correction for two-level Schwarz.

template<typename ValueType = default_precision, typename LocalIndexType = int32, typename GlobalIndexType = int64>
class Schwarz #

Inherits from

A Schwarz preconditioner is a simple domain decomposition preconditioner that generalizes the Block Jacobi preconditioner, incorporating options for different local subdomain solvers and overlaps between the subdomains.

A L1 smoother variant is also available, which updates the diagonal block with the sums of the off-diagonal block row sums.

See Iterative Methods for Sparse Linear Systems (Y. Saad) for a general treatment and variations of the method.

A Two-level variant is also available. To enable two-level preconditioning, you need to specify a LinOpFactory that can generate a multigrid::MultigridLevel and a solver for the coarse level solution. Currently, only additive coarse correction is supported with an optional weighting between the local and the coarse solutions, for cases when the coarse solutions might tend to overcorrect.

  • See Smith, Bjorstad, Gropp, Domain Decomposition, 1996, Cambridge University Press.

Note

Currently overlap is not supported (TODO).

Template Parameters:
  • ValueType – precision of matrix element

  • LocalIndexType – local integer type of the matrix

  • GlobalIndexType – global integer type of the matrix

Public Functions

bool apply_uses_initial_guess() const override#

Return whether the local solvers use the data in x as an initial guess.

Note

TODO: after adding refining step, need to revisit this.

Returns:

true when the local solvers use the data in x as an initial guess. otherwise, false.

Public Static Functions

static parameters_type parse(
const config::pnode &config,
const config::registry &context,
const config::type_descriptor &td_for_child = config::make_type_descriptor<ValueType, LocalIndexType, GlobalIndexType>(),
)#

Create the parameters from the property_tree. Because this is directly tied to the specific type, the value/index type settings within config are ignored and type_descriptor is only used for children objects.

Parameters:
  • config – the property tree for setting

  • context – the registry

  • td_for_child – the type descriptor for children objects. The default uses the value/local/global index type of this class.

Returns:

parameters

struct parameters_type#

Public Members

std::shared_ptr<const LinOpFactory> local_solver#

Local solver factory.

std::shared_ptr<const LinOp> generated_local_solver#

Generated Inner solvers.

bool l1_smoother#

Enable l1 smoother.

This creates a diagonal matrix from the row-wise absolute sum of the off-diagonal matrix entries. The diagonal matrix is then added to the system matrix when generating the local solver.

Note: The L1 smoother will not be used for the coarse level matrix generation, and the original system matrix will still be used.

ValueType coarse_weight#

Coarse weighting.

By default the coarse and the local solutions are added together (when the coarse weight is < 0 or > 1). A weighting can instead be provided if the coarse solution tends to over-correct.

std::shared_ptr<const LinOpFactory> coarse_level#

Operator factory list to generate the triplet (prolong_op, coarse_op, restrict_op), A_c = R * A * P

Note: The linop factory must generate the triplet (R, A_c, P). For example, any coarse level generator from multigrid::MultigridLevel can be used.

std::shared_ptr<const LinOpFactory> coarse_solver#

Coarse solver factory.