|
dune-istl 2.12-git
|
Non-owning block vector view with explicit indices. More...
#include <dune/istl/experimental/vectorview.hh>

Public Types | |
| using | index_range_type = typename IndexedArrayView< B, R >::index_range_type |
| The type used for the index set. | |
| using | block_type = typename IndexedArrayView< B, R >::member_type |
| The type of blocks in the vector. | |
| using | size_type = typename IndexedArrayView< B, R >::size_type |
| The type used to count elements in the index set. | |
| using | value_type = typename IndexedArrayView< B, R >::member_type |
| The type of blocks in the vector. | |
| using | reference = typename IndexedArrayView< B, R >::reference |
| The type used for references to the blocks. | |
| using | const_reference = typename IndexedArrayView< B, R >::const_reference |
| The type used for const references to the blocks. | |
| using | Iterator = typename IndexedArrayView< B, R >::iterator |
| Iterator type with mutable access to the underlying blocks. | |
| using | ConstIterator = typename IndexedArrayView< B, R >::const_iterator |
| Iterator type with const access to the underlying blocks. | |
| using | field_type = typename FieldTraits< block_type >::field_type |
| The type of the field. | |
| using | real_type = typename FieldTraits< block_type >::real_type |
| The type of the real part of the field. | |
| using | member_type = std::iter_value_t< T > |
| The type of components in the array. | |
| using | index_type = typename OrderedIndexRangeTraits< index_range_type >::index_type |
| The type used for the index access. | |
| using | iterator = Iterator |
| Iterator type with mutable access to the underlying data. | |
| using | const_iterator = ConstIterator |
| Iterator type with const access to the underlying data. | |
Public Member Functions | |
| VectorView & | operator= (const field_type &k) noexcept(noexcept(std::declval< reference >()=std::declval< const field_type & >())) |
| Assign all entries to scalar k. | |
| template<class OtherB , class OtherR > | |
| VectorView & | operator+= (const VectorView< OtherB, OtherR > &y) noexcept(noexcept(this->checkSizeMatch(std::declval< const VectorView< OtherB, OtherR > & >())) &&noexcept(std::declval< reference >()+=std::declval< typename VectorView< OtherB, OtherR >::const_reference >())) |
| template<class OtherB , class OtherR > | |
| VectorView & | operator-= (const VectorView< OtherB, OtherR > &y) noexcept(noexcept(this->checkSizeMatch(std::declval< const VectorView< OtherB, OtherR > & >())) &&noexcept(std::declval< reference >() -=std::declval< typename VectorView< OtherB, OtherR >::const_reference >())) |
| VectorView & | operator*= (const field_type &k) noexcept(noexcept(std::declval< reference >() *=std::declval< const field_type & >())) |
| Scale all entries by k. | |
| VectorView & | operator/= (const field_type &k) noexcept(noexcept(std::declval< reference >()/=std::declval< const field_type & >())) |
| Divide all entries by k. | |
| template<class OtherB , class OtherR > | |
| VectorView & | axpy (const field_type &a, const VectorView< OtherB, OtherR > &y) noexcept(noexcept(this->checkSizeMatch(std::declval< const VectorView< OtherB, OtherR > & >())) &&noexcept(Dune::Impl::asVector(std::declval< reference >()) .axpy(std::declval< const field_type & >(), Dune::Impl::asVector(std::declval< typename VectorView< OtherB, OtherR >::const_reference >())))) |
| template<class OtherB , class OtherR > | |
| auto | operator* (const VectorView< OtherB, OtherR > &y) const noexcept(noexcept(this->checkSizeMatch(std::declval< const VectorView< OtherB, OtherR > & >())) &&noexcept(Dune::Impl::asVector(std::declval< const_reference >()) *Dune::Impl::asVector(std::declval< typename VectorView< OtherB, OtherR >::const_reference >()))) |
| Indefinite vector dot product \(\left (x^T \cdot y \right)\). | |
| template<class OtherB , class OtherR > | |
| auto | dot (const VectorView< OtherB, OtherR > &y) const noexcept(noexcept(this->checkSizeMatch(std::declval< const VectorView< OtherB, OtherR > & >())) &&noexcept(Dune::Impl::asVector(std::declval< const_reference >()) .dot(Dune::Impl::asVector(std::declval< typename VectorView< OtherB, OtherR >::const_reference >())))) |
| Vector dot product \(\left (x^H \cdot y \right)\). | |
| FieldTraits< field_type >::real_type | one_norm () const noexcept(noexcept(Dune::Impl::asVector(std::declval< const_reference >()).one_norm())) |
| One norm (sum over absolute values of entries) | |
| FieldTraits< field_type >::real_type | one_norm_real () const noexcept(noexcept(Dune::Impl::asVector(std::declval< const_reference >()).one_norm_real())) |
| Simplified one norm (uses Manhattan norm for complex values) | |
| FieldTraits< field_type >::real_type | two_norm () const noexcept(noexcept(two_norm2())) |
| Two norm sqrt(sum over squared values of entries) | |
| FieldTraits< field_type >::real_type | two_norm2 () const noexcept(noexcept(Dune::Impl::asVector(std::declval< const_reference >()).two_norm2())) |
| Square of the two-norm (the sum over the squared values of the entries) | |
| FieldTraits< field_type >::real_type | infinity_norm () const noexcept(noexcept(Dune::Impl::asVector(std::declval< const_reference >()).infinity_norm())) |
| Infinity norm (maximum of absolute values of entries) | |
| FieldTraits< field_type >::real_type | infinity_norm_real () const noexcept(noexcept(Dune::Impl::asVector(std::declval< const_reference >()).infinity_norm_real())) |
| Simplified infinity norm (uses Manhattan norm for complex values) | |
| size_type | N () const noexcept |
| Logical index span of the vector (size of index_set range), not stored entries. | |
| reference | operator[] (index_type i) |
| Access element by an index from the index set. | |
| const_reference | operator[] (index_type i) const |
| Const access element by an index from the index set. | |
| constexpr iterator | begin () noexcept(noexcept(iterator(data_, index_set_, size_type{}))) |
| Iterator to the first element in the view. | |
| constexpr const_iterator | begin () const noexcept(noexcept(iterator(data_, index_set_, size_type{}))) |
| Const iterator to the first element in the view. | |
| constexpr iterator | end () noexcept(noexcept(iterator(data_, index_set_, size_type{}))) |
| Iterator to one past the last element in the view. | |
| constexpr const_iterator | end () const noexcept(noexcept(iterator(data_, index_set_, size_type{}))) |
| Const iterator to one past the last element in the view. | |
| iterator | find (size_type i) |
Find element with index i in the index set. | |
| const_iterator | find (size_type i) const |
Find element with index i in the index set. | |
| bool | contains (index_type i) const |
| constexpr size_type | size () const noexcept(noexcept(std::ranges::size(index_set_))) |
| The number of elements in the view, i.e. the size of the index set. | |
| constexpr index_range_type | indexSet () const |
| The logical index range covered by the view, as determined by the index set. | |
Detailed Description
class Dune::Experimental::VectorView< B, R >
Non-owning block vector view with explicit indices.
This class extends IndexedArrayView with vector-space operations such as scaled addition and norms. Data ownership remains external.
Binary operations with another VectorView iterate over entries of the other vector and expect its indices to form a subset of this view's index set.
If DUNE_ISTL_WITH_CHECKING is enabled, index subset violations raise ISTLError. Without checking, violating this precondition is undefined behavior.
Member Typedef Documentation
◆ block_type
| using Dune::Experimental::VectorView< B, R >::block_type = typename IndexedArrayView<B, R>::member_type |
The type of blocks in the vector.
◆ const_iterator
|
inherited |
Iterator type with const access to the underlying data.
◆ const_reference
| using Dune::Experimental::VectorView< B, R >::const_reference = typename IndexedArrayView<B, R>::const_reference |
The type used for const references to the blocks.
◆ ConstIterator
| using Dune::Experimental::VectorView< B, R >::ConstIterator = typename IndexedArrayView<B, R>::const_iterator |
Iterator type with const access to the underlying blocks.
◆ field_type
| using Dune::Experimental::VectorView< B, R >::field_type = typename FieldTraits<block_type>::field_type |
The type of the field.
◆ index_range_type
| using Dune::Experimental::VectorView< B, R >::index_range_type = typename IndexedArrayView<B, R>::index_range_type |
The type used for the index set.
◆ index_type
|
inherited |
The type used for the index access.
◆ iterator
|
inherited |
Iterator type with mutable access to the underlying data.
◆ Iterator
| using Dune::Experimental::VectorView< B, R >::Iterator = typename IndexedArrayView<B, R>::iterator |
Iterator type with mutable access to the underlying blocks.
◆ member_type
|
inherited |
The type of components in the array.
◆ real_type
| using Dune::Experimental::VectorView< B, R >::real_type = typename FieldTraits<block_type>::real_type |
The type of the real part of the field.
◆ reference
| using Dune::Experimental::VectorView< B, R >::reference = typename IndexedArrayView<B, R>::reference |
The type used for references to the blocks.
◆ size_type
| using Dune::Experimental::VectorView< B, R >::size_type = typename IndexedArrayView<B, R>::size_type |
The type used to count elements in the index set.
◆ value_type
| using Dune::Experimental::VectorView< B, R >::value_type = typename IndexedArrayView<B, R>::member_type |
The type of blocks in the vector.
Member Function Documentation
◆ axpy()
|
inlinenoexcept |
AXPY operation on indices from y: this += a * y. Requires y's indices to be a subset of this vector's indices.
◆ begin() [1/2]
|
inlineconstexprnoexceptinherited |
Const iterator to the first element in the view.
◆ begin() [2/2]
|
inlineconstexprnoexceptinherited |
Iterator to the first element in the view.
◆ contains()
|
inlineinherited |
◆ dot()
|
inlinenoexcept |
Vector dot product \(\left (x^H \cdot y \right)\).
◆ end() [1/2]
|
inlineconstexprnoexceptinherited |
Const iterator to one past the last element in the view.
◆ end() [2/2]
|
inlineconstexprnoexceptinherited |
Iterator to one past the last element in the view.
◆ find() [1/2]
|
inlineinherited |
Find element with index i in the index set.
- Returns
- Iterator to the element with index
i, or end() ifiis not present.
◆ find() [2/2]
|
inlineinherited |
Find element with index i in the index set.
- Returns
- Const iterator to the element with index
i, or end() ifiis not present.
◆ indexSet()
|
inlineconstexprinherited |
The logical index range covered by the view, as determined by the index set.
◆ infinity_norm()
|
inlinenoexcept |
Infinity norm (maximum of absolute values of entries)
◆ infinity_norm_real()
|
inlinenoexcept |
Simplified infinity norm (uses Manhattan norm for complex values)
◆ N()
|
inlinenoexcept |
Logical index span of the vector (size of index_set range), not stored entries.
◆ one_norm()
|
inlinenoexcept |
One norm (sum over absolute values of entries)
◆ one_norm_real()
|
inlinenoexcept |
Simplified one norm (uses Manhattan norm for complex values)
◆ operator*()
|
inlinenoexcept |
Indefinite vector dot product \(\left (x^T \cdot y \right)\).
◆ operator*=()
|
inlinenoexcept |
Scale all entries by k.
◆ operator+=()
|
inlinenoexcept |
Add entries from y to this vector at indices contained in y. Requires y's indices to be a subset of this vector's indices.
◆ operator-=()
|
inlinenoexcept |
Subtract entries from y from this vector at indices contained in y. Requires y's indices to be a subset of this vector's indices.
◆ operator/=()
|
inlinenoexcept |
Divide all entries by k.
◆ operator=()
|
inlinenoexcept |
Assign all entries to scalar k.
◆ operator[]() [1/2]
|
inlineinherited |
Access element by an index from the index set.
- Parameters
-
i Index from the index set.
- Exceptions
-
ISTLError if bounds checking is enabled and iis not present.
◆ operator[]() [2/2]
|
inlineinherited |
Const access element by an index from the index set.
- Parameters
-
i Index from the index set.
- Exceptions
-
ISTLError if bounds checking is enabled and iis not present.
◆ size()
|
inlineconstexprnoexceptinherited |
The number of elements in the view, i.e. the size of the index set.
◆ two_norm()
|
inlinenoexcept |
Two norm sqrt(sum over squared values of entries)
◆ two_norm2()
|
inlinenoexcept |
Square of the two-norm (the sum over the squared values of the entries)
The documentation for this class was generated from the following file:
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8