 |
Ginkgo
Generated from pipelines/3136675824 branch based on develop. Ginkgo version 2.0.0
A numerical linear algebra library targeting many-core architectures
|
5 #ifndef GKO_PUBLIC_CORE_SOLVER_NULLSPACE_HPP_
6 #define GKO_PUBLIC_CORE_SOLVER_NULLSPACE_HPP_
12 #include <ginkgo/core/base/array.hpp>
13 #include <ginkgo/core/base/dense_cache.hpp>
14 #include <ginkgo/core/base/lin_op.hpp>
15 #include <ginkgo/core/base/math.hpp>
16 #include <ginkgo/core/base/polymorphic_object.hpp>
17 #include <ginkgo/core/base/utils.hpp>
18 #include <ginkgo/core/matrix/dense.hpp>
58 template <
typename ValueType = default_precision>
61 GKO_ASSERT_SUPPORTED_VALUE_TYPE;
67 using value_type = ValueType;
84 static std::unique_ptr<Nullspace>
create(
85 std::shared_ptr<const Executor> exec,
86 std::vector<std::shared_ptr<const AbstractMultiVector>> basis,
105 std::shared_ptr<const Executor> exec,
dim<2> size = {});
121 std::shared_ptr<const AbstractMultiVector>
get_basis()
const noexcept;
144 explicit Nullspace(std::shared_ptr<const Executor> exec);
147 std::vector<std::shared_ptr<const AbstractMultiVector>> basis,
160 const std::vector<std::shared_ptr<const AbstractMultiVector>>& basis);
165 bool has_constant)
const;
172 bool has_constant)
const;
176 bool has_constant)
const;
178 bool contains_constant_;
180 std::shared_ptr<const AbstractMultiVector> basis_;
182 gko::detail::DenseCache<ValueType> coefficients_;
183 gko::detail::DenseCache<ValueType> host_coefficients_;
205 template <
typename ValueType>
206 std::shared_ptr<const Nullspace<ValueType>> prepare_nullspace(
207 std::shared_ptr<const LinOp> param,
const char* name,
const LinOp* op,
208 size_type size, std::shared_ptr<const Executor> exec);
216 #endif // GKO_PUBLIC_CORE_SOLVER_NULLSPACE_HPP_
static std::unique_ptr< Nullspace > create(std::shared_ptr< const Executor > exec, std::vector< std::shared_ptr< const AbstractMultiVector >> basis, bool contains_constant=false)
Creates a Nullspace from an explicit basis.
Definition: lin_op.hpp:163
std::size_t size_type
Integral type used for allocation quantities.
Definition: types.hpp:102
Nullspace represents the (right or left) nullspace of an operator and is the orthogonal projector on...
Definition: nullspace.hpp:59
void project(ptr_param< AbstractMultiVector > v) const
Applies the projector in place: , for each column of v independently.
static std::unique_ptr< Nullspace > create_from_constant(std::shared_ptr< const Executor > exec, dim< 2 > size={})
Creates a Nullspace consisting only of the constant vector (e.g.
The Ginkgo namespace.
Definition: abstract_factory.hpp:19
size_type get_dimension() const noexcept
This class is used for function parameters in the place of raw pointers.
Definition: utils_helper.hpp:43
std::shared_ptr< const AbstractMultiVector > get_basis() const noexcept
bool contains_constant() const noexcept
This mixin is used to enable a default Cloneable::clone() implementation and similar for objects that...
Definition: polymorphic_object.hpp:372
Abstract interface class for (multi-)vector types.
Definition: multivector.hpp:81
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