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
574 friend constexpr auto operator<=> (const FieldMatrix& a, const FieldMatrix<OtherK,ROWS,COLS>& b) noexcept
631 static constexpr K invertMatrix_retTransposed (const FieldMatrix<K,1,1> &matrix, FieldMatrix<K,1,1> &inverse)
655 static constexpr K invertMatrix_retTransposed (const FieldMatrix<K,2,2> &matrix, FieldMatrix<K,2,2> &inverse)
700 static constexpr K invertMatrix_retTransposed (const FieldMatrix<K,3,3> &matrix, FieldMatrix<K,3,3> &inverse)
749 static constexpr void multTransposedMatrix(const FieldMatrix<K,rows,cols> &matrix, FieldMatrix<K,cols,cols>& ret)
766 static constexpr void multAssignTransposed( const FieldMatrix<K,rows,cols> &matrix, const FieldVector<K,rows> & x, FieldVector<K,cols> & ret)
780 static constexpr FieldVector<K,rows> mult(const FieldMatrix<K,rows,cols> &matrix, const FieldVector<K,cols> & x)
789 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:393
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:494
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:477
constexpr FieldMatrix & operator+=(const S &scalar)
add scalar
Definition: fmatrix.hh:271
constexpr FieldMatrix & operator-=(const S &scalar)
subtract scalar
Definition: fmatrix.hh:315
friend constexpr auto operator*(const FieldMatrix &matrix, const S &scalar)
vector space multiplication with scalar
Definition: fmatrix.hh:326
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:574
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:355
friend constexpr bool operator==(const FieldMatrix &a, const S &b) noexcept
comparing FieldMatrix<1,1> with scalar for equality
Definition: fmatrix.hh:556
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:366
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:468
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:766
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:789
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:631
static constexpr void multTransposedMatrix(const FieldMatrix< K, rows, cols > &matrix, FieldMatrix< K, cols, cols > &ret)
calculates ret= A_t*A
Definition: fmatrix.hh:749
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:730
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:622
static constexpr FieldVector< K, rows > mult(const FieldMatrix< K, rows, cols > &matrix, const FieldVector< K, cols > &x)
calculates ret = matrix * x
Definition: fmatrix.hh:780
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:612
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
(Mar 31, 22:41, 2026)