ginkgo/core/factorization/lu.hpp Source File

ginkgo/core/factorization/lu.hpp Source File#

Reference API: ginkgo/core/factorization/lu.hpp Source File
Reference API
lu.hpp
1// SPDX-FileCopyrightText: 2017 - 2025 The Ginkgo authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
5#include <memory>
6
7#include <ginkgo/core/base/composition.hpp>
8#include <ginkgo/core/base/lin_op.hpp>
9#include <ginkgo/core/base/polymorphic_object.hpp>
10#include <ginkgo/core/config/config.hpp>
11#include <ginkgo/core/config/registry.hpp>
12#include <ginkgo/core/factorization/factorization.hpp>
13#include <ginkgo/core/matrix/csr.hpp>
14#include <ginkgo/core/matrix/sparsity_csr.hpp>
15
16
17namespace gko {
18namespace experimental {
19namespace factorization {
20
21
22enum class symbolic_type {
24 general,
30 near_symmetric,
37 symmetric
38};
39
40
55template <typename ValueType, typename IndexType>
56class Lu
57 : public EnablePolymorphicObject<Lu<ValueType, IndexType>, LinOpFactory>,
58 public EnablePolymorphicAssignment<Lu<ValueType, IndexType>> {
59public:
60 struct parameters_type;
63
64 using value_type = ValueType;
65 using index_type = IndexType;
69
71 : public enable_parameters_type<parameters_type, Lu> {
80 std::shared_ptr<const sparsity_pattern_type>
82
91 symbolic_type::general);
92
104 };
105
111 const parameters_type& get_parameters() { return parameters_; }
112
116 const parameters_type& get_parameters() const { return parameters_; }
117
125 std::unique_ptr<factorization_type> generate(
126 std::shared_ptr<const LinOp> system_matrix) const;
127
129 static parameters_type build() { return {}; }
130
145 const config::pnode& config, const config::registry& context,
146 const config::type_descriptor& td_for_child =
147 config::make_type_descriptor<ValueType, IndexType>());
148
149protected:
150 explicit Lu(std::shared_ptr<const Executor> exec,
151 const parameters_type& params = {});
152
153 std::unique_ptr<LinOp> generate_impl(
154 std::shared_ptr<const LinOp> system_matrix) const override;
155
156private:
157 parameters_type parameters_;
158};
159
160
161} // namespace factorization
162} // namespace experimental
163} // namespace gko
Definition polymorphic_object.hpp:743
Definition polymorphic_object.hpp:668
Definition lin_op.hpp:385
Definition property_tree.hpp:28
Definition registry.hpp:167
Definition type_descriptor.hpp:39
Definition abstract_factory.hpp:211
std::unique_ptr< factorization_type > generate(std::shared_ptr< const LinOp > system_matrix) const
const parameters_type & get_parameters()
Definition lu.hpp:111
static parameters_type build()
Definition lu.hpp:129
const parameters_type & get_parameters() const
Definition lu.hpp:116
static parameters_type parse(const config::pnode &config, const config::registry &context, const config::type_descriptor &td_for_child=config::make_type_descriptor< ValueType, IndexType >())
Definition csr.hpp:123
Definition sparsity_csr.hpp:55
#define GKO_FACTORY_PARAMETER_SCALAR(_name, _default)
Definition abstract_factory.hpp:445
The Ginkgo namespace.
Definition abstract_factory.hpp:20
std::shared_ptr< const sparsity_pattern_type > symbolic_factorization
Definition lu.hpp:81
symbolic_type symbolic_algorithm
Definition lu.hpp:91