1 #ifndef DUNE_FEM_SUBOBJECTS_HH 2 #define DUNE_FEM_SUBOBJECTS_HH 6 #include <dune/common/fvector.hh> 7 #include <dune/common/fmatrix.hh> 16 template<
class DofVector,
class Dof >
19 typedef DofVector DofVectorType;
33 assert( (i < size_ )&& (i >= 0 ) );
34 return dofs_[ i + offset_ ];
39 assert( (i < size_ )&& (i >= 0 ) );
40 return dofs_[ i + offset_ ];
66 template<
class K,
int SIZE >
70 static const int size = SIZE;
73 template<
class K,
int ROWS,
int COLS >
74 struct RowType< FieldMatrix< K, ROWS, COLS > >
76 typedef FieldVector<K, COLS>
Type;
77 static const int size = ROWS;
82 template <
class DomainObject,
class RangeObject,
int offset >
85 typedef DomainObject DomainObjectType;
86 typedef RangeObject RangeObjectType;
88 typedef typename RowType< RangeObject > :: Type RowType;
97 assert( (i >=0 ) && (i <
size()) );
98 return host_[ i + offset ];
103 assert( (i >=0 ) && (i <
size()) );
104 return host_[ i + offset ];
112 operator typename std::remove_const< RangeObjectType >::type ()
const 114 typename std::remove_const< RangeObjectType >::type y;
115 for(
int i = 0; i <
size(); ++i )
116 y[ i ] = (*
this)[ i ];
121 DomainObjectType &host_;
128 template<
class DomainObj,
class RangeObj,
int offset>
132 for(
int i = 0; i < s.
size(); ++i )
138 #endif // #ifndef DUNE_FEM_SUBOBJECTS_HH SubObject(DomainObjectType &host)
Definition: subobjects.hh:91
Definition: subobjects.hh:57
int size() const
Definition: subobjects.hh:107
Definition: subobjects.hh:83
DofType value_type
Definition: subobjects.hh:23
SubDofVector(DofVectorType &dofs, int size, int offset)
Definition: subobjects.hh:25
Definition: coordinate.hh:4
void istl_assign_to_fmatrix(FieldMatrix< K, n, m > &A, const Fem::FieldMatrixConverter< FieldVector< K, n *m >, FieldMatrix< K, n, m > > &B)
Definition: fmatrixconverter.hh:241
K Type
Definition: subobjects.hh:69
const RowType< T >::Type Type
Definition: subobjects.hh:62
const DofType & operator[](const int i) const
Definition: subobjects.hh:31
int size() const
Definition: subobjects.hh:43
FieldVector< K, COLS > Type
Definition: subobjects.hh:76