dune-grid  2.6-git
Public Types | Public Member Functions | List of all members
Dune::IdentityGrid< HostGrid > Class Template Reference

Provides a meta grid that is identical to its host. More...

#include <dune/grid/identitygrid.hh>

Public Types

typedef HostGrid HostGridType
 
typedef IdentityGridFamily< HostGrid::dimension, HostGrid > GridFamily
 type of the used GridFamily for this grid More...
 
typedef IdentityGridFamily< HostGrid::dimension, HostGrid >::Traits Traits
 the Traits More...
 
typedef HostGrid::ctype ctype
 The type used to store coordinates, inherited from the HostGrid. More...
 

Public Member Functions

 IdentityGrid (HostGrid &hostgrid)
 Constructor. More...
 
 ~IdentityGrid ()
 Desctructor. More...
 
int maxLevel () const
 Return maximum level defined in this grid. More...
 
template<int codim>
Traits::template Codim< codim >::LevelIterator lbegin (int level) const
 Iterator to first entity of given codim on level. More...
 
template<int codim>
Traits::template Codim< codim >::LevelIterator lend (int level) const
 one past the end on this level More...
 
template<int codim, PartitionIteratorType PiType>
Traits::template Codim< codim >::template Partition< PiType >::LevelIterator lbegin (int level) const
 Iterator to first entity of given codim on level. More...
 
template<int codim, PartitionIteratorType PiType>
Traits::template Codim< codim >::template Partition< PiType >::LevelIterator lend (int level) const
 one past the end on this level More...
 
template<int codim>
Traits::template Codim< codim >::LeafIterator leafbegin () const
 Iterator to first leaf entity of given codim. More...
 
template<int codim>
Traits::template Codim< codim >::LeafIterator leafend () const
 one past the end of the sequence of leaf entities More...
 
template<int codim, PartitionIteratorType PiType>
Traits::template Codim< codim >::template Partition< PiType >::LeafIterator leafbegin () const
 Iterator to first leaf entity of given codim. More...
 
template<int codim, PartitionIteratorType PiType>
Traits::template Codim< codim >::template Partition< PiType >::LeafIterator leafend () const
 one past the end of the sequence of leaf entities More...
 
int size (int level, int codim) const
 Number of grid entities per level and codim. More...
 
size_t numBoundarySegments () const
 returns the number of boundary segments within the macro grid More...
 
int size (int codim) const
 number of leaf entities per codim in this process More...
 
int size (int level, GeometryType type) const
 number of entities per level, codim and geometry type in this process More...
 
int size (GeometryType type) const
 number of leaf entities per codim and geometry type in this process More...
 
const Traits::GlobalIdSetglobalIdSet () const
 Access to the GlobalIdSet. More...
 
const Traits::LocalIdSetlocalIdSet () const
 Access to the LocalIdSet. More...
 
const Traits::LevelIndexSetlevelIndexSet (int level) const
 Access to the LevelIndexSets. More...
 
const Traits::LeafIndexSetleafIndexSet () const
 Access to the LeafIndexSet. More...
 
template<class EntitySeed >
Traits::template Codim< EntitySeed::codimension >::Entity entity (const EntitySeed &seed) const
 Create Entity from EntitySeed. More...
 

Grid Refinement Methods

HostGrid * hostgrid_
 The host grid which contains the actual grid hierarchy structure. More...
 
void globalRefine (int refCount)
 
bool mark (int refCount, const typename Traits::template Codim< 0 >::Entity &e)
 Mark entity for refinement. More...
 
int getMark (const typename Traits::template Codim< 0 >::Entity &e) const
 Return refinement mark for entity. More...
 
bool preAdapt ()
 returns true, if at least one entity is marked for adaption More...
 
bool adapt ()
 Triggers the grid refinement process. More...
 
void postAdapt ()
 Clean up refinement markers. More...
 
unsigned int overlapSize (int codim) const
 Size of the overlap on the leaf level. More...
 
unsigned int ghostSize (int codim) const
 Size of the ghost cell layer on the leaf level. More...
 
unsigned int overlapSize (int level, int codim) const
 Size of the overlap on a given level. More...
 
unsigned int ghostSize (int level, int codim) const
 Size of the ghost cell layer on a given level. More...
 
const CollectiveCommunication< IdentityGrid > & comm () const
 dummy collective communication More...
 
HostGridTypegetHostGrid () const
 Returns the hostgrid this IdentityGrid lives in. More...
 
template<int codim>
const HostGrid::Traits::template Codim< codim >::EntitygetHostEntity (const typename Traits::template Codim< codim >::Entity &e) const
 Returns the hostgrid entity encapsulated in given IdentityGrid entity. More...
 

Detailed Description

template<class HostGrid>
class Dune::IdentityGrid< HostGrid >

Provides a meta grid that is identical to its host.

Template Parameters
HostGridThe host grid type wrapped by the IdentityGrid

Member Typedef Documentation

◆ ctype

template<class HostGrid >
typedef HostGrid::ctype Dune::IdentityGrid< HostGrid >::ctype

The type used to store coordinates, inherited from the HostGrid.

◆ GridFamily

template<class HostGrid >
typedef IdentityGridFamily<HostGrid::dimension,HostGrid> Dune::IdentityGrid< HostGrid >::GridFamily

type of the used GridFamily for this grid

◆ HostGridType

template<class HostGrid >
typedef HostGrid Dune::IdentityGrid< HostGrid >::HostGridType
Todo:
Should not be public

◆ Traits

template<class HostGrid >
typedef IdentityGridFamily<HostGrid::dimension,HostGrid>::Traits Dune::IdentityGrid< HostGrid >::Traits

the Traits

Constructor & Destructor Documentation

◆ IdentityGrid()

template<class HostGrid >
Dune::IdentityGrid< HostGrid >::IdentityGrid ( HostGrid &  hostgrid)
inlineexplicit

Constructor.

Parameters
hostgridThe host grid wrapped by the IdentityGrid

◆ ~IdentityGrid()

template<class HostGrid >
Dune::IdentityGrid< HostGrid >::~IdentityGrid ( )
inline

Desctructor.

Member Function Documentation

◆ adapt()

template<class HostGrid >
bool Dune::IdentityGrid< HostGrid >::adapt ( )
inline

Triggers the grid refinement process.

◆ comm()

template<class HostGrid >
const CollectiveCommunication<IdentityGrid>& Dune::IdentityGrid< HostGrid >::comm ( ) const
inline

dummy collective communication

◆ entity()

template<class HostGrid >
template<class EntitySeed >
Traits::template Codim<EntitySeed::codimension>::Entity Dune::IdentityGrid< HostGrid >::entity ( const EntitySeed seed) const
inline

Create Entity from EntitySeed.

◆ getHostEntity()

template<class HostGrid >
template<int codim>
const HostGrid::Traits::template Codim<codim>::Entity& Dune::IdentityGrid< HostGrid >::getHostEntity ( const typename Traits::template Codim< codim >::Entity e) const
inline

Returns the hostgrid entity encapsulated in given IdentityGrid entity.

◆ getHostGrid()

template<class HostGrid >
HostGridType& Dune::IdentityGrid< HostGrid >::getHostGrid ( ) const
inline

Returns the hostgrid this IdentityGrid lives in.

◆ getMark()

template<class HostGrid >
int Dune::IdentityGrid< HostGrid >::getMark ( const typename Traits::template Codim< 0 >::Entity e) const
inline

Return refinement mark for entity.

Returns
refinement mark (1,0,-1)

◆ ghostSize() [1/2]

template<class HostGrid >
unsigned int Dune::IdentityGrid< HostGrid >::ghostSize ( int  codim) const
inline

Size of the ghost cell layer on the leaf level.

◆ ghostSize() [2/2]

template<class HostGrid >
unsigned int Dune::IdentityGrid< HostGrid >::ghostSize ( int  level,
int  codim 
) const
inline

Size of the ghost cell layer on a given level.

◆ globalIdSet()

template<class HostGrid >
const Traits::GlobalIdSet& Dune::IdentityGrid< HostGrid >::globalIdSet ( ) const
inline

Access to the GlobalIdSet.

◆ globalRefine()

template<class HostGrid >
void Dune::IdentityGrid< HostGrid >::globalRefine ( int  refCount)
inline

global refinement

Todo:
optimize implementation

◆ lbegin() [1/2]

template<class HostGrid >
template<int codim>
Traits::template Codim<codim>::LevelIterator Dune::IdentityGrid< HostGrid >::lbegin ( int  level) const
inline

Iterator to first entity of given codim on level.

◆ lbegin() [2/2]

template<class HostGrid >
template<int codim, PartitionIteratorType PiType>
Traits::template Codim<codim>::template Partition<PiType>::LevelIterator Dune::IdentityGrid< HostGrid >::lbegin ( int  level) const
inline

Iterator to first entity of given codim on level.

◆ leafbegin() [1/2]

template<class HostGrid >
template<int codim>
Traits::template Codim<codim>::LeafIterator Dune::IdentityGrid< HostGrid >::leafbegin ( ) const
inline

Iterator to first leaf entity of given codim.

◆ leafbegin() [2/2]

template<class HostGrid >
template<int codim, PartitionIteratorType PiType>
Traits::template Codim<codim>::template Partition<PiType>::LeafIterator Dune::IdentityGrid< HostGrid >::leafbegin ( ) const
inline

Iterator to first leaf entity of given codim.

◆ leafend() [1/2]

template<class HostGrid >
template<int codim>
Traits::template Codim<codim>::LeafIterator Dune::IdentityGrid< HostGrid >::leafend ( ) const
inline

one past the end of the sequence of leaf entities

◆ leafend() [2/2]

template<class HostGrid >
template<int codim, PartitionIteratorType PiType>
Traits::template Codim<codim>::template Partition<PiType>::LeafIterator Dune::IdentityGrid< HostGrid >::leafend ( ) const
inline

one past the end of the sequence of leaf entities

◆ leafIndexSet()

template<class HostGrid >
const Traits::LeafIndexSet& Dune::IdentityGrid< HostGrid >::leafIndexSet ( ) const
inline

Access to the LeafIndexSet.

◆ lend() [1/2]

template<class HostGrid >
template<int codim>
Traits::template Codim<codim>::LevelIterator Dune::IdentityGrid< HostGrid >::lend ( int  level) const
inline

one past the end on this level

◆ lend() [2/2]

template<class HostGrid >
template<int codim, PartitionIteratorType PiType>
Traits::template Codim<codim>::template Partition<PiType>::LevelIterator Dune::IdentityGrid< HostGrid >::lend ( int  level) const
inline

one past the end on this level

◆ levelIndexSet()

template<class HostGrid >
const Traits::LevelIndexSet& Dune::IdentityGrid< HostGrid >::levelIndexSet ( int  level) const
inline

Access to the LevelIndexSets.

◆ localIdSet()

template<class HostGrid >
const Traits::LocalIdSet& Dune::IdentityGrid< HostGrid >::localIdSet ( ) const
inline

Access to the LocalIdSet.

◆ mark()

template<class HostGrid >
bool Dune::IdentityGrid< HostGrid >::mark ( int  refCount,
const typename Traits::template Codim< 0 >::Entity e 
)
inline

Mark entity for refinement.

This only works for entities of codim 0. The parameter is currently ignored

Returns
  • true, if marking was succesfull
  • false, if marking was not possible

◆ maxLevel()

template<class HostGrid >
int Dune::IdentityGrid< HostGrid >::maxLevel ( ) const
inline

Return maximum level defined in this grid.

Levels are numbered 0 ... maxlevel with 0 the coarsest level.

◆ numBoundarySegments()

template<class HostGrid >
size_t Dune::IdentityGrid< HostGrid >::numBoundarySegments ( ) const
inline

returns the number of boundary segments within the macro grid

◆ overlapSize() [1/2]

template<class HostGrid >
unsigned int Dune::IdentityGrid< HostGrid >::overlapSize ( int  codim) const
inline

Size of the overlap on the leaf level.

◆ overlapSize() [2/2]

template<class HostGrid >
unsigned int Dune::IdentityGrid< HostGrid >::overlapSize ( int  level,
int  codim 
) const
inline

Size of the overlap on a given level.

◆ postAdapt()

template<class HostGrid >
void Dune::IdentityGrid< HostGrid >::postAdapt ( )
inline

Clean up refinement markers.

◆ preAdapt()

template<class HostGrid >
bool Dune::IdentityGrid< HostGrid >::preAdapt ( )
inline

returns true, if at least one entity is marked for adaption

◆ size() [1/4]

template<class HostGrid >
int Dune::IdentityGrid< HostGrid >::size ( GeometryType  type) const
inline

number of leaf entities per codim and geometry type in this process

◆ size() [2/4]

template<class HostGrid >
int Dune::IdentityGrid< HostGrid >::size ( int  codim) const
inline

number of leaf entities per codim in this process

◆ size() [3/4]

template<class HostGrid >
int Dune::IdentityGrid< HostGrid >::size ( int  level,
GeometryType  type 
) const
inline

number of entities per level, codim and geometry type in this process

◆ size() [4/4]

template<class HostGrid >
int Dune::IdentityGrid< HostGrid >::size ( int  level,
int  codim 
) const
inline

Number of grid entities per level and codim.

Member Data Documentation

◆ hostgrid_

template<class HostGrid >
HostGrid* Dune::IdentityGrid< HostGrid >::hostgrid_
protected

The host grid which contains the actual grid hierarchy structure.


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