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>

Inheritance diagram for Dune::PersistentContainerMap< Grid, Id, Map >:
Inheritance graph

List of all members.

Classes

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

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
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 MyIterator< iterator > Dune::PersistentContainerMap< Grid, Id, Map >::Iterator
template<class Grid, class Id, class Map>
typedef Map :: iterator Dune::PersistentContainerMap< Grid, Id, Map >::iterator [protected]

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  )  [inline, protected]
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

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]

adjust container to correct size and set all values to default

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>
Iterator Dune::PersistentContainerMap< Grid, Id, Map >::end (  )  [inline]

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 >
const Data& Dune::PersistentContainerMap< Grid, Id, Map >::operator[] ( const Entity entity  )  const [inline]

random access entity with correct codimension

Reimplemented in Dune::PersistentContainer< GeometryGrid< HostGrid, CoordFunction, Allocator >, Data, Allocator >.

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

Reimplemented in Dune::PersistentContainer< GeometryGrid< HostGrid, CoordFunction, Allocator >, Data, Allocator >.

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

template<class Grid, class Id, class Map>
size_t Dune::PersistentContainerMap< Grid, Id, Map >::size (  )  const [inline]

return size of allocated data

template<class Grid, class Id, class Map>
void Dune::PersistentContainerMap< Grid, Id, Map >::update ( const Data value  )  [inline, protected]

adjust container to correct size including compress


Member Data Documentation

template<class Grid, class Id, class Map>
Map Dune::PersistentContainerMap< Grid, Id, Map >::data_ [mutable, protected]

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


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

Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].