1 #ifndef DUNE_FEM_COMMON_FMATRIXCOL_HH 2 #define DUNE_FEM_COMMON_FMATRIXCOL_HH 6 #include <dune/common/densevector.hh> 7 #include <dune/common/fmatrix.hh> 15 template<
class FieldMatrix >
23 template<
class FieldMatrix >
29 typedef typename DenseMatVecTraits< typename std::remove_const< FieldMatrix >::type >
::size_type size_type;
37 template<
class K,
int m,
int n >
39 :
public DenseVector< FieldMatrixColumn< FieldMatrix< K, m, n > > >
41 typedef DenseVector< FieldMatrixColumn< FieldMatrix< K, m, n > > > Base;
44 static const int dimension = m;
50 : fieldMatrix_( fieldMatrix ),
54 using Base::operator=;
56 DUNE_CONSTEXPR size_type
size ()
const {
return vec_size(); }
58 DUNE_CONSTEXPR size_type
vec_size ()
const {
return dimension; }
59 const value_type &
vec_access ( size_type i )
const {
return fieldMatrix_[ i ][ column_ ]; }
60 value_type &
vec_access ( size_type i ) {
return fieldMatrix_[ i ][ column_ ]; }
63 FieldMatrix< K, m, n > &fieldMatrix_;
67 template<
class K,
int m,
int n >
69 :
public DenseVector< FieldMatrixColumn< const FieldMatrix< K, m, n > > >
71 typedef DenseVector< FieldMatrixColumn< const FieldMatrix< K, m, n > > > Base;
74 static const int dimension = m;
80 : fieldMatrix_( fieldMatrix ),
84 using Base::operator=;
86 DUNE_CONSTEXPR size_type
size ()
const {
return vec_size(); }
88 DUNE_CONSTEXPR size_type
vec_size ()
const {
return dimension; }
89 const value_type &
vec_access ( size_type i )
const {
return fieldMatrix_[ i ][ column_ ]; }
92 const FieldMatrix< K, m, n > &fieldMatrix_;
98 #endif // #ifndef DUNE_FEM_COMMON_FMATRIXCOL_HH DUNE_CONSTEXPR size_type vec_size() const
Definition: fmatrixcol.hh:88
DenseMatVecTraits< typename std::remove_const< FieldMatrix >::type >::size_type size_type
Definition: fmatrixcol.hh:29
const value_type & vec_access(size_type i) const
Definition: fmatrixcol.hh:89
DUNE_CONSTEXPR size_type size() const
Definition: fmatrixcol.hh:56
Base::value_type value_type
Definition: fmatrixcol.hh:47
Base::value_type value_type
Definition: fmatrixcol.hh:77
FieldMatrixColumn(const FieldMatrix< K, m, n > &fieldMatrix, int column)
Definition: fmatrixcol.hh:79
FieldMatrixColumn(FieldMatrix< K, m, n > &fieldMatrix, int column)
Definition: fmatrixcol.hh:49
DUNE_CONSTEXPR size_type vec_size() const
Definition: fmatrixcol.hh:58
Definition: coordinate.hh:4
Definition: fmatrixcol.hh:16
FieldMatrixColumn< FieldMatrix > derived_type
Definition: fmatrixcol.hh:26
value_type & vec_access(size_type i)
Definition: fmatrixcol.hh:60
Base::size_type size_type
Definition: fmatrixcol.hh:76
DenseMatVecTraits< typename std::remove_const< FieldMatrix >::type >::value_type value_type
Definition: fmatrixcol.hh:28
DUNE_CONSTEXPR size_type size() const
Definition: fmatrixcol.hh:86
const value_type & vec_access(size_type i) const
Definition: fmatrixcol.hh:59
Base::size_type size_type
Definition: fmatrixcol.hh:46