Go to the documentation of this file.
3 #ifndef DUNE_PDELAB_BACKEND_COMMON_ALIASEDVECTORVIEW_HH
4 #define DUNE_PDELAB_BACKEND_COMMON_ALIASEDVECTORVIEW_HH
6 #include <dune/common/typetraits.hh>
16 template<
typename V,
typename LFSC>
20 typedef typename std::remove_const<V>::type
Container;
83 return cache().size();
96 template<
typename LFS>
99 return this->
_data[lfs.localIndex(i)];
116 typename std::conditional<
125 template<
typename V,
typename LFSC>
168 template<
typename LFS>
171 this->
_data[lfs.localIndex(n)] += weight_ * v;
174 template<
typename LFS>
182 return this->
_data[i];
195 const ElementType*
data()
const
222 #endif // DUNE_PDELAB_BACKEND_COMMON_ALIASEDVECTORVIEW_HH
void unbind()
Definition: aliasedvectorview.hh:75
ElementType * data()
Definition: aliasedvectorview.hh:190
ConstAliasedVectorView()
Definition: aliasedvectorview.hh:31
void detach()
Definition: aliasedvectorview.hh:59
AliasedVectorView(std::shared_ptr< Container > container)
Definition: aliasedvectorview.hh:160
LFSCache::DOFIndex DOFIndex
Definition: aliasedvectorview.hh:25
V * _container
Definition: aliasedvectorview.hh:114
Definition: aliasedvectorview.hh:17
void bind(const LFSCache &lfs_cache)
Definition: aliasedvectorview.hh:64
AliasedVectorView()
Definition: aliasedvectorview.hh:151
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
LFSC LFSCache
Definition: aliasedvectorview.hh:134
const ElementType * data() const
Definition: aliasedvectorview.hh:195
LFSC LFSCache
Definition: aliasedvectorview.hh:21
ConstAliasedVectorView(V &container)
Definition: aliasedvectorview.hh:37
void accumulate(const LFS &lfs, size_type n, value_type v)
Definition: aliasedvectorview.hh:169
static const unsigned int value
Definition: gridfunctionspace/tags.hh:139
const ElementType * data() const
Definition: aliasedvectorview.hh:70
void attach(std::shared_ptr< V > container)
Definition: aliasedvectorview.hh:54
ElementType & operator[](const ContainerIndex &ci)
Definition: aliasedvectorview.hh:185
std::conditional< std::is_const< V >::value, const ElementType *, ElementType * >::type _data
Definition: aliasedvectorview.hh:120
const Container & container() const
Definition: aliasedvectorview.hh:102
const ElementType & operator[](size_type i) const
Definition: aliasedvectorview.hh:86
ElementType & operator[](size_type i)
Definition: aliasedvectorview.hh:180
AliasedVectorView(Container &container)
Definition: aliasedvectorview.hh:155
const LFSCache * _lfs_cache
Definition: aliasedvectorview.hh:115
void commit()
Definition: aliasedvectorview.hh:165
Container::ElementType ElementType
Definition: aliasedvectorview.hh:131
void setWeight(weight_type weight)
Definition: aliasedvectorview.hh:205
LFSCache::ContainerIndex ContainerIndex
Definition: aliasedvectorview.hh:136
ConstAliasedVectorView(std::shared_ptr< V > container)
Definition: aliasedvectorview.hh:43
size_type size() const
Definition: aliasedvectorview.hh:81
Container::size_type size_type
Definition: aliasedvectorview.hh:24
LFSCache::ContainerIndex ContainerIndex
Definition: aliasedvectorview.hh:26
Container & container()
Definition: aliasedvectorview.hh:200
std::remove_const< V >::type Container
Definition: aliasedvectorview.hh:20
const ElementType & operator()(const LFS &lfs, size_type i) const
Definition: aliasedvectorview.hh:97
void attach(V &container)
Definition: aliasedvectorview.hh:49
Definition: aliasedvectorview.hh:126
LFSCache::DOFIndex DOFIndex
Definition: aliasedvectorview.hh:135
ElementType weight_type
Definition: aliasedvectorview.hh:139
Container::E ElementType
Definition: aliasedvectorview.hh:23
Container::size_type size_type
Definition: aliasedvectorview.hh:132
void rawAccumulate(const LFS &lfs, size_type n, value_type v)
Definition: aliasedvectorview.hh:175
const ElementType & operator[](const ContainerIndex &ci) const
Definition: aliasedvectorview.hh:91
const LFSCache & cache() const
Definition: aliasedvectorview.hh:107
V Container
Definition: aliasedvectorview.hh:130
ElementType value_type
Definition: aliasedvectorview.hh:28
weight_type weight()
Definition: aliasedvectorview.hh:210