Dune::SGrid< dim, dimworld, _ctype > Class Template Reference
[Grid Implementations]

[ provides Dune::Grid ] More...

#include <dune/grid/sgrid.hh>

Inheritance diagram for Dune::SGrid< dim, dimworld, _ctype >:
Inheritance graph

List of all members.

Public Types

enum  { MAXL = 32 }
 

maximum number of levels allowed

More...
typedef SGridFamily< dim,
dimworld, _ctype > 
GridFamily
typedef bigunsignedint< dim
*sgrid_dim_bits+sgrid_level_bits+sgrid_codim_bits
PersistentIndexType
typedef SGridLevelIndexSet
< SGrid< dim, dimworld > > 
LevelIndexSetType
typedef SGridLeafIndexSet
< SGrid< dim, dimworld > > 
LeafIndexSetType
typedef SGridGlobalIdSet
< SGrid< dim, dimworld > > 
GlobalIdSetType
typedef SGridFamily< dim,
dimworld, _ctype >::Traits 
Traits
 The traits of this class.
typedef _ctype ctype
 define type used for coordinates in grid module
Exported constants

enum  { dimension = dim }
 

A constant that exports the template parameter dim.

More...
enum  { dimensionworld = dimworld }
 

A constant that exports the template parameter dimworld.

More...
Exported types

typedef Partition
< All_Partition >
::LevelGridView 
LevelGridView
 View types for All_Partition.
typedef Partition
< All_Partition >
::LeafGridView 
LeafGridView
typedef
GridFamily::Traits::LeafIntersection 
LeafIntersection
 A type that is a model of Dune::LeafIntersection, an intersections of two codimension 1 of two codimension 0 entities in the leaf view.
typedef
GridFamily::Traits::LevelIntersection 
LevelIntersection
 A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimension 0 entities in a level view.
typedef
GridFamily::Traits::LeafIntersectionIterator 
LeafIntersectionIterator
 A type that is a model of Dune::IntersectionIterator which is an iterator that allows to examine, but not to modify, the intersections of codimension 1 of an leaf element (entity of codimension 0) with other leaf elements.
typedef
GridFamily::Traits::LevelIntersectionIterator 
LevelIntersectionIterator
 A type that is a model of Dune::IntersectionIterator which is an iterator that allows to examine, but not to modify, the intersections of codimension 1 of an element (entity of codimension 0) with other elements on the same level.
typedef
GridFamily::Traits::HierarchicIterator 
HierarchicIterator
 A type that is a model of Dune::HierarchicIterator A type of iterator that allows to examine, but not to modify, entities of codimension 0 that result from refinement of an entity of codimension 0.
typedef
GridFamily::Traits::LevelIndexSet 
LevelIndexSet
 A type that is a model of Dune::IndexSet which provides a consecutive, but non persistent, numbering for entities on a grid level.
typedef
GridFamily::Traits::LeafIndexSet 
LeafIndexSet
 A type that is a model of Dune::IndexSet which provides a consecutive, but non persistent, numbering for entities in the leaf grid.
typedef
GridFamily::Traits::GlobalIdSet 
GlobalIdSet
 A type that is a model of Dune::IdSet which provides a unique and persistent numbering for all entities in the grid. The numbering is unique over all processes over which the grid is partitioned. The numbering is not necessarily consecutive.
typedef
GridFamily::Traits::LocalIdSet 
LocalIdSet
 A type that is a model of Dune::IdSet which provides a unique and persistent numbering for all entities in the grid. The numbering is only unique in a single process and it is not necessarily consecutive.
typedef
GridFamily::Traits::CollectiveCommunication 
CollectiveCommunication
 A type that is a model of Dune::CollectiveCommunication. It provides a portable way for collective communication on the set of processes used by the grid.

Public Member Functions

 SGrid (const int *const N_, const ctype *const H_)
 Make an SGrid from extend and number of cells per direction.
 SGrid (const int *const N_, const ctype *const L_, const ctype *const H_)
 Make an SGrid from position, extend and number of cells per direction.
 SGrid (FieldVector< int, dim > N_, FieldVector< ctype, dim > L_, FieldVector< ctype, dim > H_)
 Make an SGrid from position, extend and number of cells per direction.
 SGrid ()
 empty constructor making grid of unit square discretized with one cell
 ~SGrid ()
 SGrid destructor.
int maxLevel () const
template<int cd, PartitionIteratorType pitype>
Traits::template Codim< cd >
::template Partition< pitype >
::LevelIterator 
lbegin (int level) const
 Iterator to first entity of given codim on level.
template<int cd, PartitionIteratorType pitype>
Traits::template Codim< cd >
::template Partition< pitype >
::LevelIterator 
lend (int level) const
 one past the end on this level
template<int cd>
Traits::template Codim< cd >
::template Partition
< All_Partition >
::LevelIterator 
lbegin (int level) const
 Iterator to first entity of given codim on level.
template<int cd>
Traits::template Codim< cd >
::template Partition
< All_Partition >
::LevelIterator 
lend (int level) const
 one past the end on this level
template<int cd, PartitionIteratorType pitype>
Traits::template Codim< cd >
::template Partition< pitype >
::LeafIterator 
leafbegin () const
 return LeafIterator which points to the first entity
template<int cd, PartitionIteratorType pitype>
Traits::template Codim< cd >
::template Partition< pitype >
::LeafIterator 
leafend () const
 one past the end on the leaf level
template<int cd>
Traits::template Codim< cd >
::template Partition
< All_Partition >
::LeafIterator 
leafbegin () const
 return LeafIterator which points to the first entity
template<int cd>
Traits::template Codim< cd >
::template Partition
< All_Partition >
::LeafIterator 
leafend () const
 return LeafIterator which points behind the last entity
template<class T , template< class > class P, int codim>
void communicate (T &t, InterfaceType iftype, CommunicationDirection dir, int level)
int size (int level, int codim) const
 number of grid entities per level and codim
int size (int codim) const
 number of leaf entities per codim in this process
int size (int level, GeometryType type) const
 number of entities per level and geometry type in this process
int size (GeometryType type) const
 number of leaf entities per codim and geometry type in this process
size_t numBoundarySegments () const
 returns the number of boundary segments within the macro grid
int global_size (int codim) const
 number of grid entities of all level for given codim
int overlapSize (int level, int codim)
 return size (= distance in graph) of overlap region
int ghostSize (int level, int codim)
 return size (= distance in graph) of ghost region
void globalRefine (int refCount)
 Refine mesh globally by one refCount levels.
const array< int, dim > & dims (int level) const
 Get number of elements in each coordinate direction.
const FieldVector< ctype,
dimworld > & 
lowerLeft () const
 Get lower left corner.
FieldVector< ctype, dimworld > upperRight () const
 Get upper right corner.
bool adapt ()
 map adapt to global refine
const Traits::GlobalIdSetglobalIdSet () const
 return const reference to the grids global id set
const Traits::LocalIdSetlocalIdSet () const
 return const reference to the grids local id set
const Traits::LevelIndexSetlevelIndexSet (int level) const
 return const reference to the grids level index set for level level
const Traits::LeafIndexSetleafIndexSet () const
 return const reference to the grids leaf index set
Traits::template Partition
< pitype >::LevelGridView 
levelView (int level) const
 View for a grid level.
Traits::template Partition
< All_Partition >
::LevelGridView 
levelView (int level) const
 View for a grid level for All_Partition.
Traits::template Partition
< pitype >::LeafGridView 
leafView () const
 View for the leaf grid.
Traits::template Partition
< All_Partition >
::LeafGridView 
leafView () const
 View for the leaf grid for All_Partition.
bool mark (int refCount, const typename Traits::template Codim< 0 >::Entity &e)
 Marks an entity to be refined/coarsened in a subsequent adapt.
int getMark (const typename Traits::template Codim< 0 >::Entity &e) const
 returns adaptation mark for given entity, i.e. here the default implementation returns 0.
bool preAdapt ()
 returns true, if at least one entity is marked for adaption
void postAdapt ()
 clean up some markers
void communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir, int level) const
void communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir) const
bool loadBalance ()
 default implementation of load balance does nothing and returns false
bool loadBalance (DataHandle &data)
 default implementation of load balance does nothing and returns false
Traits::template Codim
< EntitySeed::codimension >
::EntityPointer 
entityPointer (const EntitySeed &seed) const
Adaptivity and grid refinement

bool mark (int refCount, const typename Codim< 0 >::Entity &e)
 Marks an entity to be refined/coarsened in a subsequent adapt.
int getMark (const typename Codim< 0 >::Entity &e) const
 returns adaptation mark for given entity

Protected Member Functions

GridImp & asImp ()
 Barton-Nackman trick.
const GridImp & asImp () const
 Barton-Nackman trick.

Static Protected Member Functions

static
ReturnImplementationType
< InterfaceType >
::ImplementationType & 
getRealImplementation (InterfaceType &i)
 return real implementation of interface class

dummy parallel functions



class Dune::SGridLevelIndexSet< Dune::SGrid< dim, dimworld > >
class Dune::SGridLeafIndexSet< Dune::SGrid< dim, dimworld > >
class Dune::SGridGlobalIdSet< Dune::SGrid< dim, dimworld > >
class Dune::SIntersectionIterator< Dune::SGrid< dim, dimworld > >
class Dune::SHierarchicIterator< Dune::SGrid< dim, dimworld > >
class Dune::SEntity< 0, dim, Dune::SGrid< dim, dimworld > >
class Dune::SGridLevelIndexSet< const Dune::SGrid< dim, dimworld > >
class Dune::SGridLeafIndexSet< const Dune::SGrid< dim, dimworld > >
class Dune::SGridGlobalIdSet< const Dune::SGrid< dim, dimworld > >
class Dune::SIntersectionIterator< const Dune::SGrid< dim, dimworld > >
class Dune::SHierarchicIterator< const Dune::SGrid< dim, dimworld > >
class Dune::SEntity< 0, dim, const Dune::SGrid< dim, dimworld > >
class Dune::SEntityBase
class Dune::SEntityPointer
class Entity
template<class DataHandle >
void communicate (DataHandle &data, InterfaceType iftype, CommunicationDirection dir, int level) const
template<class DataHandle >
void communicate (DataHandle &data, InterfaceType iftype, CommunicationDirection dir) const
const CollectiveCommunication
< SGrid > & 
comm () const
 return const reference to a collective communication object. The return type is a model of Dune::CollectiveCommunication.
int overlapSize (int level, int codim) const
 return size (= distance in graph) of overlap region
int overlapSize (int codim) const
 return size (= distance in graph) of overlap region
int ghostSize (int level, int codim) const
 return size (= distance in graph) of ghost region
int ghostSize (int codim) const
 return size (= distance in graph) of ghost region

Detailed Description

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
class Dune::SGrid< dim, dimworld, _ctype >

[ provides Dune::Grid ]

A structured mesh in d dimensions consisting of "cubes" (pilot implementation of the Dune grid interface, for debugging only).

This module describes the pilot implementation of the Dune grid interface. It implements the grid interface for simple structured meshes.

Warning:
SGrid is slow. It is intended for debugging only.

The following class diagram shows how the classes are related with each other:

sgridclasses.png

Class diagram for classes in the grid interface

Short description of the classes:

  • SGeometry is a class template providing the geometric part of a grid entity, i.e. a general polyhedron with a mapping from a reference polyhedron to the actual polyhedron.
  • SLevelIterator is a class template which allows to iterate over all grid entities of a given codimension and level.
  • SEntity::IntersectionIterator provides access to all entities of codimension 0 sharing an object of codimension 1 with the given entity of codimension 0. This interface covers nonmatching grids.
  • SEntity::HierarchicIterator provides access to the sons of an entity of codimension 0.
  • SGrid is conceptualized as a container of grid entities of various codimensions. Since grids are used as template parameters to generic algorithms they must include the nested classes LevelIterator and Entity which are derived from SLevelIterator and SEntity.

A Grid is a container of grid entities. Given a dimension dim these entities have a codimension codim with 0 <= codim <= dim.

The Grid is assumed to be hierachically refined and nested. It enables iteration over entities of a given level and codimension.

All information is provided to allocate degrees of freedom in appropriate vector data structures.

Note:
When SGrid is instantiated with dimworld strictly greater than dim, the result is a dim-dimensional structured grid which is embedded in the first dim components of dimworld-dimensional Euclidean space.

Member Typedef Documentation

template<int dim, int dimworld, class ct, class GridFamily>
typedef GridFamily::Traits::CollectiveCommunication Dune::Grid< dim, dimworld, ct, GridFamily >::CollectiveCommunication [inherited]

A type that is a model of Dune::CollectiveCommunication. It provides a portable way for collective communication on the set of processes used by the grid.

Reimplemented in Dune::AlbertaGrid< dim, dimworld >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
typedef _ctype Dune::SGrid< dim, dimworld, _ctype >::ctype

define type used for coordinates in grid module

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, class ct, class GridFamily>
typedef GridFamily::Traits::GlobalIdSet Dune::Grid< dim, dimworld, ct, GridFamily >::GlobalIdSet [inherited]

A type that is a model of Dune::IdSet which provides a unique and persistent numbering for all entities in the grid. The numbering is unique over all processes over which the grid is partitioned. The numbering is not necessarily consecutive.

Reimplemented in Dune::AlbertaGrid< dim, dimworld >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
typedef SGridGlobalIdSet<SGrid<dim,dimworld> > Dune::SGrid< dim, dimworld, _ctype >::GlobalIdSetType
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
typedef SGridFamily<dim,dimworld,_ctype> Dune::SGrid< dim, dimworld, _ctype >::GridFamily
template<int dim, int dimworld, class ct, class GridFamily>
typedef GridFamily::Traits::HierarchicIterator Dune::Grid< dim, dimworld, ct, GridFamily >::HierarchicIterator [inherited]

A type that is a model of Dune::HierarchicIterator A type of iterator that allows to examine, but not to modify, entities of codimension 0 that result from refinement of an entity of codimension 0.

template<int dim, int dimworld, class ct, class GridFamily>
typedef Partition< All_Partition >:: LeafGridView Dune::Grid< dim, dimworld, ct, GridFamily >::LeafGridView [inherited]
template<int dim, int dimworld, class ct, class GridFamily>
typedef GridFamily::Traits::LeafIndexSet Dune::Grid< dim, dimworld, ct, GridFamily >::LeafIndexSet [inherited]

A type that is a model of Dune::IndexSet which provides a consecutive, but non persistent, numbering for entities in the leaf grid.

Reimplemented in Dune::AlbertaGrid< dim, dimworld >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
typedef SGridLeafIndexSet<SGrid<dim,dimworld> > Dune::SGrid< dim, dimworld, _ctype >::LeafIndexSetType
template<int dim, int dimworld, class ct, class GridFamily>
typedef GridFamily::Traits::LeafIntersection Dune::Grid< dim, dimworld, ct, GridFamily >::LeafIntersection [inherited]

A type that is a model of Dune::LeafIntersection, an intersections of two codimension 1 of two codimension 0 entities in the leaf view.

template<int dim, int dimworld, class ct, class GridFamily>
typedef GridFamily::Traits::LeafIntersectionIterator Dune::Grid< dim, dimworld, ct, GridFamily >::LeafIntersectionIterator [inherited]

A type that is a model of Dune::IntersectionIterator which is an iterator that allows to examine, but not to modify, the intersections of codimension 1 of an leaf element (entity of codimension 0) with other leaf elements.

template<int dim, int dimworld, class ct, class GridFamily>
typedef Partition< All_Partition >:: LevelGridView Dune::Grid< dim, dimworld, ct, GridFamily >::LevelGridView [inherited]

View types for All_Partition.

template<int dim, int dimworld, class ct, class GridFamily>
typedef GridFamily::Traits::LevelIndexSet Dune::Grid< dim, dimworld, ct, GridFamily >::LevelIndexSet [inherited]

A type that is a model of Dune::IndexSet which provides a consecutive, but non persistent, numbering for entities on a grid level.

Reimplemented in Dune::AlbertaGrid< dim, dimworld >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
typedef SGridLevelIndexSet<SGrid<dim,dimworld> > Dune::SGrid< dim, dimworld, _ctype >::LevelIndexSetType
template<int dim, int dimworld, class ct, class GridFamily>
typedef GridFamily::Traits::LevelIntersection Dune::Grid< dim, dimworld, ct, GridFamily >::LevelIntersection [inherited]

A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimension 0 entities in a level view.

template<int dim, int dimworld, class ct, class GridFamily>
typedef GridFamily::Traits::LevelIntersectionIterator Dune::Grid< dim, dimworld, ct, GridFamily >::LevelIntersectionIterator [inherited]

A type that is a model of Dune::IntersectionIterator which is an iterator that allows to examine, but not to modify, the intersections of codimension 1 of an element (entity of codimension 0) with other elements on the same level.

template<int dim, int dimworld, class ct, class GridFamily>
typedef GridFamily::Traits::LocalIdSet Dune::Grid< dim, dimworld, ct, GridFamily >::LocalIdSet [inherited]

A type that is a model of Dune::IdSet which provides a unique and persistent numbering for all entities in the grid. The numbering is only unique in a single process and it is not necessarily consecutive.

Reimplemented in Dune::AlbertaGrid< dim, dimworld >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
typedef bigunsignedint<dim*sgrid_dim_bits+sgrid_level_bits+sgrid_codim_bits> Dune::SGrid< dim, dimworld, _ctype >::PersistentIndexType
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
typedef SGridFamily<dim,dimworld,_ctype>::Traits Dune::SGrid< dim, dimworld, _ctype >::Traits

The traits of this class.

Presents the typedefs as described in GridTraits.

Reimplemented from Dune::GridDefaultImplementation< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >.


Member Enumeration Documentation

template<int dim, int dimworld, class ct, class GridFamily>
anonymous enum [inherited]

A constant that exports the template parameter dim.

Enumerator:
dimension 

The dimension of the grid.

template<int dim, int dimworld, class ct, class GridFamily>
anonymous enum [inherited]

A constant that exports the template parameter dimworld.

Enumerator:
dimensionworld 

The dimension of the world the grid lives in.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
anonymous enum

maximum number of levels allowed

Enumerator:
MAXL 

Constructor & Destructor Documentation

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
Dune::SGrid< dim, dimworld, _ctype >::SGrid ( const int *const   N_,
const ctype *const   H_ 
)

Make an SGrid from extend and number of cells per direction.

Parameters:
[in] N_ number of cells in each direction on coarsest level
[in] H_ extend of the unit cube in each dimension

Note: The origin of the cube is always at (0,0,...,0), only the extend is given.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
Dune::SGrid< dim, dimworld, _ctype >::SGrid ( const int *const   N_,
const ctype *const   L_,
const ctype *const   H_ 
)

Make an SGrid from position, extend and number of cells per direction.

Parameters:
[in] N_ number of cells in each direction on coarsest level
[in] L_ position of origin of the cube
[in] H_ position of the upper right corner of the cube
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
Dune::SGrid< dim, dimworld, _ctype >::SGrid ( FieldVector< int, dim >  N_,
FieldVector< ctype, dim >  L_,
FieldVector< ctype, dim >  H_ 
)

Make an SGrid from position, extend and number of cells per direction.

Parameters:
[in] N_ number of cells in each direction on coarsest level
[in] L_ position of origin of the cube
[in] H_ position of the upper right corner of the cube

Note: This constructor uses FieldVectors instead of built-in arrays. This is compatible with the YaspGrid class.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
Dune::SGrid< dim, dimworld, _ctype >::SGrid (  ) 

empty constructor making grid of unit square discretized with one cell

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
Dune::SGrid< dim, dimworld, _ctype >::~SGrid (  ) 

SGrid destructor.


Member Function Documentation

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
bool Dune::SGrid< dim, dimworld, _ctype >::adapt (  )  [inline]
template<int dim, int dimworld, class ct, class GridFamily>
GridImp& Dune::Grid< dim, dimworld, ct, GridFamily >::asImp (  )  [inline, protected, inherited]

Barton-Nackman trick.

Referenced by Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::adapt(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::comm(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::communicate(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::entityPointer(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::getMark(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::ghostSize(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::globalIdSet(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::globalRefine(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::lbegin(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::leafbegin(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::leafend(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::leafIndexSet(), Dune::GridDefaultImplementation< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::leafView(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::leafView(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::lend(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::levelIndexSet(), Dune::GridDefaultImplementation< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::levelView(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::levelView(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::loadBalance(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::localIdSet(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::mark(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::maxLevel(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::numBoundarySegments(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::overlapSize(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::postAdapt(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::preAdapt(), and Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::size().

template<int dim, int dimworld, class ct, class GridFamily>
const GridImp& Dune::Grid< dim, dimworld, ct, GridFamily >::asImp (  )  const [inline, protected, inherited]

Barton-Nackman trick.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
const CollectiveCommunication<SGrid>& Dune::SGrid< dim, dimworld, _ctype >::comm (  )  const [inline]

return const reference to a collective communication object. The return type is a model of Dune::CollectiveCommunication.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
template<class T , template< class > class P, int codim>
void Dune::SGrid< dim, dimworld, _ctype >::communicate ( T &  t,
InterfaceType  iftype,
CommunicationDirection  dir,
int  level 
) [inline]

The communication interface

Template Parameters:
T array class holding data associated with the entities
P type used to gather/scatter data in and out of the message buffer
codim communicate entites of given codim
Parameters:
t array holding data associated with the entities
iftype one of the predifined interface types, throws error if it is not implemented
dir choose beetween forward and backward communication
level communicate for entities on the given level

Implements a generic communication function sending an object of type P for each entity in the intersection of two processors. P has two methods gather and scatter that implement the protocol. Therefore P is called the "protocol class".

void Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::communicate ( CommDataHandleIF< DataHandleImp, DataTypeImp > &  data,
InterfaceType  iftype,
CommunicationDirection  dir,
int  level 
) const [inline, inherited]

dummy communicate, doing nothing

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

void Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::communicate ( CommDataHandleIF< DataHandleImp, DataTypeImp > &  data,
InterfaceType  iftype,
CommunicationDirection  dir 
) const [inline, inherited]

dummy communicate, doing nothing

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
template<class DataHandle >
void Dune::SGrid< dim, dimworld, _ctype >::communicate ( DataHandle &  data,
InterfaceType  iftype,
CommunicationDirection  dir,
int  level 
) const [inline]
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
template<class DataHandle >
void Dune::SGrid< dim, dimworld, _ctype >::communicate ( DataHandle &  data,
InterfaceType  iftype,
CommunicationDirection  dir 
) const [inline]
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
const array<int, dim>& Dune::SGrid< dim, dimworld, _ctype >::dims ( int  level  )  const [inline]

Get number of elements in each coordinate direction.

Traits :: template Codim< EntitySeed :: codimension >:: EntityPointer Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::entityPointer ( const EntitySeed &  seed  )  const [inline, inherited]
Deprecated:
default implementation of generation of EntityPointer from EntitySeed. This has to be implemented by each grid
Deprecated:

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

int Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::getMark ( const typename Traits::template Codim< 0 >::Entity e  )  const [inline, inherited]

returns adaptation mark for given entity, i.e. here the default implementation returns 0.

Parameters:
[in] e Entity for which adaptation mark should be determined
Returns:
int adaptation mark, here the default value 0 is returned
template<int dim, int dimworld, class ct, class GridFamily>
int Dune::Grid< dim, dimworld, ct, GridFamily >::getMark ( const typename Codim< 0 >::Entity e  )  const [inline, inherited]

returns adaptation mark for given entity

Parameters:
[in] e Entity for which adaptation mark should be determined
Returns:
int adaptation mark currently set for given Entity e
static ReturnImplementationType<InterfaceType>::ImplementationType& Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::getRealImplementation ( InterfaceType i  )  [inline, static, protected, inherited]

return real implementation of interface class

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
int Dune::SGrid< dim, dimworld, _ctype >::ghostSize ( int  level,
int  codim 
) const [inline]

return size (= distance in graph) of ghost region

Reimplemented from Dune::GridDefaultImplementation< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
int Dune::SGrid< dim, dimworld, _ctype >::ghostSize ( int  codim  )  const [inline]

return size (= distance in graph) of ghost region

Reimplemented from Dune::GridDefaultImplementation< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
int Dune::SGrid< dim, dimworld, _ctype >::ghostSize ( int  level,
int  codim 
) [inline]

return size (= distance in graph) of ghost region

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
int Dune::SGrid< dim, dimworld, _ctype >::global_size ( int  codim  )  const

number of grid entities of all level for given codim

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
const Traits::GlobalIdSet& Dune::SGrid< dim, dimworld, _ctype >::globalIdSet (  )  const [inline]

return const reference to the grids global id set

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
void Dune::SGrid< dim, dimworld, _ctype >::globalRefine ( int  refCount  ) 

Refine mesh globally by one refCount levels.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

Referenced by Dune::SGrid< dim, dimworld >::adapt().

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
template<int cd, PartitionIteratorType pitype>
Traits::template Codim<cd>::template Partition<pitype>::LevelIterator Dune::SGrid< dim, dimworld, _ctype >::lbegin ( int  level  )  const

Iterator to first entity of given codim on level.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
template<int cd>
Traits::template Codim<cd>::template Partition<All_Partition>::LevelIterator Dune::SGrid< dim, dimworld, _ctype >::lbegin ( int  level  )  const [inline]

Iterator to first entity of given codim on level.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
template<int cd>
Traits::template Codim<cd>::template Partition<All_Partition>::LeafIterator Dune::SGrid< dim, dimworld, _ctype >::leafbegin (  )  const [inline]

return LeafIterator which points to the first entity

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
template<int cd, PartitionIteratorType pitype>
Traits::template Codim<cd>::template Partition<pitype>::LeafIterator Dune::SGrid< dim, dimworld, _ctype >::leafbegin (  )  const

return LeafIterator which points to the first entity

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
template<int cd>
Traits::template Codim<cd>::template Partition<All_Partition>::LeafIterator Dune::SGrid< dim, dimworld, _ctype >::leafend (  )  const [inline]

return LeafIterator which points behind the last entity

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
template<int cd, PartitionIteratorType pitype>
Traits::template Codim<cd>::template Partition<pitype>::LeafIterator Dune::SGrid< dim, dimworld, _ctype >::leafend (  )  const

one past the end on the leaf level

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
const Traits::LeafIndexSet& Dune::SGrid< dim, dimworld, _ctype >::leafIndexSet (  )  const [inline]

return const reference to the grids leaf index set

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

Traits::template Partition<pitype>::LeafGridView Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::leafView (  )  const [inline, inherited]
Traits::template Partition<All_Partition>::LeafGridView Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::leafView (  )  const [inline, inherited]

View for the leaf grid for All_Partition.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp().

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
template<int cd>
Traits::template Codim<cd>::template Partition<All_Partition>::LevelIterator Dune::SGrid< dim, dimworld, _ctype >::lend ( int  level  )  const [inline]

one past the end on this level

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
template<int cd, PartitionIteratorType pitype>
Traits::template Codim<cd>::template Partition<pitype>::LevelIterator Dune::SGrid< dim, dimworld, _ctype >::lend ( int  level  )  const

one past the end on this level

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
const Traits::LevelIndexSet& Dune::SGrid< dim, dimworld, _ctype >::levelIndexSet ( int  level  )  const [inline]

return const reference to the grids level index set for level level

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

Traits::template Partition<pitype>::LevelGridView Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::levelView ( int  level  )  const [inline, inherited]
Traits::template Partition<All_Partition>::LevelGridView Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::levelView ( int  level  )  const [inline, inherited]

View for a grid level for All_Partition.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp().

bool Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::loadBalance (  )  [inline, inherited]

default implementation of load balance does nothing and returns false

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

bool Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::loadBalance ( DataHandle &  data  )  [inline, inherited]

default implementation of load balance does nothing and returns false

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
const Traits::LocalIdSet& Dune::SGrid< dim, dimworld, _ctype >::localIdSet (  )  const [inline]

return const reference to the grids local id set

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
const FieldVector<ctype, dimworld>& Dune::SGrid< dim, dimworld, _ctype >::lowerLeft (  )  const [inline]

Get lower left corner.

bool Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::mark ( int  refCount,
const typename Traits::template Codim< 0 >::Entity e 
) [inline, inherited]

Marks an entity to be refined/coarsened in a subsequent adapt.

Parameters:
[in] refCount Number of subdivisions that should be applied. Negative value means coarsening.
[in] e Entity to Entity that should be refined
Returns:
true if Entity was marked, false otherwise.
Note:
  • default implementation is: return false; for grids with no adaptation.
  • for the grid programmer: this method is implemented as a template method, because the Entity type is not defined when the class is instantiated You won't need this trick in the implementation. In your implementation you should use it as
               bool mark( int refCount,
                          typename Traits::template Codim<0>::Entity & e ).
    
    This template method will vanish due to the inheritance rules.
template<int dim, int dimworld, class ct, class GridFamily>
bool Dune::Grid< dim, dimworld, ct, GridFamily >::mark ( int  refCount,
const typename Codim< 0 >::Entity e 
) [inline, inherited]

Marks an entity to be refined/coarsened in a subsequent adapt.

Parameters:
[in] refCount Number of subdivisions that should be applied. Negative value means coarsening.
[in] e Entity that should be marked
Returns:
true if Entity was marked, false otherwise.
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
int Dune::SGrid< dim, dimworld, _ctype >::maxLevel (  )  const

Return maximum level defined in this grid. Levels are numbered 0 ... maxLevel with 0 the coarsest level.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

Referenced by Dune::SGrid< dim, dimworld >::levelIndexSet(), and Dune::SGrid< dim, dimworld >::size().

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
size_t Dune::SGrid< dim, dimworld, _ctype >::numBoundarySegments (  )  const [inline]

returns the number of boundary segments within the macro grid

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
int Dune::SGrid< dim, dimworld, _ctype >::overlapSize ( int  level,
int  codim 
) [inline]

return size (= distance in graph) of overlap region

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
int Dune::SGrid< dim, dimworld, _ctype >::overlapSize ( int  level,
int  codim 
) const [inline]

return size (= distance in graph) of overlap region

Reimplemented from Dune::GridDefaultImplementation< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
int Dune::SGrid< dim, dimworld, _ctype >::overlapSize ( int  codim  )  const [inline]

return size (= distance in graph) of overlap region

Reimplemented from Dune::GridDefaultImplementation< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >.

void Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::postAdapt (  )  [inline, inherited]

clean up some markers

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

bool Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::preAdapt (  )  [inline, inherited]

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

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
int Dune::SGrid< dim, dimworld, _ctype >::size ( int  level,
GeometryType  type 
) const [inline]

number of entities per level and geometry type in this process

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
int Dune::SGrid< dim, dimworld, _ctype >::size ( int  level,
int  codim 
) const

number of grid entities per level and codim

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

Referenced by Dune::SGrid< dim, dimworld >::size().

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
int Dune::SGrid< dim, dimworld, _ctype >::size ( int  codim  )  const [inline]

number of leaf entities per codim in this process

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
int Dune::SGrid< dim, dimworld, _ctype >::size ( GeometryType  type  )  const [inline]

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

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
FieldVector<ctype, dimworld> Dune::SGrid< dim, dimworld, _ctype >::upperRight (  )  const [inline]

Get upper right corner.


Friends And Related Function Documentation

template<int dim, int dimworld, typename _ctype = sgrid_ctype>
friend class Dune::SEntity< 0, dim, const Dune::SGrid< dim, dimworld > > [friend]
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
friend class Dune::SEntity< 0, dim, Dune::SGrid< dim, dimworld > > [friend]
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
friend class Dune::SEntityBase [friend]
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
friend class Dune::SEntityPointer [friend]
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
friend class Dune::SGridGlobalIdSet< const Dune::SGrid< dim, dimworld > > [friend]
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
friend class Dune::SGridGlobalIdSet< Dune::SGrid< dim, dimworld > > [friend]
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
friend class Dune::SGridLeafIndexSet< const Dune::SGrid< dim, dimworld > > [friend]
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
friend class Dune::SGridLeafIndexSet< Dune::SGrid< dim, dimworld > > [friend]
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
friend class Dune::SGridLevelIndexSet< const Dune::SGrid< dim, dimworld > > [friend]
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
friend class Dune::SGridLevelIndexSet< Dune::SGrid< dim, dimworld > > [friend]
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
friend class Dune::SHierarchicIterator< const Dune::SGrid< dim, dimworld > > [friend]
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
friend class Dune::SHierarchicIterator< Dune::SGrid< dim, dimworld > > [friend]
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
friend class Dune::SIntersectionIterator< const Dune::SGrid< dim, dimworld > > [friend]
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
friend class Dune::SIntersectionIterator< Dune::SGrid< dim, dimworld > > [friend]
template<int dim, int dimworld, typename _ctype = sgrid_ctype>
friend class Entity [friend]

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].