5#ifndef GKO_PUBLIC_CORE_DISTRIBUTED_PRECONDITIONER_SCHWARZ_HPP_
6#define GKO_PUBLIC_CORE_DISTRIBUTED_PRECONDITIONER_SCHWARZ_HPP_
9#include <ginkgo/config.hpp>
15#include <ginkgo/core/base/abstract_factory.hpp>
16#include <ginkgo/core/base/lin_op.hpp>
17#include <ginkgo/core/config/config.hpp>
18#include <ginkgo/core/config/registry.hpp>
19#include <ginkgo/core/config/type_descriptor.hpp>
20#include <ginkgo/core/distributed/matrix.hpp>
21#include <ginkgo/core/distributed/vector.hpp>
22#include <ginkgo/core/distributed/vector_cache.hpp>
26namespace experimental {
27namespace distributed {
33namespace preconditioner {
53 typename LocalIndexType =
int32,
typename GlobalIndexType =
int64>
55 :
public EnableLinOp<Schwarz<ValueType, LocalIndexType, GlobalIndexType>> {
62 using value_type = ValueType;
63 using index_type = GlobalIndexType;
64 using local_index_type = LocalIndexType;
65 using global_index_type = GlobalIndexType;
82 std::shared_ptr<const LinOpFactory> GKO_DEFERRED_FACTORY_PARAMETER(
89 generated_local_solver,
nullptr);
121 config::make_type_descriptor<ValueType, LocalIndexType,
130 explicit Schwarz(std::shared_ptr<const Executor> exec)
142 std::shared_ptr<const LinOp> system_matrix)
145 parameters_{factory->get_parameters()}
153 void generate(std::shared_ptr<const LinOp> system_matrix);
155 void apply_impl(
const LinOp* b,
LinOp* x)
const override;
157 template <
typename VectorType>
158 void apply_dense_impl(
const VectorType* b, VectorType* x)
const;
161 LinOp* x)
const override;
169 void set_solver(std::shared_ptr<const LinOp> new_solver);
171 std::shared_ptr<const LinOp> local_solver_;
173 detail::VectorCache<ValueType> cache_;
Definition lin_op.hpp:878
void move_to(result_type *result) override
Definition polymorphic_object.hpp:751
void convert_to(result_type *result) const override
Definition polymorphic_object.hpp:749
Definition polymorphic_object.hpp:668
Definition lin_op.hpp:117
std::shared_ptr< const Executor > get_executor() const noexcept
Definition polymorphic_object.hpp:243
Definition property_tree.hpp:28
Definition registry.hpp:167
Definition type_descriptor.hpp:39
Definition schwarz.hpp:101
Definition schwarz.hpp:55
void generate(std::shared_ptr< const LinOp > system_matrix)
Schwarz(std::shared_ptr< const Executor > exec)
Definition schwarz.hpp:130
bool apply_uses_initial_guess() const override
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 >())
Schwarz(const Factory *factory, std::shared_ptr< const LinOp > system_matrix)
Definition schwarz.hpp:141
#define GKO_CREATE_FACTORY_PARAMETERS(_parameters_name, _factory_name)
Definition abstract_factory.hpp:280
#define GKO_FACTORY_PARAMETER_SCALAR(_name, _default)
Definition abstract_factory.hpp:445
#define GKO_ENABLE_BUILD_METHOD(_factory_name)
Definition abstract_factory.hpp:394
#define GKO_ENABLE_LIN_OP_FACTORY(_lin_op, _parameters_name, _factory_name)
Definition lin_op.hpp:1016
The Ginkgo namespace.
Definition abstract_factory.hpp:20
double default_precision
Definition types.hpp:171
std::int32_t int32
Definition types.hpp:106
std::int64_t int64
Definition types.hpp:112
batch_dim< 2, DimensionType > transpose(const batch_dim< 2, DimensionType > &input)
Definition batch_dim.hpp:119
Definition schwarz.hpp:78