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;
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 );
void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
Definition utility/persistentcontainer.hh:81
Include standard header files.
Definition agrid.hh:60
Wrapper class for entities.
Definition common/entity.hh:62
@ codimension
Know your own codimension.
Definition common/entity.hh:104
Index Set Interface base class.
Definition indexidset.hh:76
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:149
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:111
IndexType size(GeometryType type) const
Return total number of entities of given geometry type in entity set .
Definition indexidset.hh:215
vector-based implementation of the PersistentContainer
Definition persistentcontainervector.hh:49
PersistentContainerVector(const IndexSet &indexSet, int codim, const Value &value, const Allocator &allocator=Allocator())
Definition persistentcontainervector.hh:62
Iterator begin()
Definition persistentcontainervector.hh:123
Vector::size_type Size
Definition persistentcontainervector.hh:56
Vector::value_type Value
Definition persistentcontainervector.hh:55
Vector::allocator_type Allocator
Definition persistentcontainervector.hh:60
void fill(const Value &value)
Definition persistentcontainervector.hh:113
G Grid
Definition persistentcontainervector.hh:53
const Value & operator()(const Entity &entity, int subEntity) const
Definition persistentcontainervector.hh:88
const IndexSet * indexSet_
Definition persistentcontainervector.hh:134
Vector::iterator Iterator
Definition persistentcontainervector.hh:58
ConstIterator begin() const
Definition persistentcontainervector.hh:122
ConstIterator end() const
Definition persistentcontainervector.hh:125
int codim_
Definition persistentcontainervector.hh:133
void shrinkToFit()
Definition persistentcontainervector.hh:111
Vector::const_iterator ConstIterator
Definition persistentcontainervector.hh:57
Vector data_
Definition persistentcontainervector.hh:135
Iterator end()
Definition persistentcontainervector.hh:126
const IndexSet & indexSet() const
Definition persistentcontainervector.hh:131
int codimension() const
Definition persistentcontainervector.hh:128
Size size() const
Definition persistentcontainervector.hh:103
void swap(This &other)
Definition persistentcontainervector.hh:115
const Value & operator[](const Entity &entity) const
Definition persistentcontainervector.hh:70
void resize(const Value &value=Value())
Definition persistentcontainervector.hh:105