 |
Ginkgo
Generated from pipelines/2837190956 branch based on develop. Ginkgo version 2.0.0
A numerical linear algebra library targeting many-core architectures
|
5 #ifndef GKO_PUBLIC_CORE_PRECONDITIONER_SOR_HPP_
6 #define GKO_PUBLIC_CORE_PRECONDITIONER_SOR_HPP_
11 #include <ginkgo/core/base/abstract_factory.hpp>
12 #include <ginkgo/core/base/composition.hpp>
13 #include <ginkgo/core/base/lin_op.hpp>
14 #include <ginkgo/core/base/polymorphic_object.hpp>
15 #include <ginkgo/core/config/config.hpp>
19 namespace preconditioner {
52 template <
typename ValueType = default_precision,
typename IndexType =
int32>
54 GKO_ASSERT_SUPPORTED_VALUE_AND_INDEX_TYPE;
60 using value_type = ValueType;
61 using index_type = IndexType;
77 std::shared_ptr<const LinOpFactory> GKO_DEFERRED_FACTORY_PARAMETER(
82 std::shared_ptr<const LinOpFactory> GKO_DEFERRED_FACTORY_PARAMETER(
109 std::unique_ptr<composition_type>
generate(
110 std::shared_ptr<const LinOp> system_matrix)
const;
115 static parameters_type parse(
118 config::make_type_descriptor<ValueType, IndexType>());
121 explicit Sor(std::shared_ptr<const Executor> exec,
122 const parameters_type& params = {})
125 GKO_ASSERT(parameters_.relaxation_factor > 0.0 &&
126 parameters_.relaxation_factor < 2.0);
129 std::unique_ptr<LinOp> generate_impl(
130 std::shared_ptr<const LinOp> system_matrix)
const override;
133 parameters_type parameters_;
139 #endif // GKO_PUBLIC_CORE_PRECONDITIONER_SOR_HPP_
pnode describes a tree of properties.
Definition: property_tree.hpp:28
std::unique_ptr< composition_type > generate(std::shared_ptr< const LinOp > system_matrix) const
#define GKO_FACTORY_PARAMETER_SCALAR(_name, _default)
Creates a scalar factory parameter in the factory parameters structure.
Definition: abstract_factory.hpp:469
const parameters_type & get_parameters()
Returns the parameters used to construct the factory.
Definition: sor.hpp:91
This class describes the value and index types to be used when building a Ginkgo type from a configur...
Definition: type_descriptor.hpp:39
The Ginkgo namespace.
Definition: abstract_factory.hpp:19
This class generates the (S)SOR preconditioner.
Definition: sor.hpp:53
The Composition class can be used to compose linear operators op1, op2, ..., opn and obtain the opera...
Definition: composition.hpp:39
const parameters_type & get_parameters() const
Returns the parameters used to construct the factory.
Definition: sor.hpp:96
This class stores additional context for creating Ginkgo objects from configuration files.
Definition: registry.hpp:167
A LinOpFactory represents a higher order mapping which transforms one linear operator into another.
Definition: lin_op.hpp:343
static parameters_type build()
Creates a new parameter_type to set up the factory.
Definition: sor.hpp:113
The enable_parameters_type mixin is used to create a base implementation of the factory parameters st...
Definition: abstract_factory.hpp:235
typename detail::remove_complex_s< T >::type remove_complex
Obtain the type which removed the complex of complex/scalar type or the template parameter of class b...
Definition: math.hpp:263