3 #ifndef DUNE_PDELAB_BACKEND_COMMON_ALIASEDVECTORVIEW_HH 4 #define DUNE_PDELAB_BACKEND_COMMON_ALIASEDVECTORVIEW_HH 6 #include <dune/common/typetraits.hh> 13 template<
typename V,
typename LFSC>
17 typedef typename std::remove_const<V>::type
Container;
50 void bind(
const LFSCache& lfs_cache)
56 const ElementType*
data()
const 69 return cache().size();
77 const ElementType&
operator[](
const ContainerIndex& ci)
const 82 template<
typename LFS>
83 const ElementType&
operator()(
const LFS& lfs, size_type i)
const 85 return this->
_data[lfs.localIndex(i)];
102 typename std::conditional<
111 template<
typename V,
typename LFSC>
149 template<
typename LFS>
152 this->
_data[lfs.localIndex(n)] += v;
155 template<
typename LFS>
163 return this->
_data[i];
176 const ElementType*
data()
const 203 #endif // DUNE_PDELAB_BACKEND_COMMON_ALIASEDVECTORVIEW_HH ElementType value_type
Definition: aliasedvectorview.hh:25
void unbind()
Definition: aliasedvectorview.hh:61
LFSCache::ContainerIndex ContainerIndex
Definition: aliasedvectorview.hh:23
Container::ElementType ElementType
Definition: aliasedvectorview.hh:117
AliasedVectorView(Container &container)
Definition: aliasedvectorview.hh:141
void rawAccumulate(const LFS &lfs, size_type n, value_type v)
Definition: aliasedvectorview.hh:156
std::remove_const< V >::type Container
Definition: aliasedvectorview.hh:17
weight_type weight()
Definition: aliasedvectorview.hh:191
Definition: aliasedvectorview.hh:112
std::conditional< std::is_const< V >::value, const ElementType *, ElementType *>::type _data
Definition: aliasedvectorview.hh:106
LFSCache::DOFIndex DOFIndex
Definition: aliasedvectorview.hh:121
V Container
Definition: aliasedvectorview.hh:116
V * _container
Definition: aliasedvectorview.hh:100
ElementType * data()
Definition: aliasedvectorview.hh:171
const ElementType & operator[](const ContainerIndex &ci) const
Definition: aliasedvectorview.hh:77
static const unsigned int value
Definition: gridfunctionspace/tags.hh:139
void accumulate(const LFS &lfs, size_type n, value_type v)
Definition: aliasedvectorview.hh:150
Definition: aliasedvectorview.hh:14
const Container & container() const
Definition: aliasedvectorview.hh:88
const ElementType * data() const
Definition: aliasedvectorview.hh:176
Container::E ElementType
Definition: aliasedvectorview.hh:20
ElementType & operator[](size_type i)
Definition: aliasedvectorview.hh:161
LFSCache::DOFIndex DOFIndex
Definition: aliasedvectorview.hh:22
ElementType weight_type
Definition: aliasedvectorview.hh:125
void setWeight(weight_type weight)
Definition: aliasedvectorview.hh:186
const ElementType & operator[](size_type i) const
Definition: aliasedvectorview.hh:72
AliasedVectorView()
Definition: aliasedvectorview.hh:137
void attach(V &container)
Definition: aliasedvectorview.hh:40
const LFSCache & cache() const
Definition: aliasedvectorview.hh:93
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
Container::size_type size_type
Definition: aliasedvectorview.hh:21
LFSC LFSCache
Definition: aliasedvectorview.hh:120
const ElementType * data() const
Definition: aliasedvectorview.hh:56
LFSCache::ContainerIndex ContainerIndex
Definition: aliasedvectorview.hh:122
void commit()
Definition: aliasedvectorview.hh:146
void bind(const LFSCache &lfs_cache)
Definition: aliasedvectorview.hh:50
ElementType & operator[](const ContainerIndex &ci)
Definition: aliasedvectorview.hh:166
size_type size() const
Definition: aliasedvectorview.hh:67
const ElementType & operator()(const LFS &lfs, size_type i) const
Definition: aliasedvectorview.hh:83
Container & container()
Definition: aliasedvectorview.hh:181
ConstAliasedVectorView(V &container)
Definition: aliasedvectorview.hh:34
Container::size_type size_type
Definition: aliasedvectorview.hh:118
ConstAliasedVectorView()
Definition: aliasedvectorview.hh:28
const LFSCache * _lfs_cache
Definition: aliasedvectorview.hh:101
void detach()
Definition: aliasedvectorview.hh:45
LFSC LFSCache
Definition: aliasedvectorview.hh:18