|
dune-common 2.12-git
|
Loading...
Searching...
No Matches
densematrix.hh
Go to the documentation of this file.
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
35 typedef const typename FieldTraits< typename DenseMatVecTraits<M>::value_type >::field_type field_type;
36 typedef const typename FieldTraits< typename DenseMatVecTraits<M>::value_type >::real_type real_type;
115 std::true_type hasDenseMatrixAssigner ( DenseMatrix &, const RHS &, decltype( Dune::DenseMatrixAssigner< DenseMatrix, RHS >::apply( std::declval< DenseMatrix & >(), std::declval< const RHS & >() ) ) * = nullptr );
123 : public decltype( Impl::hasDenseMatrixAssigner( std::declval< DenseMatrix & >(), std::declval< const RHS & >() ) )
253 typedef typename std::remove_reference<const_row_reference>::type::ConstIterator ConstColIterator;
1086 AutonomousValue<MAT>::luDecomposition(A, ElimPivot(pivot), nonsingularLanes, true, doPivoting);
1133 DUNE_THROW(FMatrixError, "There is no determinant for a " << rows() << "x" << cols() << " matrix!");
1174 static inline void multAssign(const DenseMatrix<MAT> &matrix, const DenseVector<V1> & x, DenseVector<V2> & ret)
1193 static inline void multAssignTransposed( const FieldMatrix<K,rows,cols> &matrix, const FieldVector<K,rows> & x, FieldVector<K,cols> & ret)
1207 static inline FieldVector<K,rows> mult(const FieldMatrix<K,rows,cols> &matrix, const FieldVector<K,cols> & x)
Implements a scalar vector view wrapper around an existing scalar.
A free function to provide the demangled class name of a given object or type as a string.
Various precision settings for calculations with FieldMatrix and FieldVector.
Macro for wrapping boundary checks.
A few common exception classes.
Traits for type conversions and type information.
Some useful basic math stuff.
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
typename AutonomousValueType< T >::type AutonomousValue
Type free of internal references that T can be converted to.
Definition typetraits.hh:566
std::ostream & operator<<(std::ostream &s, const bigunsignedint< k > &x)
Definition bigunsignedint.hh:301
bool anyTrue(const Mask &mask)
Whether any entry is true
Definition simd/interface.hh:429
V cond(M &&mask, const V &ifTrue, const V &ifFalse)
Like the ?: operator.
Definition simd/interface.hh:386
bool allTrue(const Mask &mask)
Whether all entries are true
Definition simd/interface.hh:439
typename Overloads::RebindType< std::decay_t< S >, std::decay_t< V > >::type Rebind
Construct SIMD type with different scalar type.
Definition simd/interface.hh:253
constexpr std::size_t lanes()
Number of lanes in a SIMD type.
Definition simd/interface.hh:305
decltype(auto) lane(std::size_t l, V &&v)
Extract an element of a SIMD type.
Definition simd/interface.hh:324
Mask< V > mask(ADLTag< 0, std::is_same< V, Mask< V > >::value >, const V &v)
implements Simd::mask()
Definition defaults.hh:153
constexpr K conjugateComplex(const K &x)
compute conjugate complex of x
Definition math.hh:146
static void multAssign(const DenseMatrix< MAT > &matrix, const DenseVector< V1 > &x, DenseVector< V2 > &ret)
calculates ret = matrix * x
Definition densematrix.hh:1174
Whether this type acts as a scalar in the context of (hierarchically blocked) containers.
Definition typetraits.hh:194
ConstIterator const_iterator
typedef for stl compliant access
Definition densematrix.hh:249
constexpr derived_type & operator+=(const DenseMatrix< Other > &x)
vector space addition
Definition densematrix.hh:294
constexpr void umhv(const X &x, Y &y) const
y += A^H x
Definition densematrix.hh:437
constexpr derived_type & operator*=(const field_type &k)
vector space multiplication with scalar
Definition densematrix.hh:326
constexpr void usmhv(const typename FieldTraits< Y >::field_type &alpha, const X &x, Y &y) const
y += alpha A^H x
Definition densematrix.hh:517
constexpr derived_type & operator-=(const DenseMatrix< Other > &x)
vector space subtraction
Definition densematrix.hh:317
void solve(V1 &x, const V2 &b, bool doPivoting=true) const
Solve system A x = b.
Traits::value_type field_type
export the type representing the field
Definition densematrix.hh:165
constexpr bool operator!=(const DenseMatrix< Other > &x) const
Binary matrix incomparison.
Definition densematrix.hh:363
constexpr derived_type & axpy(const field_type &a, const DenseMatrix< Other > &x)
vector space axpy operation (*this += a x)
Definition densematrix.hh:343
std::remove_reference< const_row_reference >::type::ConstIterator ConstColIterator
rename the iterators for easier access
Definition densematrix.hh:253
constexpr void usmtv(const typename FieldTraits< Y >::field_type &alpha, const X &x, Y &y) const
y += alpha A^T x
Definition densematrix.hh:503
static void luDecomposition(DenseMatrix< MAT > &A, Func func, Mask &nonsingularLanes, bool throwEarly, bool doPivoting)
do an LU-Decomposition on matrix A
Traits::value_type block_type
export the type representing the components
Definition densematrix.hh:168
constexpr size_type cols() const
number of columns
Definition densematrix.hh:720
constexpr size_type size() const
size method (number of rows)
Definition densematrix.hh:205
constexpr void mmhv(const X &x, Y &y) const
y -= A^H x
Definition densematrix.hh:476
MAT & rightmultiply(const DenseMatrix< M2 > &M)
Multiplies M from the right to this matrix.
Definition densematrix.hh:650
constexpr ConstIterator beforeBegin() const
Definition densematrix.hh:276
constexpr FieldTraits< value_type >::real_type frobenius_norm() const
frobenius norm: sqrt(sum over squared values of entries)
Definition densematrix.hh:533
Traits::value_type value_type
export the type representing the field
Definition densematrix.hh:162
constexpr derived_type & operator/=(const field_type &k)
vector space division by scalar
Definition densematrix.hh:334
constexpr derived_type operator-() const
Matrix negation.
Definition densematrix.hh:303
MAT & leftmultiply(const DenseMatrix< M2 > &M)
Multiplies M from the left to this matrix.
Definition densematrix.hh:632
constexpr void mtv(const X &x, Y &y) const
y = A^T x
Definition densematrix.hh:392
constexpr FieldTraits< vt >::real_type infinity_norm() const
infinity norm (row sum norm, how to generalize for blocks?)
Definition densematrix.hh:551
constexpr row_reference operator[](size_type i)
random access
Definition densematrix.hh:194
constexpr void umv(const X &x, Y &y) const
y += A x
Definition densematrix.hh:411
Traits::derived_type derived_type
type of derived matrix class
Definition densematrix.hh:159
constexpr bool exists(size_type i, size_type j) const
return true when (i,j) is in pattern
Definition densematrix.hh:728
constexpr void usmv(const typename FieldTraits< Y >::field_type &alpha, const X &x, Y &y) const
y += alpha A x
Definition densematrix.hh:489
Iterator RowIterator
rename the iterators for easier access
Definition densematrix.hh:216
static constexpr int blocklevel
The number of block levels we contain. This is the leaf, that is, 1.
Definition densematrix.hh:183
constexpr ConstIterator begin() const
begin iterator
Definition densematrix.hh:256
constexpr void umtv(const X &x, Y &y) const
y += A^T x
Definition densematrix.hh:424
DenseIterator< const DenseMatrix, const row_type, const_row_reference > ConstIterator
Iterator class for sequential access.
Definition densematrix.hh:247
constexpr void mmtv(const X &x, Y &y) const
y -= A^T x
Definition densematrix.hh:463
constexpr FieldTraits< value_type >::real_type frobenius_norm2() const
square of frobenius norm, need for block recursion
Definition densematrix.hh:541
Traits::row_type row_type
The type used to represent a row (must fulfill the Dune::DenseVector interface)
Definition densematrix.hh:174
constexpr bool operator==(const DenseMatrix< Other > &x) const
Binary matrix comparison.
Definition densematrix.hh:353
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
std::remove_reference< row_reference >::type::Iterator ColIterator
rename the iterators for easier access
Definition densematrix.hh:218
Traits::row_reference row_reference
The type used to represent a reference to a row (usually row_type &)
Definition densematrix.hh:177
constexpr void mmv(const X &x, Y &y) const
y -= A x
Definition densematrix.hh:450
Iterator iterator
typedef for stl compliant access
Definition densematrix.hh:214
constexpr FieldTraits< vt >::real_type infinity_norm_real() const
simplified infinity norm (uses Manhattan norm for complex values)
Definition densematrix.hh:566
ConstIterator ConstRowIterator
rename the iterators for easier access
Definition densematrix.hh:251
constexpr derived_type & operator=(const RHS &rhs)
Definition densematrix.hh:284
DenseIterator< DenseMatrix, row_type, row_reference > Iterator
Iterator class for sequential access.
Definition densematrix.hh:212
field_type determinant(bool doPivoting=true) const
calculates the determinant of this matrix
const FieldTraits< typenameDenseMatVecTraits< M >::value_type >::real_type real_type
Definition densematrix.hh:36
const FieldTraits< typenameDenseMatVecTraits< M >::value_type >::field_type field_type
Definition densematrix.hh:35
typename Base::size_type size_type
The type used for the index access and size operation.
Definition fmatrix.hh:158
you have to specialize this structure for any type that should be assignable to a DenseMatrix
Definition densematrix.hh:61
Interface for a class of dense vectors over a given field.
Definition densevector.hh:244
Generic iterator class for dense vector and matrix implementations.
Definition densevector.hh:132
Definition ftraits.hh:26
T field_type
export the type representing the field
Definition ftraits.hh:28
T real_type
export the type representing the real type of the field
Definition ftraits.hh:30
Definition matvectraits.hh:31
static ctype absolute_limit()
return threshold to declare matrix singular
Definition precision.hh:28
Include file for users of the SIMD abstraction layer.
T apply(T... args)
T begin(T... args)
T copy(T... args)
T end(T... args)
T endl(T... args)
T fill(T... args)
T max(T... args)
T swap(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8