DUNE PDELab (git)
scaledidmatrix.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
57 };
121 typedef ContainerWrapperIterator<const WrapperType, const_reference, const_reference> ConstIterator;
205 return ScaledIdentityMatrix<typename PromotionTraits<K,Scalar>::PromotedType, n>{matrix.scalar()*scalar};
213 return ScaledIdentityMatrix<typename PromotionTraits<Scalar,K>::PromotedType, n>{scalar*matrix.scalar()};
Iterator class for sparse vector-like containers.
Definition: diagonalmatrix.hh:997
A multiple of the identity matrix of static size.
Definition: scaledidmatrix.hh:30
void usmhv(const K &alpha, const X &x, Y &y) const
y += alpha A^H x
Definition: scaledidmatrix.hh:349
void mmtv(const X &x, Y &y) const
y -= A^T x
Definition: scaledidmatrix.hh:301
ScaledIdentityMatrix & operator-=(const ScaledIdentityMatrix &y)
vector space subtraction
Definition: scaledidmatrix.hh:165
const_row_type::ConstIterator ConstColIterator
rename the iterators for easier access
Definition: scaledidmatrix.hh:127
ConstIterator end() const
end iterator
Definition: scaledidmatrix.hh:136
bool operator!=(const ScaledIdentityMatrix &other) const
incomparison operator
Definition: scaledidmatrix.hh:225
void mmv(const X &x, Y &y) const
y -= A x
Definition: scaledidmatrix.hh:289
std::size_t size_type
The type used for the index access and size operations.
Definition: scaledidmatrix.hh:43
void usmv(const K &alpha, const X &x, Y &y) const
y += alpha A x
Definition: scaledidmatrix.hh:325
row_type::Iterator ColIterator
rename the iterators for easier access
Definition: scaledidmatrix.hh:91
void mv(const X &x, Y &y) const
y = A x
Definition: scaledidmatrix.hh:234
void umtv(const X &x, Y &y) const
y += A^T x
Definition: scaledidmatrix.hh:265
void umhv(const X &x, Y &y) const
y += A^H x
Definition: scaledidmatrix.hh:277
DiagonalRowVector< K, n > row_type
Each row is implemented by a field vector.
Definition: scaledidmatrix.hh:46
ContainerWrapperIterator< const WrapperType, reference, reference > Iterator
Iterator class for sequential access.
Definition: scaledidmatrix.hh:85
K determinant() const
calculates the determinant of this matrix
Definition: scaledidmatrix.hh:404
K field_type
export the type representing the field
Definition: scaledidmatrix.hh:37
void usmtv(const K &alpha, const X &x, Y &y) const
y += alpha A^T x
Definition: scaledidmatrix.hh:337
Iterator iterator
typedef for stl compliant access
Definition: scaledidmatrix.hh:87
const K & scalar() const
Get const reference to the scalar diagonal value.
Definition: scaledidmatrix.hh:473
void umv(const X &x, Y &y) const
y += A x
Definition: scaledidmatrix.hh:253
const K & diagonal(size_type) const
Get const reference to diagonal entry.
Definition: scaledidmatrix.hh:460
ContainerWrapperIterator< const WrapperType, const_reference, const_reference > ConstIterator
Iterator class for sequential access.
Definition: scaledidmatrix.hh:121
K & diagonal(size_type)
Get reference to diagonal entry.
Definition: scaledidmatrix.hh:466
void solve(V &x, const V &b) const
Solve system A x = b.
Definition: scaledidmatrix.hh:390
bool exists(size_type i, size_type j) const
return true when (i,j) is in pattern
Definition: scaledidmatrix.hh:425
Iterator RowIterator
rename the iterators for easier access
Definition: scaledidmatrix.hh:89
ConstIterator const_iterator
typedef for stl compliant access
Definition: scaledidmatrix.hh:123
ScaledIdentityMatrix()
Default constructor.
Definition: scaledidmatrix.hh:62
bool operator==(const ScaledIdentityMatrix &other) const
comparison operator
Definition: scaledidmatrix.hh:219
ConstIterator beforeBegin() const
Definition: scaledidmatrix.hh:150
ScaledIdentityMatrix & operator/=(const K &k)
vector space division by scalar
Definition: scaledidmatrix.hh:192
friend std::ostream & operator<<(std::ostream &s, const ScaledIdentityMatrix< K, n > &a)
Sends the matrix to an output stream.
Definition: scaledidmatrix.hh:437
FieldTraits< field_type >::real_type frobenius_norm2() const
square of frobenius norm, need for block recursion
Definition: scaledidmatrix.hh:368
FieldTraits< field_type >::real_type frobenius_norm() const
frobenius norm: sqrt(sum over squared values of entries)
Definition: scaledidmatrix.hh:362
FieldTraits< field_type >::real_type infinity_norm() const
infinity norm (row sum norm, how to generalize for blocks?)
Definition: scaledidmatrix.hh:374
ConstIterator ConstRowIterator
rename the iterators for easier access
Definition: scaledidmatrix.hh:125
ConstIterator beforeEnd() const
Definition: scaledidmatrix.hh:143
size_type M() const
number of blocks in column direction
Definition: scaledidmatrix.hh:417
const_reference operator[](size_type i) const
Return const_reference object as row replacement.
Definition: scaledidmatrix.hh:454
ScaledIdentityMatrix(const K &k)
Constructor initializing the whole matrix with a scalar.
Definition: scaledidmatrix.hh:66
friend auto operator*(const ScaledIdentityMatrix &matrix, Scalar scalar)
vector space multiplication with scalar
Definition: scaledidmatrix.hh:203
FieldTraits< field_type >::real_type infinity_norm_real() const
simplified infinity norm (uses Manhattan norm for complex values)
Definition: scaledidmatrix.hh:380
ScaledIdentityMatrix & operator*=(const K &k)
vector space multiplication with scalar
Definition: scaledidmatrix.hh:185
K & scalar()
Get reference to the scalar diagonal value.
Definition: scaledidmatrix.hh:480
K block_type
export the type representing the components
Definition: scaledidmatrix.hh:40
void mmhv(const X &x, Y &y) const
y -= A^H x
Definition: scaledidmatrix.hh:313
ScaledIdentityMatrix & operator+=(const ScaledIdentityMatrix &y)
vector space addition
Definition: scaledidmatrix.hh:158
void mtv(const X &x, Y &y) const
y = A^T x
Definition: scaledidmatrix.hh:246
reference operator[](size_type i)
Return reference object as row replacement.
Definition: scaledidmatrix.hh:448
ConstIterator begin() const
begin iterator
Definition: scaledidmatrix.hh:130
size_type N() const
number of blocks in row direction
Definition: scaledidmatrix.hh:411
This file implements a quadratic diagonal matrix of fixed size.
A few common exception classes.
Implements a matrix constructed from a given type representing a field and compile-time given number ...
Type traits to determine the type of reals (when working with complex numbers)
typename Overloads::ScalarType< std::decay_t< V > >::type Scalar
Element type of some SIMD type.
Definition: interface.hh:235
K conjugateComplex(const K &x)
compute conjugate complex of x
Definition: math.hh:164
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 24, 23:30, 2024)