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