33#ifndef GKO_PUBLIC_CORE_DISTRIBUTED_PRECONDITIONER_SCHWARZ_HPP_
34#define GKO_PUBLIC_CORE_DISTRIBUTED_PRECONDITIONER_SCHWARZ_HPP_
37#include <ginkgo/config.hpp>
43#include <ginkgo/core/base/abstract_factory.hpp>
44#include <ginkgo/core/base/lin_op.hpp>
45#include <ginkgo/core/distributed/matrix.hpp>
46#include <ginkgo/core/distributed/vector.hpp>
50namespace experimental {
51namespace distributed {
57namespace preconditioner {
80 :
public EnableLinOp<Schwarz<ValueType, LocalIndexType, GlobalIndexType>> {
87 using value_type = ValueType;
97 std::shared_ptr<const LinOpFactory> GKO_DEFERRED_FACTORY_PARAMETER(
104 generated_local_solver,
nullptr);
115 explicit Schwarz(std::shared_ptr<const Executor> exec)
127 std::shared_ptr<const LinOp> system_matrix)
130 parameters_{factory->get_parameters()}
132 this->generate(system_matrix);
138 void generate(std::shared_ptr<const LinOp> system_matrix);
140 void apply_impl(
const LinOp* b,
LinOp* x)
const override;
142 template <
typename VectorType>
146 LinOp* x)
const override;
154 void set_solver(std::shared_ptr<const LinOp>
new_solver);
156 std::shared_ptr<const LinOp> local_solver_;
The EnableLinOp mixin can be used to provide sensible default implementations of the majority of the ...
Definition lin_op.hpp:908
void move_to(result_type *result) override
Definition polymorphic_object.hpp:760
void convert_to(result_type *result) const override
Definition polymorphic_object.hpp:758
This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a ne...
Definition polymorphic_object.hpp:691
Definition lin_op.hpp:146
std::shared_ptr< const Executor > get_executor() const noexcept
Returns the Executor of the object.
Definition polymorphic_object.hpp:263
Definition schwarz.hpp:106
A Schwarz preconditioner is a simple domain decomposition preconditioner that generalizes the Block J...
Definition schwarz.hpp:80
#define GKO_CREATE_FACTORY_PARAMETERS(_parameters_name, _factory_name)
This Macro will generate a new type containing the parameters for the factory _factory_name.
Definition abstract_factory.hpp:308
#define GKO_FACTORY_PARAMETER_SCALAR(_name, _default)
Creates a scalar factory parameter in the factory parameters structure.
Definition abstract_factory.hpp:473
#define GKO_ENABLE_BUILD_METHOD(_factory_name)
Defines a build method for the factory, simplifying its construction by removing the repetitive typin...
Definition abstract_factory.hpp:422
#define GKO_ENABLE_LIN_OP_FACTORY(_lin_op, _parameters_name, _factory_name)
This macro will generate a default implementation of a LinOpFactory for the LinOp subclass it is defi...
Definition lin_op.hpp:1046
The Ginkgo namespace.
Definition abstract_factory.hpp:48
constexpr T one()
Returns the multiplicative identity for T.
Definition math.hpp:803
std::int32_t int32
32-bit signed integral type.
Definition types.hpp:137
double default_precision
Precision used if no precision is explicitly specified.
Definition types.hpp:205
std::int64_t int64
64-bit signed integral type.
Definition types.hpp:143
batch_dim< 2, DimensionType > transpose(const batch_dim< 2, DimensionType > &input)
Returns a batch_dim object with its dimensions swapped for batched operators.
Definition batch_dim.hpp:148