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 const RowIndexCache & rowIndexCache() const
Definition: uncachedmatrixview.hh:66
Definition: uncachedmatrixview.hh:12
void detach()
Definition: uncachedmatrixview.hh:83
const ElementType & operator()(const RowContainerIndex &i, size_type j) const
Definition: uncachedmatrixview.hh:132
Container::size_type size_type
Definition: uncachedmatrixview.hh:38
void attach(M_ &container)
Definition: uncachedmatrixview.hh:78
Definition: uncachedmatrixview.hh:157
void read(LC &local_container) const
Definition: uncachedmatrixview.hh:108
const ColCache * _col_cache
Definition: uncachedmatrixview.hh:151
ElementType & operator()(const RowDOFIndex &i, const ColDOFIndex &j)
Definition: uncachedmatrixview.hh:223
size_type M() const
Definition: uncachedmatrixview.hh:102
void add(const RowContainerIndex &i, size_type j, const ElementType &v)
Definition: uncachedmatrixview.hh:258
static const unsigned int value
Definition: gridfunctionspace/tags.hh:177
void unbind()
Definition: uncachedmatrixview.hh:94
LFSV::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex RowContainerIndex
Definition: uncachedmatrixview.hh:49
ElementType & operator()(size_type i, size_type j)
Definition: uncachedmatrixview.hh:218
void add(size_type i, const ColContainerIndex &j, const ElementType &v)
Definition: uncachedmatrixview.hh:263
void add(const RowContainerIndex &i, const ColContainerIndex &j, const ElementType &v)
Definition: uncachedmatrixview.hh:253
Container::field_type E
Definition: uncachedmatrixview.hh:25
void bind(const RowCache &row_cache, const ColCache &col_cache)
Definition: uncachedmatrixview.hh:88
Container::size_type size_type
Definition: uncachedmatrixview.hh:167
M_ * _container
Definition: uncachedmatrixview.hh:149
Definition: adaptivity.hh:27
ConstUncachedMatrixView()
Definition: uncachedmatrixview.hh:54
LFSU::Traits::DOFIndex ColDOFIndex
Definition: uncachedmatrixview.hh:178
const ElementType & operator()(size_type i, const ColContainerIndex &j) const
Definition: uncachedmatrixview.hh:137
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:179
ConstUncachedMatrixView(M_ &container)
Definition: uncachedmatrixview.hh:60
const ColIndexCache & colIndexCache() const
Definition: uncachedmatrixview.hh:72
LFSU::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex ColContainerIndex
Definition: uncachedmatrixview.hh:52
LFSU::Traits::DOFIndex ColDOFIndex
Definition: uncachedmatrixview.hh:51
void add(const LC &local_container)
Definition: uncachedmatrixview.hh:209
void add(size_type i, size_type j, const ElementType &v)
Definition: uncachedmatrixview.hh:243
size_type N() const
Definition: uncachedmatrixview.hh:97
LFSV::Traits::DOFIndex RowDOFIndex
Definition: uncachedmatrixview.hh:48
const ElementType & operator()(size_type i, size_type j) const
Definition: uncachedmatrixview.hh:117
M_ Container
Definition: uncachedmatrixview.hh:165
ColCache ColIndexCache
Definition: uncachedmatrixview.hh:43
RowCache::LocalFunctionSpace LFSV
Definition: uncachedmatrixview.hh:45
const ElementType & operator()(const RowContainerIndex &i, const ColContainerIndex &j) const
Definition: uncachedmatrixview.hh:127
RowCache::LocalFunctionSpace LFSV
Definition: uncachedmatrixview.hh:172
void write(const LC &local_container)
Definition: uncachedmatrixview.hh:201
void add(const RowDOFIndex &i, const ColDOFIndex &j, const ElementType &v)
Definition: uncachedmatrixview.hh:248
const Container & container() const
Definition: uncachedmatrixview.hh:142
ColCache ColIndexCache
Definition: uncachedmatrixview.hh:170
UncachedMatrixView(Container &container)
Definition: uncachedmatrixview.hh:193
Container & container()
Definition: uncachedmatrixview.hh:268
LFSV::Traits::DOFIndex RowDOFIndex
Definition: uncachedmatrixview.hh:175
std::remove_const< M_ >::type Container
Definition: uncachedmatrixview.hh:17
ColCache::LocalFunctionSpace LFSU
Definition: uncachedmatrixview.hh:46
const ElementType & operator()(const RowDOFIndex &i, const ColDOFIndex &j) const
Definition: uncachedmatrixview.hh:122
LFSV::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex RowContainerIndex
Definition: uncachedmatrixview.hh:176
const RowCache * _row_cache
Definition: uncachedmatrixview.hh:150
void commit()
Definition: uncachedmatrixview.hh:197
ElementType & operator()(size_type i, const ColContainerIndex &j)
Definition: uncachedmatrixview.hh:238
E ElementType
Definition: uncachedmatrixview.hh:40
ElementType & operator()(const RowContainerIndex &i, const ColContainerIndex &j)
Definition: uncachedmatrixview.hh:228
RowCache RowIndexCache
Definition: uncachedmatrixview.hh:42
Container::ElementType ElementType
Definition: uncachedmatrixview.hh:166
UncachedMatrixView()
Definition: uncachedmatrixview.hh:190
RowCache RowIndexCache
Definition: uncachedmatrixview.hh:169