5 #ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH 6 #define DUNE_PERSISTENTCONTAINERVECTOR_HH 49 template<
class G,
class IndexSet,
class Vector >
57 typedef typename Vector::value_type
Value;
58 typedef typename Vector::size_type
Size;
71 template<
class Entity >
76 assert( index <
data_.size() );
77 return data_[ index ];
80 template<
class Entity >
85 assert( index <
data_.size() );
86 return data_[ index ];
89 template<
class Entity >
93 assert( index <
data_.size() );
94 return data_[ index ];
97 template<
class Entity >
101 assert( index <
data_.size() );
102 return data_[ index ];
110 data_.resize( indexSetSize, value );
142 #endif // #ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH vector-based implementation of the PersistentContainer
Definition: persistentcontainervector.hh:50
G Grid
Definition: persistentcontainervector.hh:55
Iterator begin()
Definition: persistentcontainervector.hh:125
Vector::iterator Iterator
Definition: persistentcontainervector.hh:60
auto size(GeometryType type) const
Return total number of entities of given geometry type in entity set .
Definition: common/indexidset.hh:223
Index Set Interface base class.
Definition: common/grid.hh:348
const Value & operator()(const Entity &entity, int subEntity) const
Definition: persistentcontainervector.hh:90
IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
Map a subentity to an index.
Definition: common/indexidset.hh:153
Iterator end()
Definition: persistentcontainervector.hh:128
ConstIterator begin() const
Definition: persistentcontainervector.hh:124
Vector data_
Definition: persistentcontainervector.hh:137
Vector::value_type Value
Definition: persistentcontainervector.hh:57
int codim_
Definition: persistentcontainervector.hh:135
ConstIterator end() const
Definition: persistentcontainervector.hh:127
void swap(This &other)
Definition: persistentcontainervector.hh:117
Vector::const_iterator ConstIterator
Definition: persistentcontainervector.hh:59
Size size() const
Definition: persistentcontainervector.hh:105
const IndexSet & indexSet() const
Definition: persistentcontainervector.hh:133
Include standard header files.
Definition: agrid.hh:59
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: common/indexidset.hh:113
const IndexSet * indexSet_
Definition: persistentcontainervector.hh:136
int codimension() const
Definition: persistentcontainervector.hh:130
static constexpr int codimension
Know your own codimension.
Definition: common/entity.hh:106
Vector::size_type Size
Definition: persistentcontainervector.hh:58
const Value & operator[](const Entity &entity) const
Definition: persistentcontainervector.hh:72
Vector::allocator_type Allocator
Definition: persistentcontainervector.hh:62
Wrapper class for entities.
Definition: common/entity.hh:65
void fill(const Value &value)
Definition: persistentcontainervector.hh:115
PersistentContainerVector(const IndexSet &indexSet, int codim, const Value &value, const Allocator &allocator=Allocator())
Definition: persistentcontainervector.hh:64
void resize(const Value &value=Value())
Definition: persistentcontainervector.hh:107
void shrinkToFit()
Definition: persistentcontainervector.hh:113