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
public gko::EnablePolymorphicObject<GaussSeidel<default_precision, int32>, LinOpFactory>
public gko::EnablePolymorphicAssignment<GaussSeidel<default_precision, int32>>
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
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::shared_ptr<const LinOp> system_matrix,
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
public gko::enable_parameters_type<parameters_type, GaussSeidel>