dune-spgrid 2.7
Public Types | Public Member Functions | Static Public Attributes | List of all members
Dune::SPEntitySeed< codim, Grd > Struct Template Reference

entity seed for SPGrid More...

#include <dune/grid/spgrid/entityseed.hh>

Public Types

typedef std::remove_const< Grd >::type Grid
 type of grid this entity seed belongs to More...
 
typedef Grid::Traits::ReferenceCube ReferenceCube
 
typedef Grid::Traits::template Codim< codimension >::Entity Entity
 type of the seeded entity More...
 
typedef ReferenceCube::MultiIndex MultiIndex
 

Public Member Functions

 SPEntitySeed ()
 default constructor More...
 
 SPEntitySeed (const int level, const MultiIndex &id, const unsigned int partitionNumber)
 
bool isValid () const
 check whether this seed generates a valid entity More...
 
int level () const
 
MultiIndex id () const
 
unsigned int partitionNumber () const
 

Static Public Attributes

static const int dimension = ReferenceCube::dimension
 dimension of the grid More...
 
static const int codimension = codim
 codimension of the seeded entity More...
 
static const int mydimension = dimension - codimension
 dimension of the seeded entity More...
 
static const int dimensionworld = dimension
 world dimension of the grid More...
 

Detailed Description

template<int codim, class Grd>
struct Dune::SPEntitySeed< codim, Grd >

entity seed for SPGrid

The entity seed contains the minimal information required to rebuild the entity, if the grid is still known. It should be preferred over the entity pointer when storing entities.

Note
While rebuilding an entity pointer from an entity seed is assumed to be cheap, it introduces non-negligible overhead. If a large quantity of the grid is to be stored and the order is of no import, filtering an iterator might be a better option.
Template Parameters
codimcodimension of the seeded entity
GrdGrid (must be a SPGrid)

Member Typedef Documentation

◆ Entity

template<int codim, class Grd >
typedef Grid::Traits::template Codim<codimension>::Entity Dune::SPEntitySeed< codim, Grd >::Entity

type of the seeded entity

◆ Grid

template<int codim, class Grd >
typedef std::remove_const<Grd>::type Dune::SPEntitySeed< codim, Grd >::Grid

type of grid this entity seed belongs to

◆ MultiIndex

template<int codim, class Grd >
typedef ReferenceCube::MultiIndex Dune::SPEntitySeed< codim, Grd >::MultiIndex

◆ ReferenceCube

template<int codim, class Grd >
typedef Grid::Traits::ReferenceCube Dune::SPEntitySeed< codim, Grd >::ReferenceCube

Constructor & Destructor Documentation

◆ SPEntitySeed() [1/2]

template<int codim, class Grd >
Dune::SPEntitySeed< codim, Grd >::SPEntitySeed ( )
inline

default constructor

Note
A default constructed entity seed is invalid.

◆ SPEntitySeed() [2/2]

template<int codim, class Grd >
Dune::SPEntitySeed< codim, Grd >::SPEntitySeed ( const int  level,
const MultiIndex id,
const unsigned int  partitionNumber 
)
inline

Member Function Documentation

◆ id()

template<int codim, class Grd >
MultiIndex Dune::SPEntitySeed< codim, Grd >::id ( ) const
inline

◆ isValid()

template<int codim, class Grd >
bool Dune::SPEntitySeed< codim, Grd >::isValid ( ) const
inline

check whether this seed generates a valid entity

◆ level()

template<int codim, class Grd >
int Dune::SPEntitySeed< codim, Grd >::level ( ) const
inline

◆ partitionNumber()

template<int codim, class Grd >
unsigned int Dune::SPEntitySeed< codim, Grd >::partitionNumber ( ) const
inline

Member Data Documentation

◆ codimension

template<int codim, class Grd >
const int Dune::SPEntitySeed< codim, Grd >::codimension = codim
static

codimension of the seeded entity

◆ dimension

template<int codim, class Grd >
const int Dune::SPEntitySeed< codim, Grd >::dimension = ReferenceCube::dimension
static

dimension of the grid

◆ dimensionworld

template<int codim, class Grd >
const int Dune::SPEntitySeed< codim, Grd >::dimensionworld = dimension
static

world dimension of the grid

◆ mydimension

template<int codim, class Grd >
const int Dune::SPEntitySeed< codim, Grd >::mydimension = dimension - codimension
static

dimension of the seeded entity


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