DUNE-FEM (unstable)
fmatrix.hh
Go to the documentation of this file.
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
549 friend constexpr auto operator<=> (const FieldMatrix& a, const FieldMatrix<OtherK,ROWS,COLS>& b) noexcept
598 static constexpr K invertMatrix_retTransposed (const FieldMatrix<K,1,1> &matrix, FieldMatrix<K,1,1> &inverse)
622 static constexpr K invertMatrix_retTransposed (const FieldMatrix<K,2,2> &matrix, FieldMatrix<K,2,2> &inverse)
667 static constexpr K invertMatrix_retTransposed (const FieldMatrix<K,3,3> &matrix, FieldMatrix<K,3,3> &inverse)
716 static constexpr void multTransposedMatrix(const FieldMatrix<K,rows,cols> &matrix, FieldMatrix<K,cols,cols>& ret)
733 static constexpr void multAssignTransposed( const FieldMatrix<K,rows,cols> &matrix, const FieldVector<K,rows> & x, FieldVector<K,cols> & ret)
747 static constexpr FieldVector<K,rows> mult(const FieldMatrix<K,rows,cols> &matrix, const FieldVector<K,cols> & x)
756 static constexpr FieldVector<K,cols> multTransposed(const FieldMatrix<K,rows,cols> &matrix, const FieldVector<K,rows> & x)
Macro for wrapping boundary checks.
constexpr size_type M() const
number of columns
Definition: densematrix.hh:708
FieldMatrix< K, ROWS, COLS > & rightmultiply(const DenseMatrix< M2 > &M)
Multiplies M from the right to this matrix.
Definition: densematrix.hh:650
Traits::value_type value_type
export the type representing the field
Definition: densematrix.hh:162
constexpr derived_type operator-() const
Matrix negation.
Definition: densematrix.hh:303
constexpr void mtv(const X &x, Y &y) const
y = A^T x
Definition: densematrix.hh:392
Traits::row_type row_type
The type used to represent a row (must fulfill the Dune::DenseVector interface)
Definition: densematrix.hh:174
Traits::size_type size_type
The type used for the index access and size operation.
Definition: densematrix.hh:171
Traits::const_row_reference const_row_reference
The type used to represent a reference to a constant row (usually const row_type &)
Definition: densematrix.hh:180
Traits::row_reference row_reference
The type used to represent a reference to a row (usually row_type &)
Definition: densematrix.hh:177
typename Base::size_type size_type
The type used for the index access and size operation.
Definition: fmatrix.hh:158
constexpr FieldMatrix & operator/=(const S &scalar)
division by scalar
Definition: fmatrix.hh:372
constexpr FieldMatrix< K, rows, l > rightmultiplyany(const FieldMatrix< K, cols, l > &M) const
Multiplies M from the right to this matrix, this matrix is not modified.
Definition: fmatrix.hh:473
constexpr FieldMatrix() noexcept(std::is_nothrow_default_constructible_v< K >)
Default constructor, making value-initialized matrix with all components set to zero.
Definition: fmatrix.hh:184
static constexpr std::integral_constant< int, ROWS > rows
The number of rows.
Definition: fmatrix.hh:152
static constexpr std::integral_constant< int, COLS > cols
The number of columns.
Definition: fmatrix.hh:155
constexpr FieldMatrix & rightmultiply(const FieldMatrix< K, r, c > &M)
Multiplies M from the right to this matrix.
Definition: fmatrix.hh:456
constexpr FieldMatrix & operator+=(const S &scalar)
add scalar
Definition: fmatrix.hh:268
constexpr FieldMatrix & operator-=(const S &scalar)
subtract scalar
Definition: fmatrix.hh:309
friend constexpr auto operator*(const FieldMatrix &matrix, const S &scalar)
vector space multiplication with scalar
Definition: fmatrix.hh:320
constexpr FieldMatrix(std::initializer_list< Dune::FieldVector< K, cols > > const &l)
Constructor initializing the matrix from a nested list of values.
Definition: fmatrix.hh:190
friend constexpr auto operator<=>(const FieldMatrix &a, const FieldMatrix< OtherK, ROWS, COLS > &b) noexcept
three-way comparison of FieldMatrix
Definition: fmatrix.hh:549
typename Base::row_type row_type
The type the rows of the matrix are represented by.
Definition: fmatrix.hh:170
friend constexpr auto operator+(const FieldMatrix &matrixA, const FieldMatrix< OtherK, ROWS, COLS > &matrixB)
vector space addition
Definition: fmatrix.hh:238
typename Base::const_row_reference const_row_reference
The type used for const references to the rows of the matrix.
Definition: fmatrix.hh:176
constexpr FieldMatrix & operator*=(const S &scalar)
multiplication with scalar
Definition: fmatrix.hh:342
friend constexpr bool operator==(const FieldMatrix &a, const S &b) noexcept
comparing FieldMatrix<1,1> with scalar for equality
Definition: fmatrix.hh:532
typename Base::value_type value_type
The type of the elements stored in the matrix.
Definition: fmatrix.hh:161
const value_type & const_reference
The type used for const references to the matrix entries.
Definition: fmatrix.hh:167
constexpr FieldMatrix< K, COLS, ROWS > transposed() const
Return transposed of the matrix as FieldMatrix.
Definition: fmatrix.hh:223
friend constexpr auto operator/(const FieldMatrix &matrix, const S &scalar)
vector space division by scalar
Definition: fmatrix.hh:353
constexpr FieldMatrix< K, l, cols > leftmultiplyany(const FieldMatrix< K, l, rows > &M) const
Multiplies M from the left to this matrix, this matrix is not modified.
Definition: fmatrix.hh:447
typename Base::row_reference row_reference
The type used for references to the rows of the matrix.
Definition: fmatrix.hh:173
value_type & reference
The type used for references to the matrix entries.
Definition: fmatrix.hh:164
The concept std::three_way_comparable_with specifies that the three way comparison operator <=> on (p...
Definition: compare.hh:100
Implements a matrix constructed from a given type representing a field and a compile-time given numbe...
A few common exception classes.
static constexpr void multAssignTransposed(const FieldMatrix< K, rows, cols > &matrix, const FieldVector< K, rows > &x, FieldVector< K, cols > &ret)
calculates ret = matrix^T * x
Definition: fmatrix.hh:733
static constexpr FieldVector< K, cols > multTransposed(const FieldMatrix< K, rows, cols > &matrix, const FieldVector< K, rows > &x)
calculates ret = matrix^T * x
Definition: fmatrix.hh:756
static constexpr K invertMatrix_retTransposed(const FieldMatrix< K, 1, 1 > &matrix, FieldMatrix< K, 1, 1 > &inverse)
invert scalar without changing the original matrix
Definition: fmatrix.hh:598
static constexpr void multTransposedMatrix(const FieldMatrix< K, rows, cols > &matrix, FieldMatrix< K, cols, cols > &ret)
calculates ret= A_t*A
Definition: fmatrix.hh:716
static constexpr void multMatrix(const FieldMatrix< K, m, n > &A, const FieldMatrix< K, n, p > &B, FieldMatrix< K, m, p > &ret)
calculates ret = A * B
Definition: fmatrix.hh:697
static constexpr K invertMatrix(const FieldMatrix< K, 1, 1 > &matrix, FieldMatrix< K, 1, 1 > &inverse)
invert scalar without changing the original matrix
Definition: fmatrix.hh:589
static constexpr FieldVector< K, rows > mult(const FieldMatrix< K, rows, cols > &matrix, const FieldVector< K, cols > &x)
calculates ret = matrix * x
Definition: fmatrix.hh:747
Eigenvalue computations for the FieldMatrix class.
Implements a vector constructed from a given type representing a field and a compile-time given size.
#define DUNE_ASSERT_BOUNDS(cond)
If DUNE_CHECK_BOUNDS is defined: check if condition cond holds; otherwise, do nothing.
Definition: boundschecking.hh:30
std::ostream & operator<<(std::ostream &s, const FieldMatrix< K, 1, 1 > &a)
Sends the matrix to an output stream.
Definition: fmatrix.hh:579
constexpr auto lexicographical_compare_three_way(I1 f1, I1 l1, I2 f2, I2 l2, Cmp comp={}) -> decltype(comp(*f1, *f2))
Lexicographically compares two ranges [first1, last1) and [first2, last2) using three-way comparison ...
Definition: algorithm.hh:37
STL namespace.
Various precision settings for calculations with FieldMatrix and FieldVector.
Compute type of the result of an arithmetic operation involving two different number types.
you have to specialize this structure for any type that should be assignable to a DenseMatrix
Definition: densematrix.hh:61
TMP to check the shape of a DenseMatrix statically, if possible.
Definition: fmatrix.hh:121
Traits for type conversions and type information.
|
Legal Statements / Impressum |
Hosted by TU Dresden & Uni Heidelberg |
generated with Hugo v0.111.3
(Feb 16, 23:40, 2026)