3 #ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH
4 #define DUNE_PERSISTENTCONTAINERVECTOR_HH
16 template<
class G,
class IndexSet,
class Vector >
24 typedef typename Vector::value_type
Value;
25 typedef typename Vector::size_type
Size;
35 data_( indexSet.
size( codim ), value, allocator )
38 template<
class Entity >
43 assert( index <
data_.size() );
44 return data_[ index ];
47 template<
class Entity >
52 assert( index <
data_.size() );
53 return data_[ index ];
56 template<
class Entity >
60 assert( index <
data_.size() );
61 return data_[ index ];
64 template<
class Entity >
68 assert( index <
data_.size() );
69 return data_[ index ];
77 data_.resize( indexSetSize, value );
103 typedef Value Data DUNE_DEPRECATED_MSG(
"Use Value instead.");
131 #endif // #ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH
Know your own codimension.
Definition: common/entity.hh:99
void reserve()
Definition: persistentcontainervector.hh:105
void update()
Definition: persistentcontainervector.hh:115
void resize(const Value &value=Value())
Definition: persistentcontainervector.hh:74
Wrapper class for entities.
Definition: common/entity.hh:56
const IndexSet * indexSet_
Definition: persistentcontainervector.hh:125
Index Set Interface base class.
Definition: common/grid.hh:359
ConstIterator end() const
Definition: persistentcontainervector.hh:94
Vector::const_iterator ConstIterator
Definition: persistentcontainervector.hh:26
void swap(This &other)
Definition: persistentcontainervector.hh:84
G Grid
Definition: persistentcontainervector.hh:22
void clear()
Definition: persistentcontainervector.hh:108
[ provides Dune::Grid ]
Definition: agrid.hh:137
void shrinkToFit()
Definition: persistentcontainervector.hh:80
IndexType index(const typename remove_const< GridImp >::type::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:107
const Value & operator()(const Entity &entity, int subEntity) const
Definition: persistentcontainervector.hh:57
Vector data_
Definition: persistentcontainervector.hh:126
Value Data
Definition: persistentcontainervector.hh:103
Vector::allocator_type Allocator
Definition: persistentcontainervector.hh:29
Size size() const
Definition: persistentcontainervector.hh:72
const Value & operator[](const Entity &entity) const
Definition: persistentcontainervector.hh:39
Vector::iterator Iterator
Definition: persistentcontainervector.hh:27
Iterator begin()
Definition: persistentcontainervector.hh:92
void fill(const Value &value)
Definition: persistentcontainervector.hh:82
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:146
Iterator end()
Definition: persistentcontainervector.hh:95
Vector::size_type Size
Definition: persistentcontainervector.hh:25
ConstIterator begin() const
Definition: persistentcontainervector.hh:91
int codimension() const
Definition: persistentcontainervector.hh:97
vector-based implementation of the PersistentContainer
Definition: persistentcontainervector.hh:17
const IndexSet & indexSet() const
Definition: persistentcontainervector.hh:122
Vector::value_type Value
Definition: persistentcontainervector.hh:24
int codim_
Definition: persistentcontainervector.hh:124
PersistentContainerVector(const IndexSet &indexSet, int codim, const Value &value, const Allocator &allocator=Allocator())
Definition: persistentcontainervector.hh:31
IndexType size(GeometryType type) const
Return total number of entities of given geometry type in entity set .
Definition: indexidset.hh:204