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 110 for (size_type i = 0; i <
N(); ++i)
111 for (size_type j = 0; j <
M(); ++j)
117 const ElementType&
operator()(size_type i, size_type j)
const 122 const ElementType&
operator()(
const RowDOFIndex& i,
const ColDOFIndex& j)
const 127 const ElementType&
operator()(
const RowContainerIndex& i,
const ColContainerIndex& j)
const 132 const ElementType&
operator()(
const RowContainerIndex& i, size_type j)
const 137 const ElementType&
operator()(size_type i,
const ColContainerIndex& j)
const 156 template<
typename M_,
typename RowCache,
typename ColCache>
172 typedef typename RowCache::LocalFunctionSpace
LFSV;
173 typedef typename ColCache::LocalFunctionSpace
LFSU;
176 typedef typename LFSV::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex
RowContainerIndex;
179 typedef typename LFSU::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex
ColContainerIndex;
181 using BaseT::rowIndexCache;
182 using BaseT::colIndexCache;
188 using BaseT::operator();
200 template<
typename LC>
201 void write(
const LC& local_container)
203 for (size_type i = 0; i <
N(); ++i)
204 for (size_type j = 0; j <
M(); ++j)
208 template<
typename LC>
209 void add(
const LC& local_container)
211 for (size_type i = 0; i <
N(); ++i)
212 for (size_type j = 0; j <
M(); ++j)
223 ElementType&
operator()(
const RowDOFIndex& i,
const ColDOFIndex& j)
228 ElementType&
operator()(
const RowContainerIndex& i,
const ColContainerIndex& j)
233 ElementType&
operator()(
const RowContainerIndex& i, size_type j)
238 ElementType&
operator()(size_type i,
const ColContainerIndex& j)
243 void add(size_type i, size_type j,
const ElementType& v)
248 void add(
const RowDOFIndex& i,
const ColDOFIndex& j,
const ElementType& v)
253 void add(
const RowContainerIndex& i,
const ColContainerIndex& j,
const ElementType& v)
258 void add(
const RowContainerIndex& i, size_type j,
const ElementType& v)
263 void add(size_type i,
const ColContainerIndex& j,
const ElementType& v)
279 #endif // DUNE_PDELAB_BACKEND_COMMON_UNCACHEDMATRIXVIEW_HH LFSU::Traits::DOFIndex ColDOFIndex
Definition: uncachedmatrixview.hh:51
M_ * _container
Definition: uncachedmatrixview.hh:149
ConstUncachedMatrixView(M_ &container)
Definition: uncachedmatrixview.hh:60
ElementType & operator()(const RowDOFIndex &i, const ColDOFIndex &j)
Definition: uncachedmatrixview.hh:223
ColCache::LocalFunctionSpace LFSU
Definition: uncachedmatrixview.hh:46
LFSV::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex RowContainerIndex
Definition: uncachedmatrixview.hh:176
const RowIndexCache & rowIndexCache() const
Definition: uncachedmatrixview.hh:66
const ElementType & operator()(const RowContainerIndex &i, size_type j) const
Definition: uncachedmatrixview.hh:132
RowCache::LocalFunctionSpace LFSV
Definition: uncachedmatrixview.hh:172
UncachedMatrixView()
Definition: uncachedmatrixview.hh:190
RowCache RowIndexCache
Definition: uncachedmatrixview.hh:42
Container::ElementType ElementType
Definition: uncachedmatrixview.hh:166
const ElementType & operator()(const RowDOFIndex &i, const ColDOFIndex &j) const
Definition: uncachedmatrixview.hh:122
void detach()
Definition: uncachedmatrixview.hh:83
const RowCache * _row_cache
Definition: uncachedmatrixview.hh:150
void attach(M_ &container)
Definition: uncachedmatrixview.hh:78
RowCache::LocalFunctionSpace LFSV
Definition: uncachedmatrixview.hh:45
UncachedMatrixView(Container &container)
Definition: uncachedmatrixview.hh:193
Container & container()
Definition: uncachedmatrixview.hh:268
size_type N() const
Definition: uncachedmatrixview.hh:97
LFSV::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex RowContainerIndex
Definition: uncachedmatrixview.hh:49
Definition: uncachedmatrixview.hh:12
void add(const LC &local_container)
Definition: uncachedmatrixview.hh:209
void unbind()
Definition: uncachedmatrixview.hh:94
const ElementType & operator()(size_type i, size_type j) const
Definition: uncachedmatrixview.hh:117
const Container & container() const
Definition: uncachedmatrixview.hh:142
For backward compatibility – Do not use this!
Definition: adaptivity.hh:27
LFSV::Traits::DOFIndex RowDOFIndex
Definition: uncachedmatrixview.hh:175
LFSU::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex ColContainerIndex
Definition: uncachedmatrixview.hh:179
LFSV::Traits::DOFIndex RowDOFIndex
Definition: uncachedmatrixview.hh:48
void add(const RowContainerIndex &i, const ColContainerIndex &j, const ElementType &v)
Definition: uncachedmatrixview.hh:253
E ElementType
Definition: uncachedmatrixview.hh:40
const ColCache * _col_cache
Definition: uncachedmatrixview.hh:151
RowCache RowIndexCache
Definition: uncachedmatrixview.hh:169
const ColIndexCache & colIndexCache() const
Definition: uncachedmatrixview.hh:72
std::remove_const< M_ >::type Container
Definition: uncachedmatrixview.hh:17
static const unsigned int value
Definition: gridfunctionspace/tags.hh:139
ColCache ColIndexCache
Definition: uncachedmatrixview.hh:43
Container::field_type E
Definition: uncachedmatrixview.hh:25
void commit()
Definition: uncachedmatrixview.hh:197
ElementType & operator()(const RowContainerIndex &i, const ColContainerIndex &j)
Definition: uncachedmatrixview.hh:228
ElementType & operator()(size_type i, const ColContainerIndex &j)
Definition: uncachedmatrixview.hh:238
Definition: uncachedmatrixview.hh:157
Container::size_type size_type
Definition: uncachedmatrixview.hh:38
void read(LC &local_container) const
Definition: uncachedmatrixview.hh:108
size_type M() const
Definition: uncachedmatrixview.hh:102
void add(const RowDOFIndex &i, const ColDOFIndex &j, const ElementType &v)
Definition: uncachedmatrixview.hh:248
void add(const RowContainerIndex &i, size_type j, const ElementType &v)
Definition: uncachedmatrixview.hh:258
void add(size_type i, const ColContainerIndex &j, const ElementType &v)
Definition: uncachedmatrixview.hh:263
const ElementType & operator()(const RowContainerIndex &i, const ColContainerIndex &j) const
Definition: uncachedmatrixview.hh:127
void add(size_type i, size_type j, const ElementType &v)
Definition: uncachedmatrixview.hh:243
ColCache::LocalFunctionSpace LFSU
Definition: uncachedmatrixview.hh:173
ElementType & operator()(const RowContainerIndex &i, size_type j)
Definition: uncachedmatrixview.hh:233
LFSU::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex ColContainerIndex
Definition: uncachedmatrixview.hh:52
Container::size_type size_type
Definition: uncachedmatrixview.hh:167
const ElementType & operator()(size_type i, const ColContainerIndex &j) const
Definition: uncachedmatrixview.hh:137
ColCache ColIndexCache
Definition: uncachedmatrixview.hh:170
void write(const LC &local_container)
Definition: uncachedmatrixview.hh:201
M_ Container
Definition: uncachedmatrixview.hh:165
LFSU::Traits::DOFIndex ColDOFIndex
Definition: uncachedmatrixview.hh:178
void bind(const RowCache &row_cache, const ColCache &col_cache)
Definition: uncachedmatrixview.hh:88
ElementType & operator()(size_type i, size_type j)
Definition: uncachedmatrixview.hh:218
ConstUncachedMatrixView()
Definition: uncachedmatrixview.hh:54