|
dune-istl 2.12-git
|
Loading...
Searching...
No Matches
matrixview.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
309 using iter_const_reference_t = std::common_reference_t<const std::iter_value_t<B>&&, std::iter_reference_t<B>>;
346 constexpr block_const_iter_type& operator=(const B& it) noexcept(std::is_nothrow_copy_assignable_v<B>)
388 : public Dune::IteratorFacade<Iterator, std::random_access_iterator_tag, row_type, row_type, Dune::ProxyArrowResult<row_type>>
390 using Facade = Dune::IteratorFacade<Iterator, std::random_access_iterator_tag, row_type, row_type, Dune::ProxyArrowResult<row_type>>;
431 : public Dune::IteratorFacade<ConstIterator, std::random_access_iterator_tag, const_row_type, const_row_type, Dune::ProxyArrowResult<const_row_type>>
433 using Facade = Dune::IteratorFacade<ConstIterator, std::random_access_iterator_tag, const_row_type, const_row_type, Dune::ProxyArrowResult<const_row_type>>;
441 constexpr ConstIterator(const Iterator& it) noexcept(std::is_nothrow_copy_constructible_v<Iterator>)
446 constexpr ConstIterator &operator=(const Iterator &other) noexcept(std::is_nothrow_copy_assignable_v<Iterator>)
742 constexpr bool hasNaN = std::numeric_limits<real_type>::has_quiet_NaN || std::numeric_limits<real_type>::has_signaling_NaN;
770 auto MatrixView<B, I>::infinity_norm_real() const -> typename FieldTraits<field_type>::real_type
773 constexpr bool hasNaN = std::numeric_limits<real_type>::has_quiet_NaN || std::numeric_limits<real_type>::has_signaling_NaN;
Indexed vector view over random-access data with explicit indices.
STL namespace.
Definition experimental/bcrsmatrix.hh:21
static constexpr size_type M()
static constexpr size_type N()
void umtv(const X &x, Y &y) const
double frobenius_norm2() const
std::ptrdiff_t index() const
#define DUNE_THROW(E,...)
T field_type
T real_type
ConstIterator const_iterator
Iterator type with const access to the underlying data.
Definition indexedarrayview.hh:204
Iterator iterator
Iterator type with mutable access to the underlying data.
Definition indexedarrayview.hh:202
bool contains(index_type i) const
Definition indexedarrayview.hh:229
Non-owning matrix view over external block storage and pattern.
Definition matrixview.hh:54
FieldTraits< field_type >::real_type infinity_norm() const
Return the block-aware infinity norm.
Definition matrixview.hh:739
void umtv(const X &x, Y &y) const
Compute .
Definition matrixview.hh:668
MatrixView & operator/=(const field_type &k)
Divide all stored blocks by k.
Definition matrixview.hh:487
void mv(const X &x, Y &y) const
Compute .
Definition matrixview.hh:623
MatrixView(block_iter_type block_iter, pattern_type const *pattern_ptr) noexcept
Construct a view from data iterator and sparsity pattern.
Definition matrixview.hh:104
Iterator begin()
Return iterator to the first row.
Definition matrixview.hh:115
std::iter_value_t< block_iter_type > block_type
The type of blocks in the matrix.
Definition matrixview.hh:70
size_type nonzeroes() const
Number of stored block entries.
Definition matrixview.hh:219
P pattern_type
The type used for the sparsity pattern.
Definition matrixview.hh:66
void usmhv(const field_type &alpha, const X &x, Y &y) const
Compute (Hermitian transpose).
Definition matrixview.hh:713
MatrixView & axpy(field_type alpha, const MatrixView< OtherB, OtherI > &b)
Compute .
B block_iter_type
The iterator type used to access the blocks of the matrix.
Definition matrixview.hh:57
ConstIterator cend() const
Return const iterator one past the last row.
Definition matrixview.hh:130
ConstIterator end() const
Return const iterator one past the last row.
Definition matrixview.hh:124
MatrixView & operator*=(const field_type &k)
Scale all stored blocks by k.
Definition matrixview.hh:478
block_const_iter_type blockIter() const
Return the underlying block iterator as a const iterator.
Definition matrixview.hh:275
FieldTraits< field_type >::real_type infinity_norm_real() const
Return simplified infinity norm (Manhattan norm for complex values).
Definition matrixview.hh:770
void usmtv(const field_type &alpha, const X &x, Y &y) const
Compute .
Definition matrixview.hh:686
size_type M() const
Number of block columns.
Definition matrixview.hh:211
void mmv(const X &x, Y &y) const
Compute .
Definition matrixview.hh:641
FieldTraits< field_type >::real_type frobenius_norm() const
Return the Frobenius norm .
Definition matrixview.hh:721
const_row_type operator[](size_type i) const
Return a const view of row i.
Definition matrixview.hh:112
std::ranges::range_value_t< pattern_type > row_index_range_type
The type used for the index set of rows.
Definition matrixview.hh:68
const pattern_type & pattern() const
Definition matrixview.hh:248
size_type N() const
Number of block rows.
Definition matrixview.hh:208
typename const_row_type::const_iterator ConstColIterator
The type of const row iterators over the column blocks.
Definition matrixview.hh:96
void mtv(const X &x, Y &y) const
Compute .
Definition matrixview.hh:659
void resetView(block_iter_type block_iter, pattern_type const *pattern_ptr)
Reset the view to point to block_iter and pattern_ptr.
Definition matrixview.hh:263
MatrixView & operator+=(const MatrixView< OtherB, OtherI > &b)
Add another matrix view to this one.
ConstIterator begin() const
Return const iterator to the first row.
Definition matrixview.hh:121
void umhv(const X &x, Y &y) const
Compute (Hermitian transpose).
Definition matrixview.hh:695
typename FieldTraits< block_type >::field_type field_type
The type of the field.
Definition matrixview.hh:76
FieldTraits< field_type >::real_type frobenius_norm2() const
Return (sum of squared block Frobenius norms).
Definition matrixview.hh:728
pattern_type const * patternPtr() const
Return the underlying pattern pointer.
Definition matrixview.hh:280
void usmv(const field_type &alpha, const X &x, Y &y) const
Compute .
Definition matrixview.hh:650
void umv(const X &x, Y &y) const
Compute .
Definition matrixview.hh:632
block_iter_type blockIter()
Return the underlying block iterator.
Definition matrixview.hh:270
row_type operator[](size_type i)
Return a mutable view of row i.
Definition matrixview.hh:109
bool exists(size_type i, size_type j) const DUNE_ISTL_WITH_CHECKING_NOEXCEPT
Test whether position is present in the sparsity pattern.
Definition matrixview.hh:198
MatrixView & operator=(const field_type &k)
Assign all stored blocks to scalar k.
Definition matrixview.hh:542
std::ranges::range_size_t< pattern_type > size_type
The type used to count elements in the row and column index sets.
Definition matrixview.hh:74
void mmhv(const X &x, Y &y) const
Compute (Hermitian transpose).
Definition matrixview.hh:704
MatrixView & operator-=(const MatrixView< OtherB, OtherI > &b)
Subtract another matrix view from this one.
typename row_type::iterator ColIterator
The type of mutable row iterators over the column blocks.
Definition matrixview.hh:94
void mmtv(const X &x, Y &y) const
Compute .
Definition matrixview.hh:677
Iterator end()
Return iterator one past the last row.
Definition matrixview.hh:118
ConstIterator cbegin() const
Return const iterator to the first row.
Definition matrixview.hh:127
Const block iterator adapter.
Definition matrixview.hh:324
constexpr block_const_iter_type() noexcept=default
Default constructor.
constexpr friend auto operator<=>(const block_const_iter_type &it1, const B &it2) noexcept
Compare const iterators for equality and ordering.
Definition matrixview.hh:356
constexpr friend auto operator<=>(const B &it1, const block_const_iter_type &it2) noexcept
Compare const iterators for equality and ordering.
Definition matrixview.hh:363
typename Facade::reference reference
The type used for references to the components.
Definition matrixview.hh:333
constexpr reference operator*() const
Reference to the component at the current iterator position.
Definition matrixview.hh:353
constexpr block_const_iter_type & operator=(const B &it) noexcept(std::is_nothrow_copy_assignable_v< B >)
Copy assignment operator from a mutable iterator.
Definition matrixview.hh:346
typename Facade::difference_type difference_type
The type used for differences between iterators.
Definition matrixview.hh:335
Mutable random-access iterator over matrix rows.
Definition matrixview.hh:389
constexpr reference operator*() const
Dereference to the row view at the current row index.
Definition matrixview.hh:400
constexpr size_type index() const
Return the current logical row index.
Definition matrixview.hh:406
typename Facade::reference reference
Definition matrixview.hh:397
Const random-access iterator over matrix rows.
Definition matrixview.hh:432
constexpr reference operator*() const
Dereference to the const row view at the current row index.
Definition matrixview.hh:455
constexpr ConstIterator & operator=(const Iterator &other) noexcept(std::is_nothrow_copy_assignable_v< Iterator >)
Assign from mutable iterator.
Definition matrixview.hh:446
ConstIterator() noexcept=default
Default constructor creating a singular iterator.
constexpr size_type index() const
Return the current logical row index.
Definition matrixview.hh:461
typename Facade::reference reference
Definition matrixview.hh:452
Non-owning block vector view with explicit indices.
Definition vectorview.hh:59
T fegetenv(T... args)
T max(T... args)
T sqrt(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8