dune-fem 2.12-git
Loading...
Searching...
No Matches
Dune::Fem::RangeMatrix< K, n, m > Class Template Reference

RangeType class for matrix valued functions - derived from FieldMatrix but has representation as vector. More...

#include <dune/fem/space/common/functionspace.hh>

Inheritance diagram for Dune::Fem::RangeMatrix< K, n, m >:
Inheritance graph

Public Types

enum  { rows = BaseType::rows , cols = BaseType::cols , dimension = BaseType::rows*BaseType::cols }
 
typedef FieldMatrix< K, n, m > BaseType
 
typedef BaseType::row_type RowType
 
typedef typename Base::size_type size_type
 
typedef typename Base::value_type value_type
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef typename Base::row_type row_type
 
typedef typename Base::row_reference row_reference
 
typedef typename Base::const_row_reference const_row_reference
 
typedef Traits::derived_type derived_type
 
typedef Traits::value_type field_type
 
typedef Traits::value_type block_type
 
typedef DenseIterator< DenseMatrix, row_type, row_referenceIterator
 
typedef Iterator iterator
 
typedef Iterator RowIterator
 
typedef std::remove_reference< row_reference >::type::Iterator ColIterator
 
typedef DenseIterator< const DenseMatrix, const row_type, const_row_referenceConstIterator
 
typedef ConstIterator const_iterator
 
typedef ConstIterator ConstRowIterator
 
typedef std::remove_reference< const_row_reference >::type::ConstIterator ConstColIterator
 
typedef FieldMatrix< K, ROWS, COLS > Ttype
 

Public Member Functions

 RangeMatrix ()
 Default constructor.
 
 RangeMatrix (const K &k)
 Constructor initializing the whole matrix with a scalar.
 
K & operator() (int r, int c)
 access element in row r and column c
 
const K operator() (int r, int c) const
 access element in row r and column c
 
const RowTyperow (int r) const
 access to row r
 
RowTyperow (int r)
 access to row r
 
K & operator[] (int i)
 access i element where row = i/col and column = icol
 
const K operator[] (int i) const
 access i element where row = i/col and column = icol
 
operator* (const BaseType &y)
 scalar product
 
RangeMatrixaxpy (const K &a, const BaseType &y)
 vector space axpy operation
 
constexpr size_type rows () const
 
constexpr size_type cols () const
 
constexpr FieldMatrix< K, COLS, ROWS > transposed () const
 
constexpr row_reference operator[] (size_type i)
 
constexpr const_row_reference operator[] (size_type i) const
 
constexpr size_type size () const
 
constexpr Iterator begin ()
 
constexpr ConstIterator begin () const
 
constexpr Iterator end ()
 
constexpr ConstIterator end () const
 
constexpr Iterator beforeEnd ()
 
constexpr ConstIterator beforeEnd () const
 
constexpr Iterator beforeBegin ()
 
constexpr ConstIterator beforeBegin () const
 
constexpr derived_typeoperator+= (const DenseMatrix< Other > &x)
 
constexpr FieldMatrixoperator+= (const S &scalar)
 
DenseMatrix< FieldMatrix< K, ROWS, COLS > > & operator+= (const DenseMatrix &org)
 add matrix
 
constexpr derived_type operator- () const
 
constexpr derived_typeoperator-= (const DenseMatrix< Other > &x)
 
constexpr FieldMatrixoperator-= (const S &scalar)
 
DenseMatrix< FieldMatrix< K, ROWS, COLS > > & operator-= (const DenseMatrix &org)
 substract matrix
 
constexpr derived_typeoperator*= (const field_type &k)
 
constexpr FieldMatrixoperator*= (const S &scalar)
 
constexpr derived_typeoperator/= (const field_type &k)
 
constexpr FieldMatrixoperator/= (const S &scalar)
 
constexpr derived_typeaxpy (const field_type &a, const DenseMatrix< Other > &x)
 
constexpr bool operator== (const DenseMatrix< Other > &x) const
 
constexpr bool operator!= (const DenseMatrix< Other > &x) const
 
constexpr void mv (const X &x, Y &y) const
 
constexpr void mtv (const X &x, Y &y) const
 
constexpr void umv (const X &x, Y &y) const
 
constexpr void umtv (const X &x, Y &y) const
 
constexpr void umhv (const X &x, Y &y) const
 
constexpr void mmv (const X &x, Y &y) const
 
constexpr void mmtv (const X &x, Y &y) const
 
constexpr void mmhv (const X &x, Y &y) const
 
constexpr void usmv (const typename FieldTraits< Y >::field_type &alpha, const X &x, Y &y) const
 
constexpr void usmtv (const typename FieldTraits< Y >::field_type &alpha, const X &x, Y &y) const
 
constexpr void usmhv (const typename FieldTraits< Y >::field_type &alpha, const X &x, Y &y) const
 
constexpr FieldTraits< value_type >::real_type frobenius_norm () const
 
constexpr FieldTraits< value_type >::real_type frobenius_norm2 () const
 
constexpr FieldTraits< vt >::real_type infinity_norm () const
 
constexpr FieldTraits< vt >::real_type infinity_norm () const
 
constexpr FieldTraits< vt >::real_type infinity_norm_real () const
 
constexpr FieldTraits< vt >::real_type infinity_norm_real () const
 
void solve (V1 &x, const V2 &b, bool doPivoting=true) const
 
void invert (bool doPivoting=true)
 
field_type determinant (bool doPivoting=true) const
 
FieldMatrix< K, ROWS, COLS > & leftmultiply (const DenseMatrix< M2 > &M)
 
FieldMatrix< K, ROWS, COLS > & rightmultiply (const DenseMatrix< M2 > &M)
 
constexpr FieldMatrixrightmultiply (const FieldMatrix< K, r, c > &M)
 
constexpr size_type N () const
 
constexpr size_type M () const
 
constexpr bool exists (size_type i, size_type j) const
 
constexpr row_reference mat_access (size_type i)
 
constexpr const_row_reference mat_access (size_type i) const
 
constexpr row_reference mat_access (size_type i)
 
constexpr const_row_reference mat_access (size_type i) const
 
constexpr operator const_reference () const noexcept
 
constexpr operator const_reference () const noexcept
 
constexpr operator reference () noexcept
 
constexpr operator reference () noexcept
 
constexpr FieldMatrix< K, l, colsleftmultiplyany (const FieldMatrix< K, l, rows > &M) const
 
constexpr FieldMatrix< K, rows, l > rightmultiplyany (const FieldMatrix< K, cols, l > &M) const
 
void resize (int rows, int cols)
 
void mult (const FieldMatrix< K, ROWS, COLS > *vec, RowType &result) const
 
void mult (const RowType &vec, RowType &result) const
 
void multOEM (const FieldMatrix< K, ROWS, COLS > *vec, FieldMatrix< K, ROWS, COLS > *result) const
 
void multTransposed (const RowType &vec, RowType &result) const
 
void multiply (const DenseMatrix &A, const DenseMatrix &B)
 
void multiplyTransposed (const DenseMatrix &A, const DenseMatrix &B)
 
void multiply_AT_A (const DenseMatrix &A)
 this = A^T * A
 
void scale (const FieldMatrix< K, ROWS, COLS > &val)
 scale matrix with scalar
 
void print (std::ostream &s=std::cout) const
 print matrix
 
void clear ()
 

Static Public Member Functions

static constexpr size_type mat_rows ()
 
static constexpr size_type mat_rows ()
 
static constexpr size_type mat_cols ()
 
static constexpr size_type mat_cols ()
 

Static Public Attributes

static constexpr int blocklevel
 

Static Protected Member Functions

static void luDecomposition (DenseMatrix< FieldMatrix< K, ROWS, COLS > > &A, Func func, Mask &nonsingularLanes, bool throwEarly, bool doPivoting)
 

Detailed Description

template<typename K, int n, int m>
class Dune::Fem::RangeMatrix< K, n, m >

RangeType class for matrix valued functions - derived from FieldMatrix but has representation as vector.

Member Typedef Documentation

◆ BaseType

template<typename K , int n, int m>
typedef FieldMatrix<K,n,m> Dune::Fem::RangeMatrix< K, n, m >::BaseType

◆ RowType

template<typename K , int n, int m>
typedef BaseType::row_type Dune::Fem::RangeMatrix< K, n, m >::RowType

◆ Ttype

typedef FieldMatrix< K, ROWS, COLS > Dune::Fem::DenseMatrix< FieldMatrix< K, ROWS, COLS > >::Ttype
inherited

Member Enumeration Documentation

◆ anonymous enum

template<typename K , int n, int m>
anonymous enum
Enumerator
rows 

The number of rows.

cols 

The number of columns.

dimension 

The total dimension of the matrix space.

Constructor & Destructor Documentation

◆ RangeMatrix() [1/2]

template<typename K , int n, int m>
Dune::Fem::RangeMatrix< K, n, m >::RangeMatrix ( )
inline

Default constructor.

◆ RangeMatrix() [2/2]

template<typename K , int n, int m>
Dune::Fem::RangeMatrix< K, n, m >::RangeMatrix ( const K &  k)
inline

Constructor initializing the whole matrix with a scalar.

Member Function Documentation

◆ axpy()

template<typename K , int n, int m>
RangeMatrix & Dune::Fem::RangeMatrix< K, n, m >::axpy ( const K &  a,
const BaseType y 
)
inline

vector space axpy operation

Parameters
ascalar factor
yRangeMatrix to multiply with
Returns
reference to this is returned (i.e. *this)

◆ clear()

void Dune::Fem::DenseMatrix< FieldMatrix< K, ROWS, COLS > >::clear ( )
inlineinherited

◆ mult() [1/2]

void Dune::Fem::DenseMatrix< FieldMatrix< K, ROWS, COLS > >::mult ( const FieldMatrix< K, ROWS, COLS > *  vec,
RowType result 
) const
inlineinherited

◆ mult() [2/2]

void Dune::Fem::DenseMatrix< FieldMatrix< K, ROWS, COLS > >::mult ( const RowType vec,
RowType result 
) const
inlineinherited

◆ multiply()

void Dune::Fem::DenseMatrix< FieldMatrix< K, ROWS, COLS > >::multiply ( const DenseMatrix< FieldMatrix< K, ROWS, COLS > > &  A,
const DenseMatrix< FieldMatrix< K, ROWS, COLS > > &  B 
)
inlineinherited

◆ multiply_AT_A()

void Dune::Fem::DenseMatrix< FieldMatrix< K, ROWS, COLS > >::multiply_AT_A ( const DenseMatrix< FieldMatrix< K, ROWS, COLS > > &  A)
inlineinherited

this = A^T * A

◆ multiplyTransposed()

void Dune::Fem::DenseMatrix< FieldMatrix< K, ROWS, COLS > >::multiplyTransposed ( const DenseMatrix< FieldMatrix< K, ROWS, COLS > > &  A,
const DenseMatrix< FieldMatrix< K, ROWS, COLS > > &  B 
)
inlineinherited

◆ multOEM()

void Dune::Fem::DenseMatrix< FieldMatrix< K, ROWS, COLS > >::multOEM ( const FieldMatrix< K, ROWS, COLS > *  vec,
FieldMatrix< K, ROWS, COLS > *  result 
) const
inlineinherited

◆ multTransposed()

void Dune::Fem::DenseMatrix< FieldMatrix< K, ROWS, COLS > >::multTransposed ( const RowType vec,
RowType result 
) const
inlineinherited

◆ operator()() [1/2]

template<typename K , int n, int m>
K & Dune::Fem::RangeMatrix< K, n, m >::operator() ( int  r,
int  c 
)
inline

access element in row r and column c

Parameters
[in]rrow
[in]ccolumn
Returns
reference to element in row r and column c

◆ operator()() [2/2]

template<typename K , int n, int m>
const K Dune::Fem::RangeMatrix< K, n, m >::operator() ( int  r,
int  c 
) const
inline

access element in row r and column c

Parameters
[in]rrow
[in]ccolumn
Returns
reference to element in row r and column c

◆ operator*()

template<typename K , int n, int m>
K Dune::Fem::RangeMatrix< K, n, m >::operator* ( const BaseType y)
inline

scalar product

Parameters
yRangeMatrix to scalar multiply with
Returns
K scalar product

◆ operator+=()

DenseMatrix< FieldMatrix< K, ROWS, COLS > > & Dune::Fem::DenseMatrix< FieldMatrix< K, ROWS, COLS > >::operator+= ( const DenseMatrix< FieldMatrix< K, ROWS, COLS > > &  org)
inlineinherited

add matrix

◆ operator-=()

DenseMatrix< FieldMatrix< K, ROWS, COLS > > & Dune::Fem::DenseMatrix< FieldMatrix< K, ROWS, COLS > >::operator-= ( const DenseMatrix< FieldMatrix< K, ROWS, COLS > > &  org)
inlineinherited

substract matrix

◆ operator[]() [1/2]

template<typename K , int n, int m>
K & Dune::Fem::RangeMatrix< K, n, m >::operator[] ( int  i)
inline

access i element where row = i/col and column = icol

Parameters
[in]ielement number ot access
Returns
reference to element in row i/col and column icol

◆ operator[]() [2/2]

template<typename K , int n, int m>
const K Dune::Fem::RangeMatrix< K, n, m >::operator[] ( int  i) const
inline

access i element where row = i/col and column = icol

Parameters
[in]ielement number ot access
Returns
reference to element in row i/col and column icol

◆ print()

void Dune::Fem::DenseMatrix< FieldMatrix< K, ROWS, COLS > >::print ( std::ostream s = std::cout) const
inlineinherited

print matrix

◆ resize()

void Dune::Fem::DenseMatrix< FieldMatrix< K, ROWS, COLS > >::resize ( int  rows,
int  cols 
)
inlineinherited

◆ row() [1/2]

template<typename K , int n, int m>
RowType & Dune::Fem::RangeMatrix< K, n, m >::row ( int  r)
inline

access to row r

Parameters
[in]rrow
Returns
reference to row r

◆ row() [2/2]

template<typename K , int n, int m>
const RowType & Dune::Fem::RangeMatrix< K, n, m >::row ( int  r) const
inline

access to row r

Parameters
[in]rrow
Returns
reference to row r

◆ scale()

void Dune::Fem::DenseMatrix< FieldMatrix< K, ROWS, COLS > >::scale ( const FieldMatrix< K, ROWS, COLS > &  val)
inlineinherited

scale matrix with scalar


The documentation for this class was generated from the following file: