DUNE PDELab (git)
A container for storing data associated with the degrees of freedom of a LocalFunctionSpace. More...
#include <dune/pdelab/gridfunctionspace/localvector.hh>
Public Types | |
typedef std::vector< T > | BaseContainer |
The type of the underlying storage container. | |
typedef BaseContainer::value_type | value_type |
The value type of this container. | |
typedef BaseContainer::size_type | size_type |
The size type of this container. | |
typedef BaseContainer::reference | reference |
The reference type of this container. | |
typedef BaseContainer::const_reference | const_reference |
The const reference type of this container. | |
typedef W | weight_type |
The weight type of this container. More... | |
typedef WeightedVectorAccumulationView< LocalVector > | WeightedAccumulationView |
An accumulate-only view of this container that automatically applies a weight to all contributions. | |
Public Member Functions | |
WeightedAccumulationView | weightedAccumulationView (weight_type weight) |
Returns a WeighedAccumulationView of this container with the given weight. | |
template<typename LFS > | |
reference | operator() (const LFS &lfs, size_type i) |
Access the value in this container associated with the i-th degree of freedom of the LocalFunctionSpace lfs. More... | |
template<typename LFS > | |
const_reference | operator() (const LFS &lfs, size_type i) const |
Access the value in this container associated with the i-th degree of freedom of the LocalFunctionSpace lfs (const version). More... | |
auto | data () |
Access underlying container. | |
auto | data () const |
Access underlying container, const version. | |
LocalVector & | axpy (const value_type alpha, const LocalVector &other) |
Calculate axpy operation this -> this += alpha*other. | |
LocalVector & | operator= (const value_type &v) |
Assigns v to all entries. | |
LocalVector & | operator+= (const LocalVector &other) |
Adds two vectors. | |
LocalVector & | operator*= (const value_type &v) |
Multiplies all entries by v. | |
value_type | dot (const LocalVector &other) const |
Dot product with other vector. | |
value_type | two_norm () const |
Return Euclidean norm of vector. | |
size_type | size () const |
The size of the container. | |
void | resize (size_type size) |
Resize the container. | |
void | assign (size_type size, const T &value) |
Resize the container to size and assign the passed value to all entries. | |
BaseContainer & | base () |
Returns the underlying, std::vector-like storage container. | |
const BaseContainer & | base () const |
Returns the underlying, std::vector-like storage container (const version). | |
LocalVector () | |
Default constructor. | |
LocalVector (size_type n) | |
Construct a LocalVector with size n. | |
LocalVector (size_type n, const value_type &v) | |
Construct a LocalVector with size n and initialize all entries with v. | |
Detailed Description
class Dune::PDELab::LocalVector< T, LFSFlavorTag, W >
A container for storing data associated with the degrees of freedom of a LocalFunctionSpace.
This container acts as a wrapper around a std::vector-like container and supports accessing its entries indexed by pairs of (LocalFunctionSpace,DOF of LocalFunctionSpace). If requested by specifying a non-default LFSFlavorTag, the container will also assert that a LocalFunctionSpace of the matching kind (trial or test space) is used to access its content.
- Template Parameters
-
T The type of values to store in the vector. LFSFlavorTag Tag type for differentiating between trial and test space vectors. W The type of weight applied in a WeightedAccumulationView.
Member Typedef Documentation
◆ weight_type
typedef W Dune::PDELab::LocalVector< T, LFSFlavorTag, W >::weight_type |
The weight type of this container.
A value of this type will be used to assign a weight to contributions in a WeightedAccumulationView.
Member Function Documentation
◆ operator()() [1/2]
|
inline |
Access the value in this container associated with the i-th degree of freedom of the LocalFunctionSpace lfs.
- Parameters
-
lfs The LocalFunctionSpace for which to retrieve a value. This must be the LFS that has been used to load the values into this vector or one of its children (right now, this is not checked). i The index of the degree of freedom of the LocalFunctionSpace that will be returned.
◆ operator()() [2/2]
|
inline |
Access the value in this container associated with the i-th degree of freedom of the LocalFunctionSpace lfs (const version).
- Parameters
-
lfs The LocalFunctionSpace for which to retrieve a value. This must be the LFS that has been used to load the values into this vector or one of its children (right now, this is not checked). i The index of the degree of freedom of the LocalFunctionSpace that will be returned.
The documentation for this class was generated from the following file:
- dune/pdelab/gridfunctionspace/localvector.hh