Go to the documentation of this file.
2 #ifndef DUNE_PDELAB_BACKEND_COMMON_UNCACHEDMATRIXVIEW_HH
3 #define DUNE_PDELAB_BACKEND_COMMON_UNCACHEDMATRIXVIEW_HH
11 template<
typename M_,
typename RowCache,
typename ColCache>
17 typedef typename std::remove_const<M_>::type
Container;
21 typename RowCache::LocalFunctionSpace::Traits::GridFunctionSpace,
22 typename Container::TestGridFunctionSpace
24 "The RowCache passed to LocalView must belong to the underlying GFSV"
29 typename ColCache::LocalFunctionSpace::Traits::GridFunctionSpace,
30 typename Container::TrialGridFunctionSpace
32 "The ColCache passed to LocalView must belong to the underlying GFSU"
37 typedef typename Container::field_type
E;
45 typedef typename RowCache::LocalFunctionSpace
LFSV;
46 typedef typename ColCache::LocalFunctionSpace
LFSU;
49 typedef typename LFSV::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex
RowContainerIndex;
52 typedef typename LFSU::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex
ColContainerIndex;
88 void bind(
const RowCache& row_cache,
const ColCache& col_cache)
107 template<
typename LC>
108 void read(LC& local_container)
const
124 template<
typename RDI,
typename CDI>
126 (std::is_same<RDI,RowDOFIndex>{} and std::is_same<CDI,ColDOFIndex>{} and not
127 (std::is_same<RDI,RowContainerIndex>{} and std::is_same<CDI,ColContainerIndex>{})),
164 template<
typename M_,
typename RowCache,
typename ColCache>
180 typedef typename RowCache::LocalFunctionSpace
LFSV;
181 typedef typename ColCache::LocalFunctionSpace
LFSU;
184 typedef typename LFSV::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex
RowContainerIndex;
187 typedef typename LFSU::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex
ColContainerIndex;
196 using BaseT::operator();
208 template<
typename LC>
209 void write(
const LC& local_container)
216 template<
typename LC>
217 void add(
const LC& local_container)
233 template<
typename RDI,
typename CDI>
235 (std::is_same<RDI,RowDOFIndex>{} and std::is_same<CDI,ColDOFIndex>{} and not
236 (std::is_same<RDI,RowContainerIndex>{} and std::is_same<CDI,ColContainerIndex>{})),
266 template<
typename RDI,
typename CDI>
268 (std::is_same<RDI,RowDOFIndex>{} and std::is_same<CDI,ColDOFIndex>{} and not
269 (std::is_same<RDI,RowContainerIndex>{} and std::is_same<CDI,ColContainerIndex>{}))
302 #endif // DUNE_PDELAB_BACKEND_COMMON_UNCACHEDMATRIXVIEW_HH
void read(LC &local_container) const
Definition: uncachedmatrixview.hh:108
std::enable_if_t<(std::is_same< RDI, RowDOFIndex >{} and std::is_same< CDI, ColDOFIndex >{} and not(std::is_same< RDI, RowContainerIndex >{} and std::is_same< CDI, ColContainerIndex >{})), const ElementType & > operator()(const RDI &i, const CDI &j) const
Definition: uncachedmatrixview.hh:130
void add(size_type i, size_type j, const ElementType &v)
Definition: uncachedmatrixview.hh:259
Container::size_type size_type
Definition: uncachedmatrixview.hh:175
Definition: uncachedmatrixview.hh:165
Container::ElementType ElementType
Definition: uncachedmatrixview.hh:174
const RowIndexCache & rowIndexCache() const
Definition: uncachedmatrixview.hh:66
E ElementType
Definition: uncachedmatrixview.hh:40
ColCache ColIndexCache
Definition: uncachedmatrixview.hh:178
LFSU::Traits::DOFIndex ColDOFIndex
Definition: uncachedmatrixview.hh:186
ColCache ColIndexCache
Definition: uncachedmatrixview.hh:43
const ElementType & operator()(size_type i, size_type j) const
Definition: uncachedmatrixview.hh:117
size_type N() const
Definition: uncachedmatrixview.hh:97
Container::size_type size_type
Definition: uncachedmatrixview.hh:38
std::enable_if_t<(std::is_same< RDI, RowDOFIndex >{} and std::is_same< CDI, ColDOFIndex >{} and not(std::is_same< RDI, RowContainerIndex >{} and std::is_same< CDI, ColContainerIndex >{})) > add(const RDI &i, const CDI &j, const ElementType &v)
Definition: uncachedmatrixview.hh:271
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
Definition: uncachedmatrixview.hh:12
ConstUncachedMatrixView()
Definition: uncachedmatrixview.hh:54
UncachedMatrixView()
Definition: uncachedmatrixview.hh:198
void add(const LC &local_container)
Definition: uncachedmatrixview.hh:217
RowCache RowIndexCache
Definition: uncachedmatrixview.hh:42
const RowCache * _row_cache
Definition: uncachedmatrixview.hh:158
ElementType & operator()(const RowContainerIndex &i, const ColContainerIndex &j)
Definition: uncachedmatrixview.hh:244
RowCache::LocalFunctionSpace LFSV
Definition: uncachedmatrixview.hh:45
void detach()
Definition: uncachedmatrixview.hh:83
static const unsigned int value
Definition: gridfunctionspace/tags.hh:139
size_type M() const
Definition: uncachedmatrixview.hh:102
const ColCache * _col_cache
Definition: uncachedmatrixview.hh:159
ElementType & operator()(size_type i, size_type j)
Definition: uncachedmatrixview.hh:226
LFSV::Traits::DOFIndex RowDOFIndex
Definition: uncachedmatrixview.hh:48
void unbind()
Definition: uncachedmatrixview.hh:94
const ElementType & operator()(const RowContainerIndex &i, const ColContainerIndex &j) const
Definition: uncachedmatrixview.hh:135
LFSU::Traits::DOFIndex ColDOFIndex
Definition: uncachedmatrixview.hh:51
void add(size_type i, const ColContainerIndex &j, const ElementType &v)
Definition: uncachedmatrixview.hh:286
RowCache::LocalFunctionSpace LFSV
Definition: uncachedmatrixview.hh:180
ElementType & operator()(size_type i, const ColContainerIndex &j)
Definition: uncachedmatrixview.hh:254
std::enable_if_t<(std::is_same< RDI, RowDOFIndex >{} and std::is_same< CDI, ColDOFIndex >{} and not(std::is_same< RDI, RowContainerIndex >{} and std::is_same< CDI, ColContainerIndex >{})), const ElementType & > operator()(const RDI &i, const CDI &j)
Definition: uncachedmatrixview.hh:239
void attach(M_ &container)
Definition: uncachedmatrixview.hh:78
const ElementType & operator()(const RowContainerIndex &i, size_type j) const
Definition: uncachedmatrixview.hh:140
LFSU::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex ColContainerIndex
Definition: uncachedmatrixview.hh:52
ColCache::LocalFunctionSpace LFSU
Definition: uncachedmatrixview.hh:46
void bind(const RowCache &row_cache, const ColCache &col_cache)
Definition: uncachedmatrixview.hh:88
M_ * _container
Definition: uncachedmatrixview.hh:157
Container & container()
Definition: uncachedmatrixview.hh:291
void add(const RowContainerIndex &i, size_type j, const ElementType &v)
Definition: uncachedmatrixview.hh:281
LFSV::Traits::DOFIndex RowDOFIndex
Definition: uncachedmatrixview.hh:183
LFSV::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex RowContainerIndex
Definition: uncachedmatrixview.hh:184
std::remove_const< M_ >::type Container
Definition: uncachedmatrixview.hh:17
LFSV::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex RowContainerIndex
Definition: uncachedmatrixview.hh:49
M_ Container
Definition: uncachedmatrixview.hh:173
void commit()
Definition: uncachedmatrixview.hh:205
RowCache RowIndexCache
Definition: uncachedmatrixview.hh:177
ConstUncachedMatrixView(M_ &container)
Definition: uncachedmatrixview.hh:60
Container::field_type E
Definition: uncachedmatrixview.hh:25
LFSU::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex ColContainerIndex
Definition: uncachedmatrixview.hh:187
ElementType & operator()(const RowContainerIndex &i, size_type j)
Definition: uncachedmatrixview.hh:249
const ColIndexCache & colIndexCache() const
Definition: uncachedmatrixview.hh:72
const ElementType & operator()(size_type i, const ColContainerIndex &j) const
Definition: uncachedmatrixview.hh:145
void write(const LC &local_container)
Definition: uncachedmatrixview.hh:209
UncachedMatrixView(Container &container)
Definition: uncachedmatrixview.hh:201
ColCache::LocalFunctionSpace LFSU
Definition: uncachedmatrixview.hh:181
void add(const RowContainerIndex &i, const ColContainerIndex &j, const ElementType &v)
Definition: uncachedmatrixview.hh:276
const Container & container() const
Definition: uncachedmatrixview.hh:150