gko::preconditioner::GaussSeidel#

Gauss-Seidel preconditioner — the \(\omega = 1\) special case of SOR. Applies one forward (or symmetric) sweep over the system matrix as the approximate inverse. Cheap and embarrassingly simple, but with convergence that depends strongly on the matrix structure.

template<typename ValueType = default_precision, typename IndexType = int32>
class GaussSeidel #

Inherits from

This class generates the Gauss-Seidel preconditioner.

This is the special case of the relaxation factor \(\omega = 1\) of the (S)SOR preconditioner.

See also

Sor

Public Functions

inline const parameters_type &get_parameters()#

Returns the parameters used to construct the factory.

Returns:

the parameters used to construct the factory.

inline const parameters_type &get_parameters() const#

Returns the parameters used to construct the factory.

Returns:

the parameters used to construct the factory.

std::unique_ptr<composition_type> generate(
std::shared_ptr<const LinOp> system_matrix,
) const#

Creates a new product from the given components.

The method will create an ComponentsType object from the arguments of this method, and pass it to the generate_impl() function which will create a new AbstractProductType.

Note

This function overrides the default LinOpFactory::generate to return a Factorization instead of a generic LinOp, which would need to be cast to Factorization again to access its factors. It is only necessary because smart pointers aren’t covariant.

Template Parameters:

Args – types of arguments passed to the constructor of ComponentsType

Parameters:

args – arguments passed to the constructor of ComponentsType

Returns:

an instance of AbstractProductType

Public Static Functions

static inline parameters_type build()#

Creates a new parameter_type to set up the factory.

struct parameters_type #

Inherits from