[ provides Dune::Grid ] More...

#include <dune/grid/yaspgrid.hh>

Inheritance diagram for Dune::YaspGrid< dim >:
Inheritance graph

List of all members.

Classes

class  MessageBuffer

Public Types

enum  { MAXL = 64 }
 

maximum number of levels allowed

More...
typedef yaspgrid_ctype ctype
 define type used for coordinates in grid module
typedef bigunsignedint< dim
*yaspgrid_dim_bits+yaspgrid_level_bits+yaspgrid_codim_bits
PersistentIndexType
typedef YaspGridFamily< dim, dim > GridFamily
 the GridFamily of this grid
typedef YaspGridFamily< dim,
dim >::Traits 
Traits
typedef YaspLevelIndexSet
< YaspGrid< dim > > 
LevelIndexSetType
typedef YaspLeafIndexSet
< YaspGrid< dim > > 
LeafIndexSetType
typedef YaspGlobalIdSet
< YaspGrid< dim > > 
GlobalIdSetType
typedef MultiYGrid< dim, ctypeYMG
 shorthand for base class data types
typedef MultiYGrid< dim, ctype >
::YGridLevelIterator 
YGLI
typedef SubYGrid< dim, ctype >
::TransformingSubIterator 
TSI
typedef MultiYGrid< dim, ctype >
::Intersection 
IS
typedef std::deque< IS >
::const_iterator 
ISIT
typedef YaspGridFamily< dim,
dim >::Traits 
Traits
 The traits of this class.
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.
typedef ct ctype
 Define type used for coordinates in grid module.

Public Member Functions

 YaspGrid (MPI_Comm comm, Dune::FieldVector< ctype, dim > L, Dune::FieldVector< int, dim > s, Dune::FieldVector< bool, dim > periodic, int overlap, const YLoadBalance< dim > *lb=defaultLoadbalancer())
 YaspGrid (Dune::FieldVector< ctype, dim > L, Dune::FieldVector< int, dim > s, Dune::FieldVector< bool, dim > periodic, int overlap, const YLoadBalance< dim > *lb=YMG::defaultLoadbalancer())
 ~YaspGrid ()
int maxLevel () const
void globalRefine (int refCount)
 refine the grid refCount times. What about overlap?
void refineOptions (bool keepPhysicalOverlap)
 set options for refinement
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
bool adapt ()
 map adapt to global refine
bool preAdapt ()
 returns true, if the grid will be coarsened
void postAdapt ()
 clean up some markers
template<int cd, PartitionIteratorType pitype>
Traits::template Codim< cd >
::template Partition< pitype >
::LevelIterator 
lbegin (int level) const
 one past the end on this level
template<int cd, PartitionIteratorType pitype>
Traits::template Codim< cd >
::template Partition< pitype >
::LevelIterator 
lend (int level) const
 Iterator to one past the last entity of given codim on level for partition type.
template<int cd>
Traits::template Codim< cd >
::template Partition
< All_Partition >
::LevelIterator 
lbegin (int level) const
 version without second template parameter for convenience
template<int cd>
Traits::template Codim< cd >
::template Partition
< All_Partition >
::LevelIterator 
lend (int level) const
 version without second template parameter for convenience
template<int cd, PartitionIteratorType pitype>
Traits::template Codim< cd >
::template Partition< pitype >
::LeafIterator 
leafbegin () const
 return LeafIterator which points to the first entity in maxLevel
template<int cd, PartitionIteratorType pitype>
Traits::template Codim< cd >
::template Partition< pitype >
::LeafIterator 
leafend () const
 return LeafIterator which points behind the last entity in maxLevel
template<int cd>
Traits::template Codim< cd >
::template Partition
< All_Partition >
::LeafIterator 
leafbegin () const
 return LeafIterator which points to the first entity in maxLevel
template<int cd>
Traits::template Codim< cd >
::template Partition
< All_Partition >
::LeafIterator 
leafend () const
 return LeafIterator which points behind the last entity in maxLevel
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
int size (int level, int codim) const
 number of entities per level and codim in this process
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 geometry type in this process
size_t numBoundarySegments () const
 returns the number of boundary segments within the macro grid
template<class DataHandleImp , class DataType >
void communicate (CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir, int level) const
template<class DataHandleImp , class DataType >
void communicate (CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
template<class DataHandle , int codim>
void communicateCodim (DataHandle &data, InterfaceType iftype, CommunicationDirection dir, int level) const
const Traits::GlobalIdSetglobalIdSet () const
const Traits::LocalIdSetlocalIdSet () const
const Traits::LevelIndexSetlevelIndexSet (int level) const
const Traits::LeafIndexSetleafIndexSet () const
const CollectiveCommunication
< MPI_Comm > & 
comm () const
 return a collective communication object
YaspIntersectionIterator
< const YaspGrid< dim > > & 
getRealIntersectionIterator (typename Traits::LevelIntersectionIterator &it)
const YaspIntersectionIterator
< const YaspGrid< dim > > & 
getRealIntersectionIterator (const typename Traits::LevelIntersectionIterator &it) const
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 adapt ()
 Refine all positive marked leaf entities coarsen all negative marked entities if possible.
bool preAdapt ()
 returns true, if at least one entity is marked for adaption
void postAdapt ()
 clean up some markers
int ghostSize (int level, int codim) const
 ghostSize is zero by default
int ghostSize (int codim) const
 ghostSize is zero by default
int overlapSize (int level, int codim) const
 overlapSize is zero by default
int overlapSize (int codim) const
 overlapSize is zero by default
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
size_t numBoundarySegments () const
 returns the number of boundary segments within the macro grid
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
void globalRefine (int refCount)
 Refine the grid refCount times using the default refinement rule.
Size methods

int maxLevel () const
 Return maximum level defined in this grid. Levels are numbered 0 ... maxLevel with 0 the coarsest level.
int size (int level, int codim) const
 Return number of grid entities of a given codim on a given level in this process.
int size (int codim) const
 Return number of leaf entities of a given codim in this process.
int size (int level, GeometryType type) const
 Return number of entities per level and geometry type in this process.
int size (GeometryType type) const
 Return number of leaf entities per geometry type in this process.
Iterators

template<int cd, PartitionIteratorType pitype>
Codim< cd >::template
Partition< pitype >
::LevelIterator 
lbegin (int level) const
 Iterator to first entity of given codim on level.
template<int cd, PartitionIteratorType pitype>
Codim< cd >::template
Partition< pitype >
::LevelIterator 
lend (int level) const
 one past the end on this level
template<int cd, PartitionIteratorType pitype>
Codim< cd >::template
Partition< pitype >
::LeafIterator 
leafbegin () const
 Iterator to first entity of given codim on leaf grid.
template<int cd, PartitionIteratorType pitype>
Codim< cd >::template
Partition< pitype >
::LeafIterator 
leafend () const
 one past the end on the leaf level grid
Access to index and id sets

const GlobalIdSetglobalIdSet () const
 return const reference to the grids global id set
const LocalIdSetlocalIdSet () const
 return const reference to the grids local id set
const LevelIndexSetlevelIndexSet (int level) const
 return const reference to the grids level index set for level level
const LeafIndexSetleafIndexSet () const
 return const reference to the grids leaf index set
Parallel data distribution and communication

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

Protected Member Functions

GridImpasImp ()
 Barton-Nackman trick.
const GridImpasImp () const
 Barton-Nackman trick.

Static Protected Member Functions

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

Friends

class Dune::YaspLevelIndexSet< const Dune::YaspGrid< dim > >
class Dune::YaspLeafIndexSet< const Dune::YaspGrid< dim > >
class Dune::YaspGlobalIdSet< const Dune::YaspGrid< dim > >
class Dune::YaspIntersectionIterator< const Dune::YaspGrid< dim > >
class Dune::YaspIntersection< const Dune::YaspGrid< dim > >
class Dune::YaspEntity< 0, dim, const Dune::YaspGrid< dim > >
class Entity

Detailed Description

template<int dim>
class Dune::YaspGrid< dim >

[ provides Dune::Grid ]

Provides a distributed structured cube mesh.

YaspGrid stands for yet another structured parallel grid. It implements the dune grid interface for structured grids with codim 0 and dim, with arbitrary overlap (including zero), periodic boundaries and fast implementation allowing on-the-fly computations.

Template Parameters:
dim The dimension of the grid and its surrounding world
History:
  • started on July 31, 2004 by PB based on abstractions developed in summer 2003

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>
typedef yaspgrid_ctype Dune::YaspGrid< dim >::ctype

define type used for coordinates in grid module

template<int dim, int dimworld, class ct, class GridFamily>
typedef ct Dune::Grid< dim, dimworld, ct, GridFamily >::ctype [inherited]
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>
typedef YaspGlobalIdSet<YaspGrid<dim> > Dune::YaspGrid< dim >::GlobalIdSetType
template<int dim>
typedef YaspGridFamily<dim,dim> Dune::YaspGrid< dim >::GridFamily

the GridFamily of this grid

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>
typedef MultiYGrid<dim,ctype>::Intersection Dune::YaspGrid< dim >::IS
template<int dim>
typedef std::deque<IS>::const_iterator Dune::YaspGrid< dim >::ISIT
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>
typedef YaspLeafIndexSet<YaspGrid<dim> > Dune::YaspGrid< dim >::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>
typedef YaspLevelIndexSet<YaspGrid<dim> > Dune::YaspGrid< dim >::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>
typedef bigunsignedint<dim*yaspgrid_dim_bits+yaspgrid_level_bits+yaspgrid_codim_bits> Dune::YaspGrid< dim >::PersistentIndexType
template<int dim>
typedef YaspGridFamily<dim,dim>::Traits Dune::YaspGrid< dim >::Traits
typedef YaspGridFamily< dim, dim > ::Traits Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim, dim > >::Traits [inherited]

The traits of this class.

Presents the typedefs as described in GridTraits.

template<int dim>
typedef SubYGrid<dim,ctype>::TransformingSubIterator Dune::YaspGrid< dim >::TSI
template<int dim>
typedef MultiYGrid<dim,ctype>::YGridLevelIterator Dune::YaspGrid< dim >::YGLI
template<int dim>
typedef MultiYGrid<dim,ctype> Dune::YaspGrid< dim >::YMG

shorthand for base class data types


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>
anonymous enum

maximum number of levels allowed

Enumerator:
MAXL 

Constructor & Destructor Documentation

template<int dim>
Dune::YaspGrid< dim >::YaspGrid ( MPI_Comm  comm,
Dune::FieldVector< ctype, dim >  L,
Dune::FieldVector< int, dim >  s,
Dune::FieldVector< bool, dim >  periodic,
int  overlap,
const YLoadBalance< dim > *  lb = defaultLoadbalancer() 
) [inline]

Constructor for a YaspGrid, they are all forwarded to the base class

Parameters:
comm MPI communicator where this mesh is distributed to
L extension of the domain
s number of cells on coarse mesh in each direction
periodic tells if direction is periodic or not
overlap size of overlap on coarsest grid (same in all directions)
lb pointer to an overloaded YLoadBalance instance
template<int dim>
Dune::YaspGrid< dim >::YaspGrid ( Dune::FieldVector< ctype, dim >  L,
Dune::FieldVector< int, dim >  s,
Dune::FieldVector< bool, dim >  periodic,
int  overlap,
const YLoadBalance< dim > *  lb = YMG::defaultLoadbalancer() 
) [inline]

Constructor for a sequential YaspGrid, they are all forwarded to the base class.

Sequential here means that the whole grid is living on one process even if your program is running in parallel.

See also:
YaspGrid for constructing one parallel grid decomposed between the processors.
Parameters:
L extension of the domain
s number of cells on coarse mesh in each direction
periodic tells if direction is periodic or not
overlap size of overlap on coarsest grid (same in all directions)
lb pointer to an overloaded YLoadBalance instance
template<int dim>
Dune::YaspGrid< dim >::~YaspGrid (  )  [inline]

Member Function Documentation

template<int dim>
bool Dune::YaspGrid< dim >::adapt (  )  [inline]

map adapt to global refine

bool Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim, dim > >::adapt (  )  [inline, inherited]

Refine all positive marked leaf entities coarsen all negative marked entities if possible.

Returns:
true if a least one entity was refined
  • Note: this default implementation always returns false so grid with no adaptation doesn't need to implement these methods

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

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, class ct, class GridFamily>
const CollectiveCommunication& Dune::Grid< dim, dimworld, ct, GridFamily >::comm (  )  const [inline, inherited]

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

Reimplemented in Dune::AlbertaGrid< dim, dimworld >, Dune::OneDGrid, Dune::SGrid< dim, dimworld, _ctype >, Dune::UGGrid< dim >, Dune::SGrid< dim, dimworld >, and Dune::UGGrid< dimworld >.

Referenced by Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::comm().

template<int dim>
const CollectiveCommunication<MPI_Comm>& Dune::YaspGrid< dim >::comm (  )  const [inline]

return a collective communication object

Referenced by Dune::YaspGrid< dimension >::communicate(), and Dune::YaspGrid< dimension >::preAdapt().

template<int dim>
template<class DataHandleImp , class DataType >
void Dune::YaspGrid< dim >::communicate ( CommDataHandleIF< DataHandleImp, DataType > &  data,
InterfaceType  iftype,
CommunicationDirection  dir,
int  level 
) const [inline]

The new communication interface

communicate objects for all codims on a given level

template<int dim>
template<class DataHandleImp , class DataType >
void Dune::YaspGrid< dim >::communicate ( CommDataHandleIF< DataHandleImp, DataType > &  data,
InterfaceType  iftype,
CommunicationDirection  dir 
) const [inline]

The new communication interface

communicate objects for all codims on the leaf grid

void Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim, dim > >::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, yaspgrid_ctype , YaspGridFamily< dim, dim > >::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>
template<class DataHandle , int codim>
void Dune::YaspGrid< dim >::communicateCodim ( DataHandle &  data,
InterfaceType  iftype,
CommunicationDirection  dir,
int  level 
) const [inline]

The new communication interface

communicate objects for one codim

Traits :: template Codim< EntitySeed :: codimension >:: EntityPointer Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim, dim > >::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 >.

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
int Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim, dim > >::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 Dune::YaspGrid< dim >::getMark ( const typename Traits::template Codim< 0 >::Entity e  )  const [inline]

returns adaptation mark for given entity

Parameters:
[in] e Entity 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, yaspgrid_ctype , YaspGridFamily< dim, dim > >::getRealImplementation ( InterfaceType i  )  [inline, static, protected, inherited]

return real implementation of interface class

Referenced by Dune::YaspGrid< dimension >::getRealIntersectionIterator().

template<int dim>
const YaspIntersectionIterator<const YaspGrid<dim> >& Dune::YaspGrid< dim >::getRealIntersectionIterator ( const typename Traits::LevelIntersectionIterator it  )  const [inline]
template<int dim>
YaspIntersectionIterator<const YaspGrid<dim> >& Dune::YaspGrid< dim >::getRealIntersectionIterator ( typename Traits::LevelIntersectionIterator it  )  [inline]
template<int dim>
int Dune::YaspGrid< dim >::ghostSize ( int  level,
int  codim 
) const [inline]

return size (= distance in graph) of ghost region

template<int dim>
int Dune::YaspGrid< dim >::ghostSize ( int  codim  )  const [inline]

return size (= distance in graph) of ghost region

int Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim, dim > >::ghostSize ( int  level,
int  codim 
) const [inline, inherited]

ghostSize is zero by default

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

int Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim, dim > >::ghostSize ( int  codim  )  const [inline, inherited]

ghostSize is zero by default

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

template<int dim, int dimworld, class ct, class GridFamily>
const GlobalIdSet& Dune::Grid< dim, dimworld, ct, GridFamily >::globalIdSet (  )  const [inline, inherited]
template<int dim>
const Traits::GlobalIdSet& Dune::YaspGrid< dim >::globalIdSet (  )  const [inline]
template<int dim>
void Dune::YaspGrid< dim >::globalRefine ( int  refCount  )  [inline]

refine the grid refCount times. What about overlap?

Referenced by Dune::YaspGrid< dimension >::adapt().

template<int dim, int dimworld, class ct, class GridFamily>
void Dune::Grid< dim, dimworld, ct, GridFamily >::globalRefine ( int  refCount  )  [inline, inherited]

Refine the grid refCount times using the default refinement rule.

This behaves like marking all elements for refinement and then calling preAdapt, adapt and postAdapt. The state after globalRefine is comparable to the state after postAdapt.

Reimplemented in Dune::AlbertaGrid< dim, dimworld >, Dune::OneDGrid, Dune::SGrid< dim, dimworld, _ctype >, Dune::UGGrid< dim >, Dune::SGrid< dim, dimworld >, and Dune::UGGrid< dimworld >.

Referenced by Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::globalRefine().

template<int dim>
template<int cd, PartitionIteratorType pitype>
Traits::template Codim<cd>::template Partition<pitype>::LevelIterator Dune::YaspGrid< dim >::lbegin ( int  level  )  const [inline]

one past the end on this level

template<int dim>
template<int cd>
Traits::template Codim<cd>::template Partition<All_Partition>::LevelIterator Dune::YaspGrid< dim >::lbegin ( int  level  )  const [inline]

version without second template parameter for convenience

template<int dim, int dimworld, class ct, class GridFamily>
template<int cd, PartitionIteratorType pitype>
Codim<cd>::template Partition<pitype>::LevelIterator Dune::Grid< dim, dimworld, ct, GridFamily >::lbegin ( int  level  )  const [inline, inherited]
template<int dim, int dimworld, class ct, class GridFamily>
template<int cd, PartitionIteratorType pitype>
Codim<cd>::template Partition<pitype>::LeafIterator Dune::Grid< dim, dimworld, ct, GridFamily >::leafbegin (  )  const [inline, inherited]
template<int dim>
template<int cd, PartitionIteratorType pitype>
Traits::template Codim<cd>::template Partition<pitype>::LeafIterator Dune::YaspGrid< dim >::leafbegin (  )  const [inline]

return LeafIterator which points to the first entity in maxLevel

template<int dim>
template<int cd>
Traits::template Codim<cd>::template Partition<All_Partition>::LeafIterator Dune::YaspGrid< dim >::leafbegin (  )  const [inline]

return LeafIterator which points to the first entity in maxLevel

template<int dim>
template<int cd>
Traits::template Codim<cd>::template Partition<All_Partition>::LeafIterator Dune::YaspGrid< dim >::leafend (  )  const [inline]

return LeafIterator which points behind the last entity in maxLevel

template<int dim, int dimworld, class ct, class GridFamily>
template<int cd, PartitionIteratorType pitype>
Codim<cd>::template Partition<pitype>::LeafIterator Dune::Grid< dim, dimworld, ct, GridFamily >::leafend (  )  const [inline, inherited]
template<int dim>
template<int cd, PartitionIteratorType pitype>
Traits::template Codim<cd>::template Partition<pitype>::LeafIterator Dune::YaspGrid< dim >::leafend (  )  const [inline]

return LeafIterator which points behind the last entity in maxLevel

template<int dim, int dimworld, class ct, class GridFamily>
const LeafIndexSet& Dune::Grid< dim, dimworld, ct, GridFamily >::leafIndexSet (  )  const [inline, inherited]
template<int dim>
const Traits::LeafIndexSet& Dune::YaspGrid< dim >::leafIndexSet (  )  const [inline]
Traits::template Partition<pitype>::LeafGridView Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim, dim > >::leafView (  )  const [inline, inherited]

View for the leaf grid.

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

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

View for the leaf grid for All_Partition.

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

template<int dim>
template<int cd, PartitionIteratorType pitype>
Traits::template Codim<cd>::template Partition<pitype>::LevelIterator Dune::YaspGrid< dim >::lend ( int  level  )  const [inline]

Iterator to one past the last entity of given codim on level for partition type.

template<int dim>
template<int cd>
Traits::template Codim<cd>::template Partition<All_Partition>::LevelIterator Dune::YaspGrid< dim >::lend ( int  level  )  const [inline]

version without second template parameter for convenience

template<int dim, int dimworld, class ct, class GridFamily>
template<int cd, PartitionIteratorType pitype>
Codim<cd>::template Partition<pitype>::LevelIterator Dune::Grid< dim, dimworld, ct, GridFamily >::lend ( int  level  )  const [inline, inherited]
template<int dim, int dimworld, class ct, class GridFamily>
const LevelIndexSet& Dune::Grid< dim, dimworld, ct, GridFamily >::levelIndexSet ( int  level  )  const [inline, inherited]
template<int dim>
const Traits::LevelIndexSet& Dune::YaspGrid< dim >::levelIndexSet ( int  level  )  const [inline]
Traits::template Partition<pitype>::LevelGridView Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim, dim > >::levelView ( int  level  )  const [inline, inherited]

View for a grid level.

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

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

View for a grid level for All_Partition.

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

bool Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim, dim > >::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, yaspgrid_ctype , YaspGridFamily< dim, dim > >::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, class ct, class GridFamily>
const LocalIdSet& Dune::Grid< dim, dimworld, ct, GridFamily >::localIdSet (  )  const [inline, inherited]
template<int dim>
const Traits::LocalIdSet& Dune::YaspGrid< dim >::localIdSet (  )  const [inline]
bool Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim, dim > >::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>
bool Dune::YaspGrid< dim >::mark ( int  refCount,
const typename Traits::template Codim< 0 >::Entity e 
) [inline]

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:
  • On yaspgrid marking one element will mark all other elements of the level aswell
  • If refCount is lower than refCount of a previous mark-call, nothing is changed
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, class ct, class GridFamily>
size_t Dune::Grid< dim, dimworld, ct, GridFamily >::numBoundarySegments (  )  const [inline, inherited]

returns the number of boundary segments within the macro grid

Returns:
number of boundary segments within the macro grid

Reimplemented in Dune::AlbertaGrid< dim, dimworld >, Dune::OneDGrid, Dune::SGrid< dim, dimworld, _ctype >, Dune::UGGrid< dim >, Dune::SGrid< dim, dimworld >, and Dune::UGGrid< dimworld >.

Referenced by Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::numBoundarySegments().

template<int dim>
size_t Dune::YaspGrid< dim >::numBoundarySegments (  )  const [inline]

returns the number of boundary segments within the macro grid

template<int dim>
int Dune::YaspGrid< dim >::overlapSize ( int  level,
int  codim 
) const [inline]

return size (= distance in graph) of overlap region

template<int dim>
int Dune::YaspGrid< dim >::overlapSize ( int  codim  )  const [inline]

return size (= distance in graph) of overlap region

int Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim, dim > >::overlapSize ( int  level,
int  codim 
) const [inline, inherited]

overlapSize is zero by default

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

int Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim, dim > >::overlapSize ( int  codim  )  const [inline, inherited]

overlapSize is zero by default

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

template<int dim>
void Dune::YaspGrid< dim >::postAdapt (  )  [inline]

clean up some markers

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

clean up some markers

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

bool Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim, dim > >::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>
bool Dune::YaspGrid< dim >::preAdapt (  )  [inline]

returns true, if the grid will be coarsened

template<int dim>
void Dune::YaspGrid< dim >::refineOptions ( bool  keepPhysicalOverlap  )  [inline]

set options for refinement

Parameters:
keepPhysicalOverlap [true] keep the physical size of the overlap, [false] keep the number of cells in the overlap. Default is [true].
template<int dim, int dimworld, class ct, class GridFamily>
int Dune::Grid< dim, dimworld, ct, GridFamily >::size ( int  level,
int  codim 
) const [inline, inherited]
template<int dim, int dimworld, class ct, class GridFamily>
int Dune::Grid< dim, dimworld, ct, GridFamily >::size ( int  codim  )  const [inline, inherited]
template<int dim>
int Dune::YaspGrid< dim >::size ( int  level,
int  codim 
) const [inline]

number of entities per level and codim in this process

Referenced by Dune::YaspGrid< dimension >::size().

template<int dim>
int Dune::YaspGrid< dim >::size ( int  level,
GeometryType  type 
) const [inline]

number of entities per level and geometry type in this process

template<int dim, int dimworld, class ct, class GridFamily>
int Dune::Grid< dim, dimworld, ct, GridFamily >::size ( GeometryType  type  )  const [inline, inherited]
template<int dim>
int Dune::YaspGrid< dim >::size ( int  codim  )  const [inline]

number of leaf entities per codim in this process

template<int dim>
int Dune::YaspGrid< dim >::size ( GeometryType  type  )  const [inline]

number of leaf entities per geometry type in this process

template<int dim, int dimworld, class ct, class GridFamily>
int Dune::Grid< dim, dimworld, ct, GridFamily >::size ( int  level,
GeometryType  type 
) const [inline, inherited]

Return number of entities per level and geometry type in this process.

Reimplemented in Dune::AlbertaGrid< dim, dimworld >, Dune::OneDGrid, Dune::SGrid< dim, dimworld, _ctype >, Dune::UGGrid< dim >, Dune::SGrid< dim, dimworld >, and Dune::UGGrid< dimworld >.


Friends And Related Function Documentation

template<int dim>
friend class Dune::YaspEntity< 0, dim, const Dune::YaspGrid< dim > > [friend]
template<int dim>
friend class Dune::YaspGlobalIdSet< const Dune::YaspGrid< dim > > [friend]
template<int dim>
friend class Dune::YaspIntersection< const Dune::YaspGrid< dim > > [friend]
template<int dim>
friend class Dune::YaspIntersectionIterator< const Dune::YaspGrid< dim > > [friend]
template<int dim>
friend class Dune::YaspLeafIndexSet< const Dune::YaspGrid< dim > > [friend]
template<int dim>
friend class Dune::YaspLevelIndexSet< const Dune::YaspGrid< dim > > [friend]
template<int dim>
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].