|
| bool | contains_constant () const noexcept |
| |
| size_type | get_dimension () const noexcept |
| |
| std::shared_ptr< const AbstractMultiVector > | get_basis () const noexcept |
| |
| void | project (ptr_param< AbstractMultiVector > v) const |
| | Applies the projector in place: \( v \leftarrow (I - V V^H) v \), for each column of v independently. More...
|
| |
|
Nullspace & | operator= (const Nullspace &other) |
| |
|
Nullspace & | operator= (Nullspace &&other) |
| |
|
| Nullspace (const Nullspace &other) |
| |
|
| Nullspace (Nullspace &&other) |
| |
| void | apply (ptr_param< const AbstractMultiVector > b, ptr_param< AbstractMultiVector > x) const |
| | Applies a linear operator to a vector (or a sequence of vectors). More...
|
| |
| void | apply (ptr_param< const AbstractMultiVector > alpha, ptr_param< const AbstractMultiVector > b, ptr_param< const AbstractMultiVector > beta, ptr_param< AbstractMultiVector > x) const |
| | Performs the operation x = alpha * op(b) + beta * x. More...
|
| |
|
template<typename DenseIn , typename DenseOut , typename = std::enable_if_t<is_dense_ptr<DenseIn> && is_dense_ptr<DenseOut>>> |
| void | apply (const DenseIn &b, DenseOut &&x) const |
| |
|
template<typename DenseAlpha , typename DenseIn , typename DenseBeta , typename DenseOut , typename = std::enable_if_t< is_dense_ptr<DenseAlpha> && is_dense_ptr<DenseIn> && is_dense_ptr<DenseBeta> && is_dense_ptr<DenseOut>>> |
| void | apply (const DenseAlpha &alpha, const DenseIn &b, const DenseBeta &beta, DenseOut &&x) const |
| |
| const dim< 2 > & | get_size () const noexcept |
| | Returns the size of the operator. More...
|
| |
| virtual bool | apply_uses_initial_guess () const |
| | Returns true if the linear operator uses the data given in x as an initial guess. More...
|
| |
| LinOp & | operator= (const LinOp &)=default |
| | Copy-assigns a LinOp. More...
|
| |
| LinOp & | operator= (LinOp &&other) |
| | Move-assigns a LinOp. More...
|
| |
| | LinOp (const LinOp &)=default |
| | Copy-constructs a LinOp. More...
|
| |
| | LinOp (LinOp &&other) |
| | Move-constructs a LinOp. More...
|
| |
|
virtual void | validate_data () const |
| | Throws gko::InvalidData exception if we found the data inside the object does not fulfill certain property up to our knowledge.
|
| |
|
PolymorphicObject & | operator= (const PolymorphicObject &) |
| |
| std::shared_ptr< const Executor > | get_executor () const noexcept |
| | Returns the Executor of the object. More...
|
| |
|
void | add_logger (std::shared_ptr< const Logger > logger) override |
| |
|
void | remove_logger (const Logger *logger) override |
| |
|
void | remove_logger (ptr_param< const Logger > logger) |
| |
|
const std::vector< std::shared_ptr< const Logger > > & | get_loggers () const override |
| |
|
void | clear_loggers () override |
| |
|
void | remove_logger (ptr_param< const Logger > logger) |
| |
| std::unique_ptr< Nullspace< ValueType > > | clone (std::shared_ptr< const Executor > exec) const |
| | Creates a clone of the object. More...
|
| |
| std::unique_ptr< Nullspace< ValueType > > | clone () const |
| | Creates a clone of the object. More...
|
| |
| void | convert_to (result_type *result) const override |
| | Converts the implementer to an object of type result_type. More...
|
| |
| void | move_to (result_type *result) override |
| | Converts the implementer to an object of type result_type by moving data from this object. More...
|
| |
|
std::unique_ptr< Nullspace< ValueType > > | create_default () const |
| |
|
std::unique_ptr< Nullspace< ValueType > > | create_default (std::shared_ptr< const Executor > exec) const |
| |
|
void | convert_to (ptr_param< result_type > result) const |
| |
|
void | move_to (ptr_param< result_type > result) |
| |
|
std::unique_ptr< Cloneable > | clone (std::shared_ptr< const Executor > exec) const |
| |
|
std::unique_ptr< Cloneable > | clone () const |
| |
|
Cloneable * | copy_from (ptr_param< const Cloneable > other) |
| |
|
Cloneable * | move_from (ptr_param< Cloneable > other) |
| |
|
std::unique_ptr< Cloneable > | create_default (std::shared_ptr< const Executor > exec) const |
| |
|
std::unique_ptr< Cloneable > | create_default () const |
| |
template<typename ValueType = default_precision>
class gko::solver::Nullspace< ValueType >
Nullspace represents the (right or left) nullspace of an operator and is the orthogonal projector \( P = I - V V^H \) onto its complement, where \( V \) is an orthonormal basis of the nullspace.
- The constant vector is handled implicitly by subtracting the mean, so a constant-only nullspace works with any vector layout (
matrix::MultiVector or experimental::distributed::Vector with any partition).
- An explicit basis is copied and orthonormalized once at creation time (twice-iterated Gram-Schmidt, also against the constant if it is part of the nullspace). Columns that are numerically linearly dependent (relative norm below \( \sqrt{\epsilon} \) after orthogonalization) are dropped; get_dimension() reports the remaining dimension.
- project() removes the nullspace components of all columns of its input \( X \) at once: the coefficients \( C = V^H X \) and the column means are computed in a single pass (and, for distributed vectors, a single all-reduce), followed by \( X \leftarrow X - V C \).
The typical use is as the nullspace / left_nullspace parameter of an iterative solver, see enable_preconditioned_iterative_solver_factory_parameters.
The object is immutable after creation apart from internal scratch buffers. Solvers and preconditioner::NullspaceProjection work on their own copy, which shares the basis, so the same object can be passed to any number of factories. Like other Ginkgo LinOps with internal caches, a single instance must not be applied concurrently from multiple threads.
- Template Parameters
-
| ValueType | the value type of the vectors it projects. |