|
Uni20
Asynchronous tensor and runtime library.
|
Krylov vector algebra for one exact owning BlockTensor structure. More...
#include <block_tensor_vector.hpp>
Public Types | |
| using | codomain_type = typename tensor_type::codomain_type |
| using | domain_type = typename tensor_type::domain_type |
| using | key_type = typename tensor_type::key_type |
| using | real_type = make_real_t< scalar_type > |
| using | scalar_type = typename tensor_type::value_type |
| using | tensor_type = std::remove_cvref_t< Tensor > |
Public Member Functions | |
| auto | allocate_like (tensor_type const &vector) const -> tensor_type |
| Allocate a vector with the frozen structure and unspecified values. | |
| template<BorrowedBlockTensorView View> requires detail::CompatibleBlockVector<View, tensor_type> | |
| auto | allocate_like (View const &view) const -> tensor_type |
| Allocate owning workspace from retained view metadata and its leaf context. | |
| void | axpy (tensor_type &output, scalar_type factor, tensor_type const &input) const |
| Add a scalar multiple of one input to an output. | |
| BlockTensorVectorOps (tensor_type const &prototype) | |
| Freeze the Krylov vector space represented by a prototype tensor. | |
| void | copy (tensor_type &output, tensor_type const &input) const |
| Copy one vector into another without changing either structure. | |
| auto | inner_product (tensor_type const &lhs, tensor_type const &rhs) const -> scalar_type |
| Return the conjugate-linear inner product as a host scalar. | |
| auto | norm (tensor_type const &vector) const -> real_type |
| Return the Euclidean norm as a host scalar. | |
| auto | problem_dimension () const noexcept -> std::size_t |
| Return the number of stored numerical degrees of freedom. | |
| template<class Vector > requires detail::CompatibleBlockVector<Vector, tensor_type> && (std::is_lvalue_reference_v<Vector&&> || BorrowedBlockTensorView<Vector>) | |
| auto | prototype_view (Vector &&vector) const |
| Own prototype metadata while borrowing its numerical payload and allocation context. | |
| void | scal (tensor_type &vector, scalar_type factor) const |
| Scale one vector in place. | |
| void | set_zero (tensor_type &vector) const |
| Set every stored numerical block to zero. | |
| template<class Vector > requires detail::CompatibleBlockVector<Vector, tensor_type> | |
| auto | vector_dimension (Vector const &vector) const -> std::size_t |
| Validate a vector and return the frozen problem dimension. | |
Krylov vector algebra for one exact owning BlockTensor structure.
The prototype supplied at construction fixes the vector space: symmetry, domain, codomain, stored-key pattern, scalar type, and storage policy. allocate_like reproduces that structure without flattening it. An operator-specific adapter may derive from or contain this class and add matvec.
| Tensor | Owning BlockTensor value type. |
| using uni20::krylov::BlockTensorVectorOps< Tensor >::codomain_type = typename tensor_type::codomain_type |
| using uni20::krylov::BlockTensorVectorOps< Tensor >::domain_type = typename tensor_type::domain_type |
| using uni20::krylov::BlockTensorVectorOps< Tensor >::key_type = typename tensor_type::key_type |
| using uni20::krylov::BlockTensorVectorOps< Tensor >::real_type = make_real_t<scalar_type> |
| using uni20::krylov::BlockTensorVectorOps< Tensor >::scalar_type = typename tensor_type::value_type |
| using uni20::krylov::BlockTensorVectorOps< Tensor >::tensor_type = std::remove_cvref_t<Tensor> |
|
inlineexplicit |
Freeze the Krylov vector space represented by a prototype tensor.
|
inline |
Allocate a vector with the frozen structure and unspecified values.
Krylov algorithms overwrite the result through copy, matvec, or set_zero before any read.
| std::invalid_argument | If vector is not a member of this vector space. |
|
inline |
Allocate owning workspace from retained view metadata and its leaf context.
|
inline |
Add a scalar multiple of one input to an output.
|
inline |
Copy one vector into another without changing either structure.
|
inline |
Return the conjugate-linear inner product as a host scalar.
|
inline |
Return the Euclidean norm as a host scalar.
|
inlinenoexcept |
Return the number of stored numerical degrees of freedom.
|
inline |
Own prototype metadata while borrowing its numerical payload and allocation context.
Temporary borrowed views are accepted; temporary owners are not.
|
inline |
Scale one vector in place.
|
inline |
Set every stored numerical block to zero.
|
inline |
Validate a vector and return the frozen problem dimension.
| std::invalid_argument | If the vector does not belong to this exact BlockTensor vector space. |