dune-grid  2.3.1
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
Dune::YaspGrid< dim > Class Template Reference

[ provides Dune::Grid ] More...

#include <dune/grid/yaspgrid.hh>

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

Classes

struct  Intersection
 
struct  mpifriendly_ygrid
 
struct  YGridLevel
 A single grid level within a YaspGrid. More...
 

Public Types

enum  { tag = 17 }
 
typedef yaspgrid_ctype ctype
 Type used for coordinates. More...
 
typedef FieldVector< int, dim > iTupel
 define types used for arguments More...
 
typedef FieldVector< ctype, dim > fTupel
 
typedef ReservedVector
< YGridLevel, 32 >
::const_iterator 
YGridLevelIterator
 Iterator over the grid levels. More...
 
typedef bigunsignedint< dim
*yaspgrid_dim_bits+yaspgrid_level_bits+yaspgrid_codim_bits
PersistentIndexType
 
typedef YaspGridFamily< dim > GridFamily
 the GridFamily of this grid More...
 
typedef YaspGridFamily< dim >
::Traits 
Traits
 
typedef YaspIndexSet< YaspGrid
< dim >, false > 
LevelIndexSetType
 
typedef YaspIndexSet< YaspGrid
< dim >, true > 
LeafIndexSetType
 
typedef YaspGlobalIdSet
< YaspGrid< dim > > 
GlobalIdSetType
 
typedef SubYGrid< dim, ctype >
::TransformingSubIterator 
TSI
 shorthand for some data types More...
 
typedef std::deque
< Intersection >
::const_iterator 
ISIT
 
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

const Torus< dim > & torus () const
 return reference to torus More...
 
YGridLevelIterator begin () const
 return iterator pointing to coarsest level More...
 
YGridLevelIterator begin (int i) const
 return iterator pointing to given level More...
 
YGridLevelIterator end () const
 return iterator pointing to one past the finest level More...
 
void MultiYGridSetup (fTupel L, iTupel s, std::bitset< dim > periodic, int overlap, const YLoadBalance< dim > *lb=defaultLoadbalancer())
 The constructor of the old MultiYGrid class. More...
 
void MultiYGridSetup (fTupel L, Dune::array< int, dim > s, std::bitset< dim > periodic, int overlap, const YLoadBalance< dim > *lb=defaultLoadbalancer())
 The constructor of the old MultiYGrid class. More...
 
 YaspGrid (Dune::MPIHelper::MPICommunicator 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=defaultLoadbalancer())
 
 YaspGrid (Dune::MPIHelper::MPICommunicator comm, Dune::FieldVector< ctype, dim > L, Dune::array< int, dim > s, std::bitset< dim > periodic, int overlap, const YLoadBalance< dim > *lb=defaultLoadbalancer())
 
 YaspGrid (Dune::FieldVector< ctype, dim > L, Dune::array< int, dim > s, std::bitset< dim > periodic, int overlap, const YLoadBalance< dim > *lb=defaultLoadbalancer())
 
 YaspGrid (Dune::FieldVector< ctype, dim > L, Dune::array< int, dim > elements)
 
int maxLevel () const
 
void globalRefine (int refCount)
 refine the grid refCount times. What about overlap? More...
 
void refineOptions (bool keepPhysicalOverlap)
 set options for refinement 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 More...
 
bool adapt ()
 map adapt to global refine More...
 
bool preAdapt ()
 returns true, if the grid will be coarsened More...
 
void postAdapt ()
 clean up some markers More...
 
template<int cd, PartitionIteratorType pitype>
Traits::template Codim< cd >
::template Partition< pitype >
::LevelIterator 
lbegin (int level) const
 one past the end on this level More...
 
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. More...
 
template<int cd>
Traits::template Codim< cd >
::template Partition
< All_Partition >
::LevelIterator 
lbegin (int level) const
 version without second template parameter for convenience More...
 
template<int cd>
Traits::template Codim< cd >
::template Partition
< All_Partition >
::LevelIterator 
lend (int level) const
 version without second template parameter for convenience More...
 
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 More...
 
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 More...
 
template<int cd>
Traits::template Codim< cd >
::template Partition
< All_Partition >
::LeafIterator 
leafbegin () const
 return LeafIterator which points to the first entity in maxLevel More...
 
template<int cd>
Traits::template Codim< cd >
::template Partition
< All_Partition >
::LeafIterator 
leafend () const
 return LeafIterator which points behind the last entity in maxLevel More...
 
template<typename Seed >
Traits::template Codim
< Seed::codimension >
::EntityPointer 
entityPointer (const Seed &seed) 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...
 
int size (int level, int codim) const
 number of entities per level and codim in this process 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 geometry type in this process More...
 
size_t numBoundarySegments () const
 returns the number of boundary segments within the macro grid More...
 
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 More...
 
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...
 
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...
 

Static Public Member Functions

static const YLoadBalance< dim > * defaultLoadbalancer ()
 

Protected Types

typedef const YaspGrid< dim > GridImp
 

Protected Member Functions

YGridLevel makelevel (int level, fTupel L, iTupel s, std::bitset< dim > periodic, iTupel o_interior, iTupel s_interior, int overlap)
 Make a new YGridLevel structure. More...
 
void intersections (const SubYGrid< dim, ctype > &sendgrid, const SubYGrid< dim, ctype > &recvgrid, const iTupel &size, std::deque< Intersection > &sendlist, std::deque< Intersection > &recvlist)
 Construct list of intersections with neighboring processors. More...
 
void init ()
 
void boundarysegmentssize ()
 
GridImpasImp ()
 Barton-Nackman trick. More...
 
const GridImpasImp () const
 Barton-Nackman trick. More...
 

Static Protected Member Functions

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

Friends

class Dune::YaspIndexSet< const Dune::YaspGrid< dim >, true >
 
class Dune::YaspIndexSet< const Dune::YaspGrid< dim >, false >
 
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 > >
 
template<int codim_, class GridImp_ >
class Dune::YaspEntityPointer
 
template<int codim_, int dim_, class GridImp_ , template< int, int, class > class EntityImp_>
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
dimThe 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.

template<int dim>
typedef yaspgrid_ctype Dune::YaspGrid< dim >::ctype

Type used for coordinates.

template<int dim>
typedef FieldVector<ctype, dim> Dune::YaspGrid< dim >::fTupel
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>
typedef YaspGlobalIdSet<YaspGrid<dim> > Dune::YaspGrid< dim >::GlobalIdSetType
template<int dim>
typedef YaspGridFamily<dim> Dune::YaspGrid< dim >::GridFamily

the GridFamily of this grid

template<int dim>
typedef const YaspGrid<dim> Dune::YaspGrid< dim >::GridImp
protected
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 std::deque<Intersection>::const_iterator Dune::YaspGrid< dim >::ISIT
template<int dim>
typedef FieldVector<int, dim> Dune::YaspGrid< dim >::iTupel

define types used for arguments

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>
typedef YaspIndexSet<YaspGrid<dim>, true > 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::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>
typedef YaspIndexSet<YaspGrid<dim>, false > 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.

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>::Traits Dune::YaspGrid< dim >::Traits
template<int dim>
typedef SubYGrid<dim,ctype>::TransformingSubIterator Dune::YaspGrid< dim >::TSI

shorthand for some data types

template<int dim>
typedef ReservedVector<YGridLevel,32>::const_iterator Dune::YaspGrid< dim >::YGridLevelIterator

Iterator over the grid levels.

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
Enumerator
tag 

Constructor & Destructor Documentation

template<int dim>
Dune::YaspGrid< dim >::YaspGrid ( Dune::MPIHelper::MPICommunicator  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

Parameters
commMPI communicator where this mesh is distributed to
Lextension of the domain
snumber of cells on coarse mesh in each direction
periodictells if direction is periodic or not
overlapsize of overlap on coarsest grid (same in all directions)
lbpointer to an overloaded YLoadBalance instance
Deprecated:
Will be removed after dune-grid 2.3. Use the corresponding constructor taking array<int> and std::bitset instead.
Deprecated:
"Use the corresponding constructor taking array<int> and std::bitset"

References Dune::YaspGrid< dim >::init(), and Dune::YaspGrid< dim >::MultiYGridSetup().

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 = defaultLoadbalancer() 
)
inline

Constructor for a sequential YaspGrid

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
Lextension of the domain
snumber of cells on coarse mesh in each direction
periodictells if direction is periodic or not
overlapsize of overlap on coarsest grid (same in all directions)
lbpointer to an overloaded YLoadBalance instance
Deprecated:
Will be removed after dune-grid 2.3. Use the corresponding constructor taking array<int> and std::bitset instead.
Deprecated:
"Use the corresponding constructor taking array<int> and std::bitset"

References Dune::YaspGrid< dim >::init(), and Dune::YaspGrid< dim >::MultiYGridSetup().

template<int dim>
Dune::YaspGrid< dim >::YaspGrid ( Dune::MPIHelper::MPICommunicator  comm,
Dune::FieldVector< ctype, dim >  L,
Dune::array< int, dim >  s,
std::bitset< dim >  periodic,
int  overlap,
const YLoadBalance< dim > *  lb = defaultLoadbalancer() 
)
inline

Constructor

Parameters
commMPI communicator where this mesh is distributed to
Lextension of the domain
snumber of cells on coarse mesh in each direction
periodictells if direction is periodic or not
overlapsize of overlap on coarsest grid (same in all directions)
lbpointer to an overloaded YLoadBalance instance

References Dune::YaspGrid< dim >::init(), and Dune::YaspGrid< dim >::MultiYGridSetup().

template<int dim>
Dune::YaspGrid< dim >::YaspGrid ( Dune::FieldVector< ctype, dim >  L,
Dune::array< int, dim >  s,
std::bitset< dim >  periodic,
int  overlap,
const YLoadBalance< dim > *  lb = defaultLoadbalancer() 
)
inline

Constructor for a sequential YaspGrid

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
Lextension of the domain
snumber of cells on coarse mesh in each direction
periodictells if direction is periodic or not
overlapsize of overlap on coarsest grid (same in all directions)
lbpointer to an overloaded YLoadBalance instance

References Dune::YaspGrid< dim >::init(), and Dune::YaspGrid< dim >::MultiYGridSetup().

template<int dim>
Dune::YaspGrid< dim >::YaspGrid ( Dune::FieldVector< ctype, dim >  L,
Dune::array< int, dim >  elements 
)
inline

Constructor for a sequential YaspGrid without periodicity

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
Lextension of the domain (lower left is always (0,...,0)
elementsnumber of cells on coarse mesh in each direction

References Dune::YaspGrid< dim >::init(), and Dune::YaspGrid< dim >::makelevel().

Member Function Documentation

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

map adapt to global refine

References Dune::YaspGrid< dim >::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>
YGridLevelIterator Dune::YaspGrid< dim >::begin ( ) const
inline
template<int dim>
YGridLevelIterator Dune::YaspGrid< dim >::begin ( int  i) const
inline

return iterator pointing to given level

References Dune::YaspGrid< dim >::maxLevel().

template<int dim>
void Dune::YaspGrid< dim >::boundarysegmentssize ( )
inlineprotected
template<int dim>
const CollectiveCommunication<MPI_Comm>& Dune::YaspGrid< dim >::comm ( ) const
inline

return a collective communication object

Referenced by Dune::YaspGrid< dim >::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

References Dune::YaspCommunicateMeta< dim, codim >::comm().

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

References Dune::YaspCommunicateMeta< dim, codim >::comm(), and Dune::YaspGrid< dim >::maxLevel().

void Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim > >::communicate ( CommDataHandleIF< DataHandleImp, DataTypeImp > &  data,
InterfaceType  iftype,
CommunicationDirection  dir,
int  level 
) const
inlineinherited

dummy communicate, doing nothing

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

dummy communicate, doing nothing

template<int dim>
template<class DataHandle , int codim>
void Dune::YaspGrid< dim >::communicateCodim ( DataHandle &  data,
InterfaceType  iftype,
CommunicationDirection  dir,
int  level 
) const
inline
template<int dim>
static const YLoadBalance<dim>* Dune::YaspGrid< dim >::defaultLoadbalancer ( )
inlinestatic
template<int dim>
YGridLevelIterator Dune::YaspGrid< dim >::end ( ) const
inline

return iterator pointing to one past the finest level

References Dune::YaspGrid< dim >::maxLevel().

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>
template<typename Seed >
Traits::template Codim<Seed::codimension>::EntityPointer Dune::YaspGrid< dim >::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().

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]eEntity for which adaptation mark should be determined
Returns
int adaptation mark, here the default value 0 is returned

References Dune::YaspGrid< dim >::maxLevel().

static ReturnImplementationType<InterfaceType>::ImplementationType& Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim > >::getRealImplementation ( InterfaceType i)
inlinestaticprotectedinherited

return real implementation of interface class

Referenced by Dune::YaspGrid< dim >::entityPointer().

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

template<int dim>
const Traits::GlobalIdSet& Dune::YaspGrid< dim >::globalIdSet ( ) const
inline
template<int dim>
void Dune::YaspGrid< dim >::globalRefine ( int  refCount)
inline
template<int dim>
void Dune::YaspGrid< dim >::init ( )
inlineprotected
template<int dim>
void Dune::YaspGrid< dim >::intersections ( const SubYGrid< dim, ctype > &  sendgrid,
const SubYGrid< dim, ctype > &  recvgrid,
const iTupel size,
std::deque< Intersection > &  sendlist,
std::deque< Intersection > &  recvlist 
)
inlineprotected

Construct list of intersections with neighboring processors.

Parameters
recvgridthe grid stored in this processor
sendgridthe subgrid to be sent to neighboring processors
sizeneeded to shift local grid in periodic case
Returns
two lists: Intersections to be sent and Intersections to be received
Note
sendgrid/recvgrid may be SubYGrids. Since intersection method is virtual it should work properly

References Dune::YaspGrid< dim >::Intersection::distance, Dune::YaspGrid< dim >::Intersection::grid, Dune::YaspGrid< dim >::mpifriendly_ygrid::h, Dune::YaspGrid< dim >::mpifriendly_ygrid::origin, Dune::YaspGrid< dim >::mpifriendly_ygrid::r, Dune::YaspGrid< dim >::Intersection::rank, and Dune::YaspGrid< dim >::mpifriendly_ygrid::size.

Referenced by Dune::YaspGrid< dim >::makelevel().

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

References Dune::YaspGrid< dim >::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

References Dune::YaspGrid< dim >::maxLevel().

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

References Dune::YaspGrid< dim >::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

References Dune::YaspGrid< dim >::maxLevel().

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

View for the leaf grid.

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

View for the leaf grid for All_Partition.

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 > >::leafView ( ) const
inlineinherited

View for the leaf grid.

Deprecated:
"The method levelView has been renamed to leafGridView."
Traits::template Partition<All_Partition>::LeafGridView Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim > >::leafView ( ) const
inlineinherited

View for the leaf grid for All_Partition.

Deprecated:
"The method leafView has been renamed to leafGridView."
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

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

View for a grid level.

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

View for a grid level for All_Partition.

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 > >::levelView ( int  level) const
inlineinherited

View for a grid level.

Deprecated:
"The method levelView has been renamed to levelGridView."
Traits::template Partition<All_Partition>::LevelGridView Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim > >::levelView ( int  level) const
inlineinherited

View for a grid level for All_Partition.

Deprecated:
"The method levelView has been renamed to levelGridView."
bool Dune::GridDefaultImplementation< dim, dimworld, yaspgrid_ctype , YaspGridFamily< dim > >::loadBalance ( )
inlineinherited

default implementation of load balance does nothing and returns false

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

default implementation of load balance does nothing and returns false

template<int dim>
const Traits::LocalIdSet& Dune::YaspGrid< dim >::localIdSet ( ) const
inline
template<int dim>
YGridLevel Dune::YaspGrid< dim >::makelevel ( int  level,
fTupel  L,
iTupel  s,
std::bitset< dim >  periodic,
iTupel  o_interior,
iTupel  s_interior,
int  overlap 
)
inlineprotected

Make a new YGridLevel structure.

Parameters
Lsize of the whole domain in each direction
snumber of cells in each direction
periodicindicate periodicity for each direction
o_interiororigin of interior (non-overlapping) cell decomposition
s_interiorsize of interior cell decomposition
overlapto be used on this grid level

References Dune::YaspGrid< dim >::YGridLevel::cell_global, Dune::YaspGrid< dim >::YGridLevel::cell_interior, Dune::YaspGrid< dim >::YGridLevel::cell_overlap, Dune::YaspGrid< dim >::intersections(), Dune::YaspGrid< dim >::YGridLevel::level_, Dune::Alberta::max(), Dune::YaspGrid< dim >::YGridLevel::mg, Dune::Alberta::min(), Dune::YaspGrid< dim >::YGridLevel::overlap, Dune::YaspGrid< dim >::YGridLevel::recv_cell_overlap_interior, Dune::YaspGrid< dim >::YGridLevel::recv_cell_overlap_overlap, Dune::YaspGrid< dim >::YGridLevel::recv_vertex_interiorborder_interiorborder, Dune::YaspGrid< dim >::YGridLevel::recv_vertex_overlapfront_interiorborder, Dune::YaspGrid< dim >::YGridLevel::recv_vertex_overlapfront_overlap, Dune::YaspGrid< dim >::YGridLevel::recv_vertex_overlapfront_overlapfront, Dune::YaspGrid< dim >::YGridLevel::send_cell_interior_overlap, Dune::YaspGrid< dim >::YGridLevel::send_cell_overlap_overlap, Dune::YaspGrid< dim >::YGridLevel::send_vertex_interiorborder_interiorborder, Dune::YaspGrid< dim >::YGridLevel::send_vertex_interiorborder_overlapfront, Dune::YaspGrid< dim >::YGridLevel::send_vertex_overlap_overlapfront, Dune::YaspGrid< dim >::YGridLevel::send_vertex_overlapfront_overlapfront, Dune::YaspGrid< dim >::YGridLevel::vertex_global, Dune::YaspGrid< dim >::YGridLevel::vertex_interior, Dune::YaspGrid< dim >::YGridLevel::vertex_interiorborder, Dune::YaspGrid< dim >::YGridLevel::vertex_overlap, and Dune::YaspGrid< dim >::YGridLevel::vertex_overlapfront.

Referenced by Dune::YaspGrid< dim >::globalRefine(), Dune::YaspGrid< dim >::MultiYGridSetup(), and Dune::YaspGrid< dim >::YaspGrid().

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

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]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
  • On yaspgrid marking one element will mark all other elements of the level as well
  • If refCount is lower than refCount of a previous mark-call, nothing is changed

References Dune::Alberta::max(), and Dune::YaspGrid< dim >::maxLevel().

template<int dim>
int Dune::YaspGrid< dim >::maxLevel ( ) const
inline
template<int dim>
void Dune::YaspGrid< dim >::MultiYGridSetup ( fTupel  L,
iTupel  s,
std::bitset< dim >  periodic,
int  overlap,
const YLoadBalance< dim > *  lb = defaultLoadbalancer() 
)
inline

The constructor of the old MultiYGrid class.

References Dune::YaspGrid< dim >::makelevel().

Referenced by Dune::YaspGrid< dim >::YaspGrid().

template<int dim>
void Dune::YaspGrid< dim >::MultiYGridSetup ( fTupel  L,
Dune::array< int, dim >  s,
std::bitset< dim >  periodic,
int  overlap,
const YLoadBalance< dim > *  lb = defaultLoadbalancer() 
)
inline

The constructor of the old MultiYGrid class.

References Dune::YaspGrid< dim >::makelevel().

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

References Dune::YaspGrid< dim >::begin().

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

return size (= distance in graph) of overlap region

References Dune::YaspGrid< dim >::begin(), and Dune::YaspGrid< dim >::maxLevel().

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

clean up some markers

template<int dim>
bool Dune::YaspGrid< dim >::preAdapt ( )
inline

returns true, if the grid will be coarsened

References Dune::YaspGrid< dim >::comm().

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 Dune::YaspGrid< dim >::size ( int  level,
int  codim 
) const
inline

number of entities per level and codim in this process

Referenced by Dune::YaspGrid< dim >::boundarysegmentssize(), and Dune::YaspGrid< dim >::size().

template<int dim>
int Dune::YaspGrid< dim >::size ( int  codim) const
inline

number of leaf entities per codim in this process

References Dune::YaspGrid< dim >::maxLevel().

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 Dune::YaspGrid< dim >::size ( GeometryType  type) const
inline

number of leaf entities per geometry type in this process

References Dune::YaspGrid< dim >::maxLevel(), and Dune::YaspGrid< dim >::size().

template<int dim>
const Torus<dim>& Dune::YaspGrid< dim >::torus ( ) const
inline

return reference to torus

Referenced by Dune::YaspGrid< dim >::communicateCodim().

Friends And Related Function Documentation

template<int dim>
friend class Dune::YaspEntity< 0, dim, const Dune::YaspGrid< dim > >
friend
template<int dim>
template<int codim_, class GridImp_ >
friend class Dune::YaspEntityPointer
friend
template<int dim>
friend class Dune::YaspGlobalIdSet< const Dune::YaspGrid< dim > >
friend
template<int dim>
friend class Dune::YaspIndexSet< const Dune::YaspGrid< dim >, false >
friend
template<int dim>
friend class Dune::YaspIndexSet< const Dune::YaspGrid< dim >, true >
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>
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: