2 #ifndef DUNE_PDELAB_BACKEND_COMMON_UNCACHEDMATRIXVIEW_HH
3 #define DUNE_PDELAB_BACKEND_COMMON_UNCACHEDMATRIXVIEW_HH
5 #include <dune/common/typetraits.hh>
6 #include <dune/common/static_assert.hh>
7 #include <dune/common/nullptr.hh>
13 template<
typename M_,
typename RowCache,
typename ColCache>
23 typename RowCache::LocalFunctionSpace::Traits::GridFunctionSpace,
24 typename Container::TestGridFunctionSpace
26 "The RowCache passed to LocalView must belong to the underlying GFSV"
31 typename ColCache::LocalFunctionSpace::Traits::GridFunctionSpace,
32 typename Container::TrialGridFunctionSpace
34 "The ColCache passed to LocalView must belong to the underlying GFSU"
39 typedef typename Container::field_type
E;
47 typedef typename RowCache::LocalFunctionSpace
LFSV;
48 typedef typename ColCache::LocalFunctionSpace
LFSU;
51 typedef typename LFSV::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex
RowContainerIndex;
54 typedef typename LFSU::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex
ColContainerIndex;
90 void bind(
const RowCache& row_cache,
const ColCache& col_cache)
109 template<
typename LC>
110 void read(LC& local_container)
const
158 template<
typename M_,
typename RowCache,
typename ColCache>
174 typedef typename RowCache::LocalFunctionSpace
LFSV;
175 typedef typename ColCache::LocalFunctionSpace
LFSU;
178 typedef typename LFSV::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex
RowContainerIndex;
181 typedef typename LFSU::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex
ColContainerIndex;
190 using BaseT::operator();
202 template<
typename LC>
203 void write(
const LC& local_container)
210 template<
typename LC>
211 void add(
const LC& local_container)
281 #endif // DUNE_PDELAB_BACKEND_COMMON_UNCACHEDMATRIXVIEW_HH
const RowCache * _row_cache
Definition: uncachedmatrixview.hh:152
const ColIndexCache & colIndexCache() const
Definition: uncachedmatrixview.hh:74
Container & container()
Definition: uncachedmatrixview.hh:270
void commit()
Definition: uncachedmatrixview.hh:199
Definition: uncachedmatrixview.hh:14
UncachedMatrixView()
Definition: uncachedmatrixview.hh:192
ElementType & operator()(const RowDOFIndex &i, const ColDOFIndex &j)
Definition: uncachedmatrixview.hh:225
Definition: uncachedmatrixview.hh:159
const Container & container() const
Definition: uncachedmatrixview.hh:144
void detach()
Definition: uncachedmatrixview.hh:85
ColCache ColIndexCache
Definition: uncachedmatrixview.hh:45
Container::size_type size_type
Definition: uncachedmatrixview.hh:40
RowCache::LocalFunctionSpace LFSV
Definition: uncachedmatrixview.hh:47
const ElementType & operator()(const RowContainerIndex &i, const ColContainerIndex &j) const
Definition: uncachedmatrixview.hh:129
ConstUncachedMatrixView()
Definition: uncachedmatrixview.hh:56
LFSU::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex ColContainerIndex
Definition: uncachedmatrixview.hh:181
const ElementType & operator()(const RowDOFIndex &i, const ColDOFIndex &j) const
Definition: uncachedmatrixview.hh:124
LFSV::Traits::DOFIndex RowDOFIndex
Definition: uncachedmatrixview.hh:177
RowCache::LocalFunctionSpace LFSV
Definition: uncachedmatrixview.hh:174
void add(const RowContainerIndex &i, const ColContainerIndex &j, const ElementType &v)
Definition: uncachedmatrixview.hh:255
size_type M() const
Definition: uncachedmatrixview.hh:104
Container::size_type size_type
Definition: uncachedmatrixview.hh:169
void read(LC &local_container) const
Definition: uncachedmatrixview.hh:110
LFSU::Traits::DOFIndex ColDOFIndex
Definition: uncachedmatrixview.hh:53
ElementType & operator()(const RowContainerIndex &i, const ColContainerIndex &j)
Definition: uncachedmatrixview.hh:230
ConstUncachedMatrixView(M_ &container)
Definition: uncachedmatrixview.hh:62
void unbind()
Definition: uncachedmatrixview.hh:96
const ColCache * _col_cache
Definition: uncachedmatrixview.hh:153
size_type N() const
Definition: uncachedmatrixview.hh:99
Container::field_type E
Definition: uncachedmatrixview.hh:39
void write(const LC &local_container)
Definition: uncachedmatrixview.hh:203
LFSU::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex ColContainerIndex
Definition: uncachedmatrixview.hh:54
dune_static_assert((is_same< typename RowCache::LocalFunctionSpace::Traits::GridFunctionSpace, typename Container::TestGridFunctionSpace >::value),"The RowCache passed to LocalView must belong to the underlying GFSV")
void attach(M_ &container)
Definition: uncachedmatrixview.hh:80
const RowIndexCache & rowIndexCache() const
Definition: uncachedmatrixview.hh:68
const ElementType & operator()(const RowContainerIndex &i, size_type j) const
Definition: uncachedmatrixview.hh:134
ColCache::LocalFunctionSpace LFSU
Definition: uncachedmatrixview.hh:48
M_ Container
Definition: uncachedmatrixview.hh:167
static const unsigned int value
Definition: gridfunctionspace/tags.hh:175
const ElementType & operator()(size_type i, const ColContainerIndex &j) const
Definition: uncachedmatrixview.hh:139
LFSV::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex RowContainerIndex
Definition: uncachedmatrixview.hh:51
void add(size_type i, size_type j, const ElementType &v)
Definition: uncachedmatrixview.hh:245
LFSU::Traits::DOFIndex ColDOFIndex
Definition: uncachedmatrixview.hh:180
ColCache::LocalFunctionSpace LFSU
Definition: uncachedmatrixview.hh:175
void bind(const RowCache &row_cache, const ColCache &col_cache)
Definition: uncachedmatrixview.hh:90
void add(const LC &local_container)
Definition: uncachedmatrixview.hh:211
void add(const RowDOFIndex &i, const ColDOFIndex &j, const ElementType &v)
Definition: uncachedmatrixview.hh:250
M_ * _container
Definition: uncachedmatrixview.hh:151
ElementType & operator()(const RowContainerIndex &i, size_type j)
Definition: uncachedmatrixview.hh:235
RowCache RowIndexCache
Definition: uncachedmatrixview.hh:171
RowCache RowIndexCache
Definition: uncachedmatrixview.hh:44
remove_const< M_ >::type Container
Definition: uncachedmatrixview.hh:19
ElementType & operator()(size_type i, const ColContainerIndex &j)
Definition: uncachedmatrixview.hh:240
LFSV::Traits::DOFIndex RowDOFIndex
Definition: uncachedmatrixview.hh:50
ColCache ColIndexCache
Definition: uncachedmatrixview.hh:172
E ElementType
Definition: uncachedmatrixview.hh:42
UncachedMatrixView(Container &container)
Definition: uncachedmatrixview.hh:195
void add(const RowContainerIndex &i, size_type j, const ElementType &v)
Definition: uncachedmatrixview.hh:260
LFSV::Traits::GridFunctionSpace::Ordering::Traits::ContainerIndex RowContainerIndex
Definition: uncachedmatrixview.hh:178
ElementType & operator()(size_type i, size_type j)
Definition: uncachedmatrixview.hh:220
const ElementType & operator()(size_type i, size_type j) const
Definition: uncachedmatrixview.hh:119
Container::ElementType ElementType
Definition: uncachedmatrixview.hh:168
void add(size_type i, const ColContainerIndex &j, const ElementType &v)
Definition: uncachedmatrixview.hh:265