DUNE PDELab (unstable)
An accumulate-only view on a local matrix that automatically takes into account an accumulation weight. More...
#include <dune/pdelab/gridoperator/common/localmatrix.hh>
Public Types | |
| typedef C | Container |
| The type of the underlying container. | |
| typedef Container::BaseContainer | BaseContainer |
| The type of the storage container underlying the LocalVector. More... | |
| typedef C::value_type | value_type |
| The value type of the entries. | |
| typedef C::weight_type | weight_type |
| The type of the weight applied when accumulating contributions. | |
| typedef WeightedMatrixAccumulationView | WeightedAccumulationView |
| Export this type for uniform handling of the containers themselves and their views. | |
| typedef C::size_type | size_type |
| The size_type of the underlying container. | |
Public Member Functions | |
| WeightedAccumulationView | weightedAccumulationView (weight_type weight) |
| Returns a WeighedAccumulationView with some weight in addition to this view's weight. | |
| weight_type | weight () const |
| Returns the weight associated with this view. More... | |
| void | setWeight (weight_type weight) |
| Resets the weighting coefficient of the view. More... | |
| template<typename LFSU , typename LFSV > | |
| 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 entry of lfsv and the j-th entry of lfsu. | |
| template<typename LFSU , typename LFSV > | |
| 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. More... | |
| size_type | nrows () const |
| Returns the number of rows of the underlying container. | |
| size_type | ncols () const |
| Returns the number of colums of the underlying container. | |
| bool | modified () const |
| Returns whether this view has been written to. | |
| void | resetModified () |
| Resets the modification state of the view to not modified. More... | |
| Container & | container () |
| Returns the container (of type LocalMatrix) that this view is based on. | |
| const Container & | container () const |
| Returns the container (of type LocalMatrix) that this view is based on (const version). | |
| BaseContainer & | base () |
| Returns the storage container of the underlying LocalMatrix. More... | |
| const BaseContainer & | base () const |
| Returns the storage container of the underlying LocalVector (const version). More... | |
| WeightedMatrixAccumulationView (Container &container, weight_type weight) | |
| Constructor. | |
Detailed Description
class Dune::PDELab::WeightedMatrixAccumulationView< C >
An accumulate-only view on a local matrix that automatically takes into account an accumulation weight.
Member Typedef Documentation
◆ BaseContainer
| typedef Container::BaseContainer Dune::PDELab::WeightedMatrixAccumulationView< C >::BaseContainer |
The type of the storage container underlying the LocalVector.
- Warning
- This is not a matrix-like container anymore, but a std::vector-like one!
Member Function Documentation
◆ base() [1/2]
|
inline |
Returns the storage container of the underlying LocalMatrix.
- Warning
- This is not a matrix-like container anymore, but a std::vector-like one!
◆ base() [2/2]
|
inline |
Returns the storage container of the underlying LocalVector (const version).
- Warning
- This is not a matrix-like container anymore, but a std::vector-like one!
◆ rawAccumulate()
|
inline |
Adds v to the (i,j)-th entry of the underlying container without applying the current weight.
- Warning
- When using this method, you must take care of applying the weight yourself, otherwise your program may exhibit strange behavior or even calculate wrong results!
◆ resetModified()
|
inline |
Resets the modification state of the view to not modified.
- Warning
- Never call this method from within a local operator, or your local residual / matrix contributions will be lost!
◆ setWeight()
|
inline |
Resets the weighting coefficient of the view.
- Warning
- Only call this method when you know what you are doing! It is especially not meant to be called from inside local operators.
References Dune::PDELab::WeightedMatrixAccumulationView< C >::weight().
◆ weight()
|
inline |
Returns the weight associated with this view.
- Note
- This can be used together with rawAccumulate() to avoid applying the weight at each loop iteration.
Referenced by Dune::PDELab::WeightedMatrixAccumulationView< C >::setWeight(), and Dune::PDELab::WeightedMatrixAccumulationView< C >::weightedAccumulationView().
The documentation for this class was generated from the following file:
- dune/pdelab/gridoperator/common/localmatrix.hh
|
Legal Statements / Impressum |
Hosted by TU Dresden & Uni Heidelberg |
generated with Hugo v0.111.3
(Nov 2, 23:43, 2025)