DUNE PDELab (2.8)
localmatrix.hh
Facade class for stl conformant bidirectional iterators.
Definition: iteratorfacades.hh:272
A dense matrix for storing data associated with the degrees of freedom of a pair of LocalFunctionSpac...
Definition: localmatrix.hh:184
LocalMatrix()
Default constructor.
Definition: localmatrix.hh:290
BaseContainer & base()
Returns the underlying storage container.
Definition: localmatrix.hh:412
T & operator()(const LFSV &lfsv, size_type i, const LFSU &lfsu, size_type j)
Access the value associated with the i-th DOF of lfsv and the j-th DOF of lfsu.
Definition: localmatrix.hh:337
const value_type & getEntry(size_type i, size_type j) const
Direct (unmapped) access to the (i,j)-th entry of the matrix (const version).
Definition: localmatrix.hh:449
W weight_type
The weight type of this container.
Definition: localmatrix.hh:210
LocalMatrix(size_type r, size_type c)
Construct a LocalMatrix with r rows and c columns.
Definition: localmatrix.hh:293
LocalMatrix(size_type r, size_type c, const T &t)
Construct a LocalMatrix with r rows and c columns and initialize its entries with t.
Definition: localmatrix.hh:300
size_type nrows() const
Returns the number of rows.
Definition: localmatrix.hh:369
WeightedMatrixAccumulationView< LocalMatrix > WeightedAccumulationView
An accumulate-only view of this container that automatically applies a weight to all contributions.
Definition: localmatrix.hh:213
const BaseContainer & base() const
Returns the underlying storage container (const version).
Definition: localmatrix.hh:421
LocalMatrix & operator*=(const T &x)
Multiplies all entries of the matrix with x.
Definition: localmatrix.hh:356
BaseContainer::reference reference
The reference type of this container.
Definition: localmatrix.hh:200
value_type & getEntry(size_type i, size_type j)
Direct (unmapped) access to the (i,j)-th entry of the matrix.
Definition: localmatrix.hh:435
void resize(size_type r, size_type c)
Resize the matrix.
Definition: localmatrix.hh:307
BaseContainer::size_type size_type
The size type of this container.
Definition: localmatrix.hh:197
BaseContainer::value_type value_type
The value type of this container.
Definition: localmatrix.hh:194
void assign(size_type r, size_type c, const T &t)
Resize the matrix and assign t to all entries.
Definition: localmatrix.hh:322
void umv(const X &x, R &y) const
y += A x
Definition: localmatrix.hh:382
size_type ncols() const
Returns the number of columns.
Definition: localmatrix.hh:375
std::vector< T > BaseContainer
The type of the underlying storage container.
Definition: localmatrix.hh:191
void usmv(const value_type &alpha, const X &x, R &y) const
y += alpha A x
Definition: localmatrix.hh:393
LocalMatrix & operator=(const T &t)
Assign t to all entries of the matrix.
Definition: localmatrix.hh:315
WeightedAccumulationView weightedAccumulationView(weight_type weight)
Returns a weighted accumulate-only view of this matrix with the given weight.
Definition: localmatrix.hh:403
BaseContainer::const_reference const_reference
The const reference type of this container.
Definition: localmatrix.hh:203
An accumulate-only view on a local matrix that automatically takes into account an accumulation weigh...
Definition: localmatrix.hh:22
C Container
The type of the underlying container.
Definition: localmatrix.hh:27
WeightedAccumulationView weightedAccumulationView(weight_type weight)
Returns a WeighedAccumulationView with some weight in addition to this view's weight.
Definition: localmatrix.hh:47
BaseContainer & base()
Returns the storage container of the underlying LocalMatrix.
Definition: localmatrix.hh:144
C::value_type value_type
The value type of the entries.
Definition: localmatrix.hh:36
size_type ncols() const
Returns the number of colums of the underlying container.
Definition: localmatrix.hh:106
WeightedMatrixAccumulationView WeightedAccumulationView
Export this type for uniform handling of the containers themselves and their views.
Definition: localmatrix.hh:43
const Container & container() const
Returns the container (of type LocalMatrix) that this view is based on (const version).
Definition: localmatrix.hh:135
void setWeight(weight_type weight)
Resets the weighting coefficient of the view.
Definition: localmatrix.hh:70
WeightedMatrixAccumulationView(Container &container, weight_type weight)
Constructor.
Definition: localmatrix.hh:160
void resetModified()
Resets the modification state of the view to not modified.
Definition: localmatrix.hh:122
size_type nrows() const
Returns the number of rows of the underlying container.
Definition: localmatrix.hh:100
void rawAccumulate(const LFSV &lfsv, size_type i, const LFSU &lfsu, size_type j, value_type v)
Adds v to the (i,j)-th entry of the underlying container without applying the current weight.
Definition: localmatrix.hh:91
bool modified() const
Returns whether this view has been written to.
Definition: localmatrix.hh:112
const BaseContainer & base() const
Returns the storage container of the underlying LocalVector (const version).
Definition: localmatrix.hh:154
weight_type weight() const
Returns the weight associated with this view.
Definition: localmatrix.hh:60
C::size_type size_type
The size_type of the underlying container.
Definition: localmatrix.hh:53
Container::BaseContainer BaseContainer
The type of the storage container underlying the LocalVector.
Definition: localmatrix.hh:33
C::weight_type weight_type
The type of the weight applied when accumulating contributions.
Definition: localmatrix.hh:39
void accumulate(const LFSV &lfsv, size_type i, const LFSU &lfsu, size_type j, value_type v)
Applies the current weight to v and adds the result to the matrix entry associated with the i-th entr...
Definition: localmatrix.hh:77
Container & container()
Returns the container (of type LocalMatrix) that this view is based on.
Definition: localmatrix.hh:128
constexpr index_constant< 1 > _1
Compile time index with value 1.
Definition: indices.hh:54
constexpr auto equals(T1 &&t1, T2 &&t2)
Equality comparison.
Definition: hybridutilities.hh:400
This file implements iterator facade classes for writing stl conformant iterators.
![Creative Commons License](https://i.creativecommons.org/l/by-sa/4.0/80x15.png)