3 #ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH
4 #define DUNE_PERSISTENTCONTAINERVECTOR_HH
47 template<
class G,
class IndexSet,
class Vector >
55 typedef typename Vector::value_type
Value;
56 typedef typename Vector::size_type
Size;
66 data_( indexSet.
size( codim ), value, allocator )
69 template<
class Entity >
74 assert( index <
data_.size() );
75 return data_[ index ];
78 template<
class Entity >
83 assert( index <
data_.size() );
84 return data_[ index ];
87 template<
class Entity >
91 assert( index <
data_.size() );
92 return data_[ index ];
95 template<
class Entity >
99 assert( index <
data_.size() );
100 return data_[ index ];
108 data_.resize( indexSetSize, value );
140 #endif // #ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH
Index Set Interface base class.
Definition: common/grid.hh:361
IndexType index(const typename Traits::template Codim< cc >::Entity &e) const
Map entity to index. The result of calling this method with an entity that is not in the index set is...
Definition: indexidset.hh:115
Vector::const_iterator ConstIterator
Definition: persistentcontainervector.hh:57
Wrapper class for entities.
Definition: common/entity.hh:61
void swap(This &other)
Definition: persistentcontainervector.hh:115
void shrinkToFit()
Definition: persistentcontainervector.hh:111
void resize(const Value &value=Value())
Definition: persistentcontainervector.hh:105
Iterator end()
Definition: persistentcontainervector.hh:126
const IndexSet * indexSet_
Definition: persistentcontainervector.hh:134
Size size() const
Definition: persistentcontainervector.hh:103
vector-based implementation of the PersistentContainer
Definition: persistentcontainervector.hh:48
IndexType size(GeometryType type) const
Return total number of entities of given geometry type in entity set .
Definition: indexidset.hh:232
const Value & operator()(const Entity &entity, int subEntity) const
Definition: persistentcontainervector.hh:88
Vector::size_type Size
Definition: persistentcontainervector.hh:56
Vector::allocator_type Allocator
Definition: persistentcontainervector.hh:60
ConstIterator end() const
Definition: persistentcontainervector.hh:125
Vector data_
Definition: persistentcontainervector.hh:135
const Value & operator[](const Entity &entity) const
Definition: persistentcontainervector.hh:70
int codimension() const
Definition: persistentcontainervector.hh:128
G Grid
Definition: persistentcontainervector.hh:53
Vector::value_type Value
Definition: persistentcontainervector.hh:55
PersistentContainerVector(const IndexSet &indexSet, int codim, const Value &value, const Allocator &allocator=Allocator())
Definition: persistentcontainervector.hh:62
Iterator begin()
Definition: persistentcontainervector.hh:123
IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
Map a subentity to an index.
Definition: indexidset.hh:153
ConstIterator begin() const
Definition: persistentcontainervector.hh:122
Vector::iterator Iterator
Definition: persistentcontainervector.hh:58
Know your own codimension.
Definition: common/entity.hh:104
const IndexSet & indexSet() const
Definition: persistentcontainervector.hh:131
int codim_
Definition: persistentcontainervector.hh:133
void fill(const Value &value)
Definition: persistentcontainervector.hh:113