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>{}))
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
Definition: uncachedmatrixview.hh:13
const RowCache * _row_cache
Definition: uncachedmatrixview.hh:158
const ElementType & operator()(const RowContainerIndex &i, size_type j) const
Definition: uncachedmatrixview.hh:140
const ElementType & operator()(const RowContainerIndex &i, const ColContainerIndex &j) const
Definition: uncachedmatrixview.hh:135
LFSV::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex RowContainerIndex
Definition: uncachedmatrixview.hh:49
E ElementType
Definition: uncachedmatrixview.hh:40
const ColIndexCache & colIndexCache() const
Definition: uncachedmatrixview.hh:72
void unbind()
Definition: uncachedmatrixview.hh:94
LFSU::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex ColContainerIndex
Definition: uncachedmatrixview.hh:52
const ElementType & operator()(size_type i, size_type j) const
Definition: uncachedmatrixview.hh:117
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
M_ * _container
Definition: uncachedmatrixview.hh:157
RowCache::LocalFunctionSpace LFSV
Definition: uncachedmatrixview.hh:45
RowCache RowIndexCache
Definition: uncachedmatrixview.hh:42
ConstUncachedMatrixView(M_ &container)
Definition: uncachedmatrixview.hh:60
const ElementType & operator()(size_type i, const ColContainerIndex &j) const
Definition: uncachedmatrixview.hh:145
ConstUncachedMatrixView()
Definition: uncachedmatrixview.hh:54
Container::field_type E
Definition: uncachedmatrixview.hh:37
LFSV::Traits::DOFIndex RowDOFIndex
Definition: uncachedmatrixview.hh:48
void detach()
Definition: uncachedmatrixview.hh:83
const Container & container() const
Definition: uncachedmatrixview.hh:150
ColCache::LocalFunctionSpace LFSU
Definition: uncachedmatrixview.hh:46
void attach(M_ &container)
Definition: uncachedmatrixview.hh:78
size_type M() const
Definition: uncachedmatrixview.hh:102
const ColCache * _col_cache
Definition: uncachedmatrixview.hh:159
LFSU::Traits::DOFIndex ColDOFIndex
Definition: uncachedmatrixview.hh:51
std::remove_const< M_ >::type Container
Definition: uncachedmatrixview.hh:17
ColCache ColIndexCache
Definition: uncachedmatrixview.hh:43
void bind(const RowCache &row_cache, const ColCache &col_cache)
Definition: uncachedmatrixview.hh:88
void read(LC &local_container) const
Definition: uncachedmatrixview.hh:108
Container::size_type size_type
Definition: uncachedmatrixview.hh:38
size_type N() const
Definition: uncachedmatrixview.hh:97
const RowIndexCache & rowIndexCache() const
Definition: uncachedmatrixview.hh:66
Definition: uncachedmatrixview.hh:167
M_ Container
Definition: uncachedmatrixview.hh:173
void commit()
Definition: uncachedmatrixview.hh:205
void add(size_type i, const ColContainerIndex &j, const ElementType &v)
Definition: uncachedmatrixview.hh:286
Container & container()
Definition: uncachedmatrixview.hh:291
ColCache::LocalFunctionSpace LFSU
Definition: uncachedmatrixview.hh:181
ElementType & operator()(const RowContainerIndex &i, size_type j)
Definition: uncachedmatrixview.hh:249
ElementType & operator()(size_type i, size_type j)
Definition: uncachedmatrixview.hh:226
const ColIndexCache & colIndexCache() const
Definition: uncachedmatrixview.hh:72
void add(const RowContainerIndex &i, size_type j, const ElementType &v)
Definition: uncachedmatrixview.hh:281
Container::size_type size_type
Definition: uncachedmatrixview.hh:175
LFSU::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex ColContainerIndex
Definition: uncachedmatrixview.hh:187
void add(size_type i, size_type j, const ElementType &v)
Definition: uncachedmatrixview.hh:259
void write(const LC &local_container)
Definition: uncachedmatrixview.hh:209
void add(const RowContainerIndex &i, const ColContainerIndex &j, const ElementType &v)
Definition: uncachedmatrixview.hh:276
LFSV::Traits::DOFIndex RowDOFIndex
Definition: uncachedmatrixview.hh:183
ElementType & operator()(const RowContainerIndex &i, const ColContainerIndex &j)
Definition: uncachedmatrixview.hh:244
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 add(const LC &local_container)
Definition: uncachedmatrixview.hh:217
size_type M() const
Definition: uncachedmatrixview.hh:102
ElementType & operator()(size_type i, const ColContainerIndex &j)
Definition: uncachedmatrixview.hh:254
ColCache ColIndexCache
Definition: uncachedmatrixview.hh:178
LFSV::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex RowContainerIndex
Definition: uncachedmatrixview.hh:184
LFSU::Traits::DOFIndex ColDOFIndex
Definition: uncachedmatrixview.hh:186
Container::ElementType ElementType
Definition: uncachedmatrixview.hh:174
RowCache::LocalFunctionSpace LFSV
Definition: uncachedmatrixview.hh:180
UncachedMatrixView(Container &container)
Definition: uncachedmatrixview.hh:201
UncachedMatrixView()
Definition: uncachedmatrixview.hh:198
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
size_type N() const
Definition: uncachedmatrixview.hh:97
RowCache RowIndexCache
Definition: uncachedmatrixview.hh:177
const RowIndexCache & rowIndexCache() const
Definition: uncachedmatrixview.hh:66
static const unsigned int value
Definition: gridfunctionspace/tags.hh:139