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

[ provides Dune::Grid ] More...

#include <dune/grid/yaspgrid.hh>

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

Public Types

typedef Coordinates::ctype ctype
 Type used for coordinates. More...
 
using Communication = typename Base::Communication
 
using CollectiveCommunicationType = typename Base::Communication
 
typedef ReservedVector< YGridLevel, 32 >::const_iterator YGridLevelIterator
 Iterator over the grid levels. More...
 
typedef bigunsignedint< dim *yaspgrid_dim_bits+yaspgrid_level_bits+dim > PersistentIndexType
 
typedef YaspGridFamily< dim, Coordinates > GridFamily
 the GridFamily of this grid More...
 
typedef YaspGridFamily< dim, Coordinates >::Traits Traits
 
typedef YaspIndexSet< YaspGrid< dim, Coordinates >, false > LevelIndexSetType
 
typedef YaspIndexSet< YaspGrid< dim, Coordinates >, true > LeafIndexSetType
 
typedef YaspGlobalIdSet< YaspGrid< dim, Coordinates > > GlobalIdSetType
 

Public Member Functions

const Torus< Communication, dim > & torus () const
 return reference to torus More...
 
int globalSize (int i) const
 return number of cells on finest level in given direction on all processors More...
 
iTupel globalSize () const
 return number of cells on finest level on all processors More...
 
int levelSize (int l, int i) const
 return size of the grid (in cells) on level l in direction i More...
 
iTupel levelSize (int l) const
 return size vector of the grid (in cells) on level l More...
 
bool isPeriodic (int i) const
 return whether the grid is periodic in direction i More...
 
bool getRefineOption () const
 
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...
 
 YaspGrid (const Coordinates &coordinates, std::bitset< dim > periodic=std::bitset< dim >(0ULL), int overlap=1, Communication comm=Communication(), const Yasp::Partitioning< dim > *partitioner=defaultPartitioner())
 
template<class C = Coordinates, typename std::enable_if_t< std::is_same_v< C, EquidistantCoordinates< ctype, dim > >, int > = 0>
 YaspGrid (Dune::FieldVector< ctype, dim > L, std::array< int, std::size_t{dim}> s, std::bitset< std::size_t{dim}> periodic=std::bitset< std::size_t{dim}>{0ULL}, int overlap=1, Communication comm=Communication(), const Yasp::Partitioning< dim > *partitioner=defaultPartitioner())
 
template<class C = Coordinates, typename std::enable_if_t< std::is_same_v< C, EquidistantOffsetCoordinates< ctype, dim > >, int > = 0>
 YaspGrid (Dune::FieldVector< ctype, dim > lowerleft, Dune::FieldVector< ctype, dim > upperright, std::array< int, std::size_t{dim}> s, std::bitset< std::size_t{dim}> periodic=std::bitset< std::size_t{dim}>(0ULL), int overlap=1, Communication comm=Communication(), const Yasp::Partitioning< dim > *partitioner=defaultPartitioner())
 
template<class C = Coordinates, typename std::enable_if_t< std::is_same_v< C, TensorProductCoordinates< ctype, dim > >, int > = 0>
 YaspGrid (std::array< std::vector< ctype >, std::size_t{dim}> coords, std::bitset< std::size_t{dim}> periodic=std::bitset< std::size_t{dim}>(0ULL), int overlap=1, Communication comm=Communication(), const Yasp::Partitioning< dim > *partitioner=defaultPartitioner())
 Standard constructor for a tensorproduct YaspGrid. More...
 
int maxLevel () const
 
void globalRefine (int refCount)
 refine the grid refCount times. 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 >::Entity entity (const Seed &seed) const
 
int overlapSize (int level, int codim) const
 return size (= distance in graph) of overlap region More...
 
int overlapSize (int odim) 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...
 
const Dune::FieldVector< ctype, dim > & domainSize () const
 returns the size of the physical domain 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 Communicationcomm () const
 return a communication object More...
 
Traits::LevelGridView levelGridView (int level) const
 View for a grid level for All_Partition. More...
 
Traits::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...
 
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...
 
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 YLoadBalanceDefault< dim > * defaultLoadbalancer ()
 
static const Yasp::Partitioning< dim > * defaultPartitioner ()
 

Static Public Attributes

Exported constants
static constexpr int dimension
 The dimension of the grid. More...
 
static constexpr int dimensionworld
 The dimension of the world the grid lives in. More...
 

Protected Types

typedef const YaspGrid< dim, Coordinates > GridImp
 

Protected Member Functions

void makelevel (const Coordinates &coords, std::bitset< dim > periodic, iTupel o_interior, int overlap)
 Make a new YGridLevel structure. More...
 
void intersections (const YGridComponent< Coordinates > &sendgrid, const YGridComponent< Coordinates > &recvgrid, std::deque< Intersection > &sendlist, std::deque< Intersection > &recvlist)
 Construct list of intersections with neighboring processors. More...
 
void init ()
 
void boundarysegmentssize ()
 

Exported types

typedef GridFamily::Traits::LeafGridView LeafGridView
 type of view for leaf grid More...
 
typedef GridFamily::Traits::LevelGridView LevelGridView
 type of view for level grid More...
 
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...
 
using CollectiveCommunication = Communication
 
using Communication_t = typename T::Communication
 
using DeprecatedCollectiveCommunication_t = typename T::CollectiveCommunication
 

Parallel data distribution and communication

Codim< EntitySeed::codimension >::Entity entity (const EntitySeed &seed) const
 obtain Entity from EntitySeed. More...
 
GridImpasImp ()
 Barton-Nackman trick. More...
 
const GridImpasImp () const
 Barton-Nackman trick. More...
 

Detailed Description

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
class Dune::YaspGrid< dim, Coordinates >

[ 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 arbitrary overlap (including zero), periodic boundaries, and a fast implementation allowing on-the-fly computations.

YaspGrid supports three coordinate modes: EquidistantCoordinates, EquidistantOffsetCoordinates, and Dune::TensorProductCoordinates.

Template Parameters
dimThe dimension of the grid and its surrounding world
CoordinatesThe coordinate mode of the grid.
Examples
recipe-integration.cc, and recipe-iterate-over-grid.cc.

Member Typedef Documentation

◆ CollectiveCommunication

using Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::CollectiveCommunication = Communication
inherited
Deprecated:
Use Communication instead! Will be removed at some point in the future.

◆ CollectiveCommunicationType

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
using Dune::YaspGrid< dim, Coordinates >::CollectiveCommunicationType = typename Base::Communication

◆ Communication

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
using Dune::YaspGrid< dim, Coordinates >::Communication = typename Base::Communication

◆ Communication_t

using Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::Communication_t = typename T::Communication
protectedinherited

◆ ctype

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
typedef Coordinates::ctype Dune::YaspGrid< dim, Coordinates >::ctype

Type used for coordinates.

◆ DeprecatedCollectiveCommunication_t

using Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::DeprecatedCollectiveCommunication_t = typename T::CollectiveCommunication
protectedinherited

◆ GlobalIdSet

typedef GridFamily::Traits::GlobalIdSet Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::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.

◆ GlobalIdSetType

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
typedef YaspGlobalIdSet<YaspGrid<dim, Coordinates> > Dune::YaspGrid< dim, Coordinates >::GlobalIdSetType

◆ GridFamily

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
typedef YaspGridFamily<dim, Coordinates> Dune::YaspGrid< dim, Coordinates >::GridFamily

the GridFamily of this grid

◆ GridImp

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
typedef const YaspGrid<dim,Coordinates> Dune::YaspGrid< dim, Coordinates >::GridImp
protected

◆ HierarchicIterator

typedef GridFamily::Traits::HierarchicIterator Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::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.

◆ LeafGridView

typedef GridFamily::Traits::LeafGridView Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::LeafGridView
inherited

type of view for leaf grid

◆ LeafIndexSet

typedef GridFamily::Traits::LeafIndexSet Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::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.

◆ LeafIndexSetType

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
typedef YaspIndexSet<YaspGrid<dim, Coordinates>, true > Dune::YaspGrid< dim, Coordinates >::LeafIndexSetType

◆ LeafIntersection

typedef GridFamily::Traits::LeafIntersection Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::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.

◆ LeafIntersectionIterator

typedef GridFamily::Traits::LeafIntersectionIterator Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::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.

◆ LevelGridView

typedef GridFamily::Traits::LevelGridView Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::LevelGridView
inherited

type of view for level grid

◆ LevelIndexSet

typedef GridFamily::Traits::LevelIndexSet Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::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.

◆ LevelIndexSetType

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
typedef YaspIndexSet<YaspGrid<dim, Coordinates>, false > Dune::YaspGrid< dim, Coordinates >::LevelIndexSetType

◆ LevelIntersection

typedef GridFamily::Traits::LevelIntersection Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::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.

◆ LevelIntersectionIterator

typedef GridFamily::Traits::LevelIntersectionIterator Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::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.

◆ LocalIdSet

typedef GridFamily::Traits::LocalIdSet Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::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.

◆ PersistentIndexType

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
typedef bigunsignedint<dim*yaspgrid_dim_bits+yaspgrid_level_bits+dim> Dune::YaspGrid< dim, Coordinates >::PersistentIndexType

◆ Traits

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
typedef YaspGridFamily<dim,Coordinates>::Traits Dune::YaspGrid< dim, Coordinates >::Traits

◆ YGridLevelIterator

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
typedef ReservedVector<YGridLevel,32>::const_iterator Dune::YaspGrid< dim, Coordinates >::YGridLevelIterator

Iterator over the grid levels.

Constructor & Destructor Documentation

◆ YaspGrid() [1/4]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
Dune::YaspGrid< dim, Coordinates >::YaspGrid ( const Coordinates &  coordinates,
std::bitset< dim >  periodic = std::bitset<dim>(0ULL),
int  overlap = 1,
Communication  comm = Communication(),
const Yasp::Partitioning< dim > *  partitioner = defaultPartitioner() 
)
inline

Standard constructor for a YaspGrid with a given Coordinates object

Parameters
coordinatesObject that stores or computes the vertex coordinates
periodictells if direction is periodic or not
overlapsize of overlap on coarsest grid (same in all directions)
commthe communication object for this grid. An MPI communicator can be given here.
partitionerpointer to an overloaded Yasp::Partitioning instance

◆ YaspGrid() [2/4]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
template<class C = Coordinates, typename std::enable_if_t< std::is_same_v< C, EquidistantCoordinates< ctype, dim > >, int > = 0>
Dune::YaspGrid< dim, Coordinates >::YaspGrid ( Dune::FieldVector< ctype, dim >  L,
std::array< int, std::size_t{dim}>  s,
std::bitset< std::size_t{dim}>  periodic = std::bitset<std::size_t{dim}>{0ULL},
int  overlap = 1,
Communication  comm = Communication(),
const Yasp::Partitioning< dim > *  partitioner = defaultPartitioner() 
)
inline

Standard constructor for an equidistant YaspGrid

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)
commthe communication object for this grid. An MPI communicator can be given here.
partitionerpointer to an overloaded Yasp::Partitioning instance

◆ YaspGrid() [3/4]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
template<class C = Coordinates, typename std::enable_if_t< std::is_same_v< C, EquidistantOffsetCoordinates< ctype, dim > >, int > = 0>
Dune::YaspGrid< dim, Coordinates >::YaspGrid ( Dune::FieldVector< ctype, dim >  lowerleft,
Dune::FieldVector< ctype, dim >  upperright,
std::array< int, std::size_t{dim}>  s,
std::bitset< std::size_t{dim}>  periodic = std::bitset<std::size_t{dim}>(0ULL),
int  overlap = 1,
Communication  comm = Communication(),
const Yasp::Partitioning< dim > *  partitioner = defaultPartitioner() 
)
inline

Constructor for an equidistant YaspGrid with non-trivial origin

Parameters
lowerleftLower left corner of the domain
upperrightUpper right corner 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)
commthe communication object for this grid. An MPI communicator can be given here.
partitionerpointer to an overloaded Yasp::Partitioning instance

◆ YaspGrid() [4/4]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
template<class C = Coordinates, typename std::enable_if_t< std::is_same_v< C, TensorProductCoordinates< ctype, dim > >, int > = 0>
Dune::YaspGrid< dim, Coordinates >::YaspGrid ( std::array< std::vector< ctype >, std::size_t{dim}>  coords,
std::bitset< std::size_t{dim}>  periodic = std::bitset<std::size_t{dim}>(0ULL),
int  overlap = 1,
Communication  comm = Communication(),
const Yasp::Partitioning< dim > *  partitioner = defaultPartitioner() 
)
inline

Standard constructor for a tensorproduct YaspGrid.

Parameters
coordscoordinate vectors to be used for coarse grid
periodictells if direction is periodic or not
overlapsize of overlap on coarsest grid (same in all directions)
commthe communication object for this grid. An MPI communicator can be given here.
partitionerpointer to an overloaded Yasp::Partitioning instance

Member Function Documentation

◆ adapt()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
bool Dune::YaspGrid< dim, Coordinates >::adapt ( )
inline

map adapt to global refine

◆ asImp() [1/2]

GridImp & Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::asImp ( )
inlineprotectedinherited

Barton-Nackman trick.

◆ asImp() [2/2]

const GridImp & Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::asImp ( ) const
inlineprotectedinherited

Barton-Nackman trick.

◆ begin() [1/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
YGridLevelIterator Dune::YaspGrid< dim, Coordinates >::begin ( ) const
inline

return iterator pointing to coarsest level

◆ begin() [2/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
YGridLevelIterator Dune::YaspGrid< dim, Coordinates >::begin ( int  i) const
inline

return iterator pointing to given level

◆ boundarysegmentssize()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
void Dune::YaspGrid< dim, Coordinates >::boundarysegmentssize ( )
inlineprotected

◆ comm()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
const Communication & Dune::YaspGrid< dim, Coordinates >::comm ( ) const
inline

return a communication object

◆ communicate() [1/2]

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

The new communication interface

communicate objects for all codims on the leaf grid

◆ communicate() [2/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
template<class DataHandleImp , class DataType >
void Dune::YaspGrid< dim, Coordinates >::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

◆ communicateCodim()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
template<class DataHandle , int codim>
void Dune::YaspGrid< dim, Coordinates >::communicateCodim ( DataHandle &  data,
InterfaceType  iftype,
CommunicationDirection  dir,
int  level 
) const
inline

The new communication interface

communicate objects for one codim

◆ defaultLoadbalancer()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
static const YLoadBalanceDefault< dim > * Dune::YaspGrid< dim, Coordinates >::defaultLoadbalancer ( )
inlinestatic

◆ defaultPartitioner()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
static const Yasp::Partitioning< dim > * Dune::YaspGrid< dim, Coordinates >::defaultPartitioner ( )
inlinestatic

◆ domainSize()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
const Dune::FieldVector< ctype, dim > & Dune::YaspGrid< dim, Coordinates >::domainSize ( ) const
inline

returns the size of the physical domain

◆ end()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
YGridLevelIterator Dune::YaspGrid< dim, Coordinates >::end ( ) const
inline

return iterator pointing to one past the finest level

◆ entity() [1/2]

Codim< EntitySeed::codimension >::Entity Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::entity ( const EntitySeed seed) const
inlineinherited

obtain Entity from EntitySeed.

◆ entity() [2/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
template<typename Seed >
Traits::template Codim< Seed::codimension >::Entity Dune::YaspGrid< dim, Coordinates >::entity ( const Seed &  seed) const
inline

◆ getMark() [1/2]

int Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::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

◆ getMark() [2/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
int Dune::YaspGrid< dim, Coordinates >::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

◆ getRefineOption()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
bool Dune::YaspGrid< dim, Coordinates >::getRefineOption ( ) const
inline

◆ ghostSize() [1/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
int Dune::YaspGrid< dim, Coordinates >::ghostSize ( int  codim) const
inline

return size (= distance in graph) of ghost region

◆ ghostSize() [2/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
int Dune::YaspGrid< dim, Coordinates >::ghostSize ( int  level,
int  codim 
) const
inline

return size (= distance in graph) of ghost region

◆ globalIdSet()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
const Traits::GlobalIdSet & Dune::YaspGrid< dim, Coordinates >::globalIdSet ( ) const
inline

◆ globalRefine()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
void Dune::YaspGrid< dim, Coordinates >::globalRefine ( int  refCount)
inline

refine the grid refCount times.

◆ globalSize() [1/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
iTupel Dune::YaspGrid< dim, Coordinates >::globalSize ( ) const
inline

return number of cells on finest level on all processors

◆ globalSize() [2/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
int Dune::YaspGrid< dim, Coordinates >::globalSize ( int  i) const
inline

return number of cells on finest level in given direction on all processors

◆ init()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
void Dune::YaspGrid< dim, Coordinates >::init ( )
inlineprotected

◆ intersections()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
void Dune::YaspGrid< dim, Coordinates >::intersections ( const YGridComponent< Coordinates > &  sendgrid,
const YGridComponent< Coordinates > &  recvgrid,
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
sendlistthe deque to fill with send intersections
recvlistthe deque to fill with recv intersections
Returns
two lists: Intersections to be sent and Intersections to be received

◆ isPeriodic()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
bool Dune::YaspGrid< dim, Coordinates >::isPeriodic ( int  i) const
inline

return whether the grid is periodic in direction i

◆ lbegin() [1/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
template<int cd, PartitionIteratorType pitype>
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator Dune::YaspGrid< dim, Coordinates >::lbegin ( int  level) const
inline

one past the end on this level

◆ lbegin() [2/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
template<int cd>
Traits::template Codim< cd >::template Partition< All_Partition >::LevelIterator Dune::YaspGrid< dim, Coordinates >::lbegin ( int  level) const
inline

version without second template parameter for convenience

◆ leafbegin() [1/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
template<int cd, PartitionIteratorType pitype>
Traits::template Codim< cd >::template Partition< pitype >::LeafIterator Dune::YaspGrid< dim, Coordinates >::leafbegin ( ) const
inline

return LeafIterator which points to the first entity in maxLevel

◆ leafbegin() [2/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
template<int cd>
Traits::template Codim< cd >::template Partition< All_Partition >::LeafIterator Dune::YaspGrid< dim, Coordinates >::leafbegin ( ) const
inline

return LeafIterator which points to the first entity in maxLevel

◆ leafend() [1/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
template<int cd, PartitionIteratorType pitype>
Traits::template Codim< cd >::template Partition< pitype >::LeafIterator Dune::YaspGrid< dim, Coordinates >::leafend ( ) const
inline

return LeafIterator which points behind the last entity in maxLevel

◆ leafend() [2/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
template<int cd>
Traits::template Codim< cd >::template Partition< All_Partition >::LeafIterator Dune::YaspGrid< dim, Coordinates >::leafend ( ) const
inline

return LeafIterator which points behind the last entity in maxLevel

◆ leafGridView()

Traits::LeafGridView Dune::GridDefaultImplementation< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::leafGridView ( ) const
inlineinherited

View for the leaf grid for All_Partition.

◆ leafIndexSet()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
const Traits::LeafIndexSet & Dune::YaspGrid< dim, Coordinates >::leafIndexSet ( ) const
inline

◆ lend() [1/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
template<int cd, PartitionIteratorType pitype>
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator Dune::YaspGrid< dim, Coordinates >::lend ( int  level) const
inline

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

◆ lend() [2/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
template<int cd>
Traits::template Codim< cd >::template Partition< All_Partition >::LevelIterator Dune::YaspGrid< dim, Coordinates >::lend ( int  level) const
inline

version without second template parameter for convenience

◆ levelGridView()

Traits::LevelGridView Dune::GridDefaultImplementation< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::levelGridView ( int  level) const
inlineinherited

View for a grid level for All_Partition.

◆ levelIndexSet()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
const Traits::LevelIndexSet & Dune::YaspGrid< dim, Coordinates >::levelIndexSet ( int  level) const
inline

◆ levelSize() [1/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
iTupel Dune::YaspGrid< dim, Coordinates >::levelSize ( int  l) const
inline

return size vector of the grid (in cells) on level l

◆ levelSize() [2/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
int Dune::YaspGrid< dim, Coordinates >::levelSize ( int  l,
int  i 
) const
inline

return size of the grid (in cells) on level l in direction i

◆ loadBalance() [1/2]

bool Dune::GridDefaultImplementation< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::loadBalance ( )
inlineinherited

default implementation of load balance does nothing and returns false

◆ loadBalance() [2/2]

bool Dune::GridDefaultImplementation< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::loadBalance ( DataHandle &  data)
inlineinherited

default implementation of load balance does nothing and returns false

◆ localIdSet()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
const Traits::LocalIdSet & Dune::YaspGrid< dim, Coordinates >::localIdSet ( ) const
inline

◆ makelevel()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
void Dune::YaspGrid< dim, Coordinates >::makelevel ( const Coordinates &  coords,
std::bitset< dim >  periodic,
iTupel  o_interior,
int  overlap 
)
inlineprotected

Make a new YGridLevel structure.

Parameters
coordsthe coordinate container
periodicindicate periodicity for each direction
o_interiororigin of interior (non-overlapping) cell decomposition
overlapto be used on this grid level

◆ mark() [1/3]

bool Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::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.

◆ mark() [2/3]

bool Dune::GridDefaultImplementation< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::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 ).
    bool mark(int refCount, const typename Traits::template Codim< 0 >::Entity &e)
    Marks an entity to be refined/coarsened in a subsequent adapt.
    Definition: yaspgrid.hh:1293
    This template method will vanish due to the inheritance rules.

◆ mark() [3/3]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
bool Dune::YaspGrid< dim, Coordinates >::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

◆ maxLevel()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
int Dune::YaspGrid< dim, Coordinates >::maxLevel ( ) const
inline

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

◆ numBoundarySegments()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
size_t Dune::YaspGrid< dim, Coordinates >::numBoundarySegments ( ) const
inline

returns the number of boundary segments within the macro grid

◆ overlapSize() [1/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
int Dune::YaspGrid< dim, Coordinates >::overlapSize ( int  level,
int  codim 
) const
inline

return size (= distance in graph) of overlap region

◆ overlapSize() [2/2]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
int Dune::YaspGrid< dim, Coordinates >::overlapSize ( int  odim) const
inline

return size (= distance in graph) of overlap region

◆ postAdapt()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
void Dune::YaspGrid< dim, Coordinates >::postAdapt ( )
inline

clean up some markers

◆ preAdapt()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
bool Dune::YaspGrid< dim, Coordinates >::preAdapt ( )
inline

returns true, if the grid will be coarsened

◆ refineOptions()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
void Dune::YaspGrid< dim, Coordinates >::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].

◆ size() [1/4]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
int Dune::YaspGrid< dim, Coordinates >::size ( GeometryType  type) const
inline

number of leaf entities per geometry type in this process

◆ size() [2/4]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
int Dune::YaspGrid< dim, Coordinates >::size ( int  codim) const
inline

number of leaf entities per codim in this process

◆ size() [3/4]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
int Dune::YaspGrid< dim, Coordinates >::size ( int  level,
GeometryType  type 
) const
inline

number of entities per level and geometry type in this process

◆ size() [4/4]

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
int Dune::YaspGrid< dim, Coordinates >::size ( int  level,
int  codim 
) const
inline

number of entities per level and codim in this process

◆ torus()

template<int dim, class Coordinates = EquidistantCoordinates<double, dim>>
const Torus< Communication, dim > & Dune::YaspGrid< dim, Coordinates >::torus ( ) const
inline

return reference to torus

Member Data Documentation

◆ dimension

constexpr int Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::dimension
staticconstexprinherited

The dimension of the grid.

◆ dimensionworld

constexpr int Dune::Grid< dim, dimworld, Coordinates::ctype , YaspGridFamily< dim, EquidistantCoordinates< double, dim > > >::dimensionworld
staticconstexprinherited

The dimension of the world the grid lives in.


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