dune-grid  2.2.1
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Dune::PersistentContainerMap< Grid, Id, Map > Class Template Reference

An implementation for the PersistentContainer based on a container satisfying the std::map interface and using a class providing an IdSet for storing the Data. More...

#include <dune/grid/utility/persistentcontainer.hh>

Classes

struct  AdaptCodim
 
struct  AdaptCodimBase
 
struct  AdaptCodimBase< codim, false >
 
struct  DataExtractor
 
struct  DataExtractor< D, const_iterator >
 
struct  DataExtractor< D, iterator >
 
class  MyIterator
 

Public Types

typedef GridType::template
Codim< 0 >::Entity 
ElementType
 
typedef MyIterator< iteratorIterator
 
typedef MyIterator
< const_iterator
ConstIterator
 

Public Member Functions

 PersistentContainerMap (const GridType &grid, const int codim, const Id &id, const typename Map::key_compare &comp, const typename Map::allocator_type &allocator)
 constructor creating container filled with default values. More...
 
 PersistentContainerMap (const GridType &grid, const int codim, const Id &id)
 constructor creating container filled with default values (for an More...
 
 PersistentContainerMap (const PersistentContainerMap &other)
 copy constructor More...
 
template<class Entity >
Dataoperator[] (const Entity &entity)
 random access entity with correct codimension More...
 
template<class Entity >
const Dataoperator[] (const Entity &entity) const
 random access entity with correct codimension More...
 
Dataoperator() (const ElementType &element, const int subEntity)
 access for sub entity data More...
 
const Dataoperator() (const ElementType &element, const int subEntity) const
 access for sub entity data More...
 
Iterator begin ()
 iterator begin for iterating over data actually stored in container More...
 
ConstIterator begin () const
 const iterator begin More...
 
Iterator end ()
 iterator end More...
 
ConstIterator end () const
 const iterator end More...
 
size_t size () const
 return size of allocated data More...
 
void reserve ()
 enlarge container, compress is not necessary but could be done More...
 
void clear ()
 adjust container to correct size and set all values to default More...
 
void update ()
 adjust container to correct size including compress More...
 

Protected Types

typedef Map::mapped_type Data
 
typedef Id::IdType IdType
 
typedef Grid GridType
 
typedef Map::iterator iterator
 
typedef Map::const_iterator const_iterator
 

Protected Member Functions

void update (const Data &value)
 adjust container to correct size including compress More...
 
template<int codim>
void adaptCodim (const Data &value)
 

Protected Attributes

const GridTypegrid_
 
const int codim_
 
const Id & id_
 
Map data_
 

Detailed Description

template<class Grid, class Id, class Map>
class Dune::PersistentContainerMap< Grid, Id, Map >

An implementation for the PersistentContainer based on a container satisfying the std::map interface and using a class providing an IdSet for storing the Data.

Member Typedef Documentation

template<class Grid, class Id, class Map>
typedef Map :: const_iterator Dune::PersistentContainerMap< Grid, Id, Map >::const_iterator
protected
template<class Grid, class Id, class Map>
typedef MyIterator< const_iterator > Dune::PersistentContainerMap< Grid, Id, Map >::ConstIterator
template<class Grid, class Id, class Map>
typedef Map :: mapped_type Dune::PersistentContainerMap< Grid, Id, Map >::Data
protected
template<class Grid, class Id, class Map>
typedef GridType :: template Codim< 0 >:: Entity Dune::PersistentContainerMap< Grid, Id, Map >::ElementType
template<class Grid, class Id, class Map>
typedef Grid Dune::PersistentContainerMap< Grid, Id, Map >::GridType
protected
template<class Grid, class Id, class Map>
typedef Id :: IdType Dune::PersistentContainerMap< Grid, Id, Map >::IdType
protected
template<class Grid, class Id, class Map>
typedef Map :: iterator Dune::PersistentContainerMap< Grid, Id, Map >::iterator
protected
template<class Grid, class Id, class Map>
typedef MyIterator< iterator > Dune::PersistentContainerMap< Grid, Id, Map >::Iterator

Constructor & Destructor Documentation

template<class Grid, class Id, class Map>
Dune::PersistentContainerMap< Grid, Id, Map >::PersistentContainerMap ( const GridType grid,
const int  codim,
const Id &  id,
const typename Map::key_compare &  comp,
const typename Map::allocator_type &  allocator 
)
inline

constructor creating container filled with default values.

template<class Grid, class Id, class Map>
Dune::PersistentContainerMap< Grid, Id, Map >::PersistentContainerMap ( const GridType grid,
const int  codim,
const Id &  id 
)
inline

constructor creating container filled with default values (for an

template<class Grid, class Id, class Map>
Dune::PersistentContainerMap< Grid, Id, Map >::PersistentContainerMap ( const PersistentContainerMap< Grid, Id, Map > &  other)
inline

copy constructor

Member Function Documentation

template<class Grid, class Id, class Map>
template<int codim>
void Dune::PersistentContainerMap< Grid, Id, Map >::adaptCodim ( const Data value)
inlineprotected
template<class Grid, class Id, class Map>
Iterator Dune::PersistentContainerMap< Grid, Id, Map >::begin ( )
inline

iterator begin for iterating over data actually stored in container

Referenced by Dune::PersistentContainerWrapper< GeometryGrid< HostGrid, CoordFunction, Allocator >, Data, Allocator >::begin().

template<class Grid, class Id, class Map>
ConstIterator Dune::PersistentContainerMap< Grid, Id, Map >::begin ( ) const
inline

const iterator begin

template<class Grid, class Id, class Map>
void Dune::PersistentContainerMap< Grid, Id, Map >::clear ( )
inline
template<class Grid, class Id, class Map>
Iterator Dune::PersistentContainerMap< Grid, Id, Map >::end ( )
inline
template<class Grid, class Id, class Map>
ConstIterator Dune::PersistentContainerMap< Grid, Id, Map >::end ( ) const
inline

const iterator end

template<class Grid, class Id, class Map>
Data& Dune::PersistentContainerMap< Grid, Id, Map >::operator() ( const ElementType element,
const int  subEntity 
)
inline

access for sub entity data

template<class Grid, class Id, class Map>
const Data& Dune::PersistentContainerMap< Grid, Id, Map >::operator() ( const ElementType element,
const int  subEntity 
) const
inline

access for sub entity data

template<class Grid, class Id, class Map>
template<class Entity >
Data& Dune::PersistentContainerMap< Grid, Id, Map >::operator[] ( const Entity entity)
inline

random access entity with correct codimension

template<class Grid, class Id, class Map>
template<class Entity >
const Data& Dune::PersistentContainerMap< Grid, Id, Map >::operator[] ( const Entity entity) const
inline

random access entity with correct codimension

template<class Grid, class Id, class Map>
void Dune::PersistentContainerMap< Grid, Id, Map >::reserve ( )
inline

enlarge container, compress is not necessary but could be done

Referenced by Dune::PersistentContainerWrapper< GeometryGrid< HostGrid, CoordFunction, Allocator >, Data, Allocator >::reserve().

template<class Grid, class Id, class Map>
size_t Dune::PersistentContainerMap< Grid, Id, Map >::size ( ) const
inline
template<class Grid, class Id, class Map>
void Dune::PersistentContainerMap< Grid, Id, Map >::update ( )
inline
template<class Grid, class Id, class Map>
void Dune::PersistentContainerMap< Grid, Id, Map >::update ( const Data value)
inlineprotected

adjust container to correct size including compress

Member Data Documentation

template<class Grid, class Id, class Map>
const int Dune::PersistentContainerMap< Grid, Id, Map >::codim_
protected
template<class Grid, class Id, class Map>
Map Dune::PersistentContainerMap< Grid, Id, Map >::data_
mutableprotected

Referenced by Dune::PersistentContainerMap< HostGrid, HostGrid::Traits::LocalIdSet, std::map< const HostGrid::Traits::LocalIdSet::IdType, Data, std::less< const HostGrid::Traits::LocalIdSet::IdType >, Allocator::template rebind< HostGrid::Traits::LocalIdSet::IdType >::other > >::adaptCodim(), Dune::PersistentContainerMap< HostGrid, HostGrid::Traits::LocalIdSet, std::map< const HostGrid::Traits::LocalIdSet::IdType, Data, std::less< const HostGrid::Traits::LocalIdSet::IdType >, Allocator::template rebind< HostGrid::Traits::LocalIdSet::IdType >::other > >::begin(), Dune::PersistentContainerMap< HostGrid, HostGrid::Traits::LocalIdSet, std::map< const HostGrid::Traits::LocalIdSet::IdType, Data, std::less< const HostGrid::Traits::LocalIdSet::IdType >, Allocator::template rebind< HostGrid::Traits::LocalIdSet::IdType >::other > >::clear(), Dune::PersistentContainerMap< HostGrid, HostGrid::Traits::LocalIdSet, std::map< const HostGrid::Traits::LocalIdSet::IdType, Data, std::less< const HostGrid::Traits::LocalIdSet::IdType >, Allocator::template rebind< HostGrid::Traits::LocalIdSet::IdType >::other > >::end(), Dune::PersistentContainerMap< HostGrid, HostGrid::Traits::LocalIdSet, std::map< const HostGrid::Traits::LocalIdSet::IdType, Data, std::less< const HostGrid::Traits::LocalIdSet::IdType >, Allocator::template rebind< HostGrid::Traits::LocalIdSet::IdType >::other > >::operator()(), Dune::PersistentContainerMap< HostGrid, HostGrid::Traits::LocalIdSet, std::map< const HostGrid::Traits::LocalIdSet::IdType, Data, std::less< const HostGrid::Traits::LocalIdSet::IdType >, Allocator::template rebind< HostGrid::Traits::LocalIdSet::IdType >::other > >::operator[](), and Dune::PersistentContainerMap< HostGrid, HostGrid::Traits::LocalIdSet, std::map< const HostGrid::Traits::LocalIdSet::IdType, Data, std::less< const HostGrid::Traits::LocalIdSet::IdType >, Allocator::template rebind< HostGrid::Traits::LocalIdSet::IdType >::other > >::size().

template<class Grid, class Id, class Map>
const GridType& Dune::PersistentContainerMap< Grid, Id, Map >::grid_
protected
template<class Grid, class Id, class Map>
const Id& Dune::PersistentContainerMap< Grid, Id, Map >::id_
protected

The documentation for this class was generated from the following file: