dune-grid  2.3.0
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
Dune::SGrid< dim, dimworld, ctype > Class Template Reference

[ provides Dune::Grid ] More...

#include <dune/grid/sgrid.hh>

Inheritance diagram for Dune::SGrid< dim, dimworld, ctype >:
Dune::GridDefaultImplementation< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > > Dune::Grid< dim, dimworld, ct, GridFamily >

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 SGridLevelIndexSet
< SGrid< dim, dimworld > > 
LeafIndexSetType
 
typedef SGridGlobalIdSet
< SGrid< dim, dimworld > > 
GlobalIdSetType
 
typedef SGridFamily< dim,
dimworld, _ctype >::Traits 
Traits
 
typedef _ctype ctype
 define type used for coordinates in grid module More...
 
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. More...
 
typedef Partition
< All_Partition >
::LeafGridView 
LeafGridView
 
typedef
GridFamily::Traits::LeafIntersection 
LeafIntersection
 A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimension 0 entities in the leaf view. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Public Member Functions

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

Protected Member Functions

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

Static Protected Member Functions

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

dummy parallel functions

class Dune::SGridLevelIndexSet< 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::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 > >
 
template<int codim_, int dim_, class GridImp_ , template< int, int, class > class EntityImp_>
class Dune::SEntityBase
 
template<int codim_, class GridImp_ >
class Dune::SEntityPointer
 
template<int codim_, int dim_, class GridImp_ , template< int, int, class > class EntityImp_>
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
 
int overlapSize (int level, int codim) const
 return size (= distance in graph) of overlap region More...
 
int overlapSize (int codim) const
 return size (= distance in graph) of overlap region More...
 
int ghostSize (int level, int codim) const
 return size (= distance in graph) of ghost region More...
 
int ghostSize (int codim) const
 return size (= distance in graph) of ghost region More...
 

Detailed Description

template<int dim, int dimworld, class 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:

 \image html sgridclasses.png "Class diagram for classes in the grid interface"
 \image latex sgridclasses.eps "Class diagram for classes in the grid interface" width=\textwidth

 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 is a class template realizing the grid entities. Grid entities are the constituents
 of a grid. Grid entities of codimension 0 and codimension dim are defines through specialization.
 Entities can be used as template parameters to generic algorithms. Each entity must therefore
 provide the nested classes Geometry, LevelIterator, HierarchicIterator and IntersectionIterator.
 Geometry and LevelIterator are derived from the classes SELement and SLevelIterator.
 Note that entities of codimension 0 and dim have an extended interface.

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

template<int dim, int dimworld, class ctype >
typedef _ctype Dune::SGrid< dim, dimworld, ctype >::ctype

define type used for coordinates in grid module

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.

template<int dim, int dimworld, class ctype >
typedef SGridGlobalIdSet<SGrid<dim,dimworld> > Dune::SGrid< dim, dimworld, ctype >::GlobalIdSetType
template<int dim, int dimworld, class 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.

template<int dim, int dimworld, class ctype >
typedef SGridLevelIndexSet<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::Intersection, 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.

template<int dim, int dimworld, class 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.

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

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, class ctype >
anonymous enum

maximum number of levels allowed

Enumerator
MAXL 

Constructor & Destructor Documentation

template<int dim, int dimworld, class 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, class 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, class 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, class ctype >
Dune::SGrid< dim, dimworld, ctype >::SGrid ( )

empty constructor making grid of unit square discretized with one cell

template<int dim, int dimworld, class ctype >
Dune::SGrid< dim, dimworld, ctype >::~SGrid ( )

SGrid destructor.

Member Function Documentation

template<int dim, int dimworld, class ctype >
bool Dune::SGrid< dim, dimworld, ctype >::adapt ( )
inline

map adapt to global refine

References Dune::SGrid< dim, dimworld, ctype >::globalRefine().

template<int dim, int dimworld, class ct , class GridFamily >
GridImp& Dune::Grid< dim, dimworld, ct, GridFamily >::asImp ( )
inlineprotectedinherited

Barton-Nackman trick.

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

template<int dim, int dimworld, class ct , class GridFamily >
const GridImp& Dune::Grid< dim, dimworld, ct, GridFamily >::asImp ( ) const
inlineprotectedinherited

Barton-Nackman trick.

template<int dim, int dimworld, class ctype >
const CollectiveCommunication<SGrid>& Dune::SGrid< dim, dimworld, ctype >::comm ( ) const
inline
void Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::communicate ( CommDataHandleIF< DataHandleImp, DataTypeImp > &  data,
InterfaceType  iftype,
CommunicationDirection  dir,
int  level 
) const
inlineinherited

dummy communicate, doing nothing

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

dummy communicate, doing nothing

template<int dim, int dimworld, class 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
Tarray class holding data associated with the entities
Ptype used to gather/scatter data in and out of the message buffer
codimcommunicate entites of given codim
Parameters
tarray holding data associated with the entities
iftypeone of the predefined interface types, throws error if it is not implemented
dirchoose beetween forward and backward communication
levelcommunicate 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".

template<int dim, int dimworld, class 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, class ctype >
template<class DataHandle >
void Dune::SGrid< dim, dimworld, ctype >::communicate ( DataHandle &  data,
InterfaceType  iftype,
CommunicationDirection  dir 
) const
inline
template<int dim, int dimworld, class ctype >
const array<int, dim>& Dune::SGrid< dim, dimworld, ctype >::dims ( int  level) const
inline

Get number of elements in each coordinate direction.

template<int dim, int dimworld, class ct , class GridFamily >
template<class EntitySeed >
Codim< EntitySeed :: codimension >:: EntityPointer Dune::Grid< dim, dimworld, ct, GridFamily >::entityPointer ( const EntitySeed seed) const
inlineinherited
template<int dim, int dimworld, class ctype >
template<typename Seed >
Traits::template Codim<Seed::codimension>::EntityPointer Dune::SGrid< dim, dimworld, ctype >::entityPointer ( const Seed &  seed) const
inline
template<int dim, int dimworld, class ct , class GridFamily >
int Dune::Grid< dim, dimworld, ct, GridFamily >::getMark ( const typename Codim< 0 >::Entity e) const
inlineinherited

returns adaptation mark for given entity

Parameters
[in]eEntity for which adaptation mark should be determined
Returns
int adaptation mark currently set for given Entity e

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

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

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

Parameters
[in]eEntity for which adaptation mark should be determined
Returns
int adaptation mark, here the default value 0 is returned
static ReturnImplementationType<InterfaceType>::ImplementationType& Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::getRealImplementation ( InterfaceType i)
inlinestaticprotectedinherited

return real implementation of interface class

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

template<int dim, int dimworld, class 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, class ctype >
int Dune::SGrid< dim, dimworld, ctype >::ghostSize ( int  level,
int  codim 
) const
inline

return size (= distance in graph) of ghost region

template<int dim, int dimworld, class ctype >
int Dune::SGrid< dim, dimworld, ctype >::ghostSize ( int  codim) const
inline

return size (= distance in graph) of ghost region

template<int dim, int dimworld, class 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, class ctype >
const Traits::GlobalIdSet& Dune::SGrid< dim, dimworld, ctype >::globalIdSet ( ) const
inline
template<int dim, int dimworld, class ctype >
void Dune::SGrid< dim, dimworld, ctype >::globalRefine ( int  refCount)

Refine mesh globally by one refCount levels.

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

template<int dim, int dimworld, class 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.

template<int dim, int dimworld, class 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.

template<int dim, int dimworld, class 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

template<int dim, int dimworld, class 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

template<int dim, int dimworld, class 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

template<int dim, int dimworld, class 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

Traits::template Partition<pitype>::LeafGridView Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::leafGridView ( ) const
inlineinherited

View for the leaf grid.

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

Traits::template Partition<All_Partition>::LeafGridView Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::leafGridView ( ) const
inlineinherited

View for the leaf grid for All_Partition.

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

template<int dim, int dimworld, class ctype >
const Traits::LeafIndexSet& Dune::SGrid< dim, dimworld, ctype >::leafIndexSet ( ) const
inline
Traits::template Partition<pitype>::LeafGridView Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::leafView ( ) const
inlineinherited

View for the leaf grid.

Deprecated:
"The method levelView has been renamed to leafGridView."

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

Traits::template Partition<All_Partition>::LeafGridView Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::leafView ( ) const
inlineinherited

View for the leaf grid for All_Partition.

Deprecated:
"The method leafView has been renamed to leafGridView."

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

template<int dim, int dimworld, class 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

template<int dim, int dimworld, class 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

Traits::template Partition<pitype>::LevelGridView Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::levelGridView ( int  level) const
inlineinherited

View for a grid level.

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

Traits::template Partition<All_Partition>::LevelGridView Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::levelGridView ( int  level) const
inlineinherited

View for a grid level for All_Partition.

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

template<int dim, int dimworld, class ctype >
const Traits::LevelIndexSet& Dune::SGrid< dim, dimworld, ctype >::levelIndexSet ( int  level) const
inline
Traits::template Partition<pitype>::LevelGridView Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::levelView ( int  level) const
inlineinherited

View for a grid level.

Deprecated:
"The method levelView has been renamed to levelGridView."

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

Traits::template Partition<All_Partition>::LevelGridView Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::levelView ( int  level) const
inlineinherited

View for a grid level for All_Partition.

Deprecated:
"The method levelView has been renamed to levelGridView."

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

bool Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::loadBalance ( )
inlineinherited

default implementation of load balance does nothing and returns false

bool Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::loadBalance ( DataHandle &  data)
inlineinherited

default implementation of load balance does nothing and returns false

template<int dim, int dimworld, class ctype >
const Traits::LocalIdSet& Dune::SGrid< dim, dimworld, ctype >::localIdSet ( ) const
inline
template<int dim, int dimworld, class ctype >
const FieldVector<ctype, dimworld>& Dune::SGrid< dim, dimworld, ctype >::lowerLeft ( ) const
inline

Get lower left corner.

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 
)
inlineinherited

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

Parameters
[in]refCountNumber of subdivisions that should be applied. Negative value means coarsening.
[in]eEntity that should be marked
Returns
true if Entity was marked, false otherwise.

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

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

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

Parameters
[in]refCountNumber of subdivisions that should be applied. Negative value means coarsening.
[in]eEntity 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 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.

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

template<int dim, int dimworld, class ctype >
size_t Dune::SGrid< dim, dimworld, ctype >::numBoundarySegments ( ) const
inline

returns the number of boundary segments within the macro grid

template<int dim, int dimworld, class 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, class ctype >
int Dune::SGrid< dim, dimworld, ctype >::overlapSize ( int  level,
int  codim 
) const
inline

return size (= distance in graph) of overlap region

template<int dim, int dimworld, class ctype >
int Dune::SGrid< dim, dimworld, ctype >::overlapSize ( int  codim) const
inline

return size (= distance in graph) of overlap region

void Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::postAdapt ( )
inlineinherited

clean up some markers

bool Dune::GridDefaultImplementation< dim, dimworld, _ctype , SGridFamily< dim, dimworld, _ctype > >::preAdapt ( )
inlineinherited

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

template<int dim, int dimworld, class ctype >
int Dune::SGrid< dim, dimworld, ctype >::size ( int  level,
int  codim 
) const

number of grid entities per level and codim

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

template<int dim, int dimworld, class ctype >
int Dune::SGrid< dim, dimworld, ctype >::size ( int  codim) const
inline

number of leaf entities per codim in this process

References Dune::SGrid< dim, dimworld, ctype >::maxLevel(), and Dune::SGrid< dim, dimworld, ctype >::size().

template<int dim, int dimworld, class 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

References Dune::SGrid< dim, dimworld, ctype >::size().

template<int dim, int dimworld, class ctype >
int Dune::SGrid< dim, dimworld, ctype >::size ( GeometryType  type) const
inline

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

References Dune::SGrid< dim, dimworld, ctype >::maxLevel(), and Dune::SGrid< dim, dimworld, ctype >::size().

template<int dim, int dimworld, class 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, class ctype >
friend class Dune::SEntity< 0, dim, const Dune::SGrid< dim, dimworld > >
friend
template<int dim, int dimworld, class ctype >
friend class Dune::SEntity< 0, dim, Dune::SGrid< dim, dimworld > >
friend
template<int dim, int dimworld, class ctype >
template<int codim_, int dim_, class GridImp_ , template< int, int, class > class EntityImp_>
friend class Dune::SEntityBase
friend
template<int dim, int dimworld, class ctype >
template<int codim_, class GridImp_ >
friend class Dune::SEntityPointer
friend
template<int dim, int dimworld, class ctype >
friend class Dune::SGridGlobalIdSet< const Dune::SGrid< dim, dimworld > >
friend
template<int dim, int dimworld, class ctype >
friend class Dune::SGridGlobalIdSet< Dune::SGrid< dim, dimworld > >
friend
template<int dim, int dimworld, class ctype >
friend class Dune::SGridLevelIndexSet< const Dune::SGrid< dim, dimworld > >
friend
template<int dim, int dimworld, class ctype >
friend class Dune::SGridLevelIndexSet< Dune::SGrid< dim, dimworld > >
friend
template<int dim, int dimworld, class ctype >
friend class Dune::SHierarchicIterator< const Dune::SGrid< dim, dimworld > >
friend
template<int dim, int dimworld, class ctype >
friend class Dune::SHierarchicIterator< Dune::SGrid< dim, dimworld > >
friend
template<int dim, int dimworld, class ctype >
friend class Dune::SIntersectionIterator< const Dune::SGrid< dim, dimworld > >
friend
template<int dim, int dimworld, class ctype >
friend class Dune::SIntersectionIterator< Dune::SGrid< dim, dimworld > >
friend
template<int dim, int dimworld, class ctype >
template<int codim_, int dim_, class GridImp_ , template< int, int, class > class EntityImp_>
friend class Entity
friend

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