dune-grid
2.2.1
|
[ provides Dune::Grid ] More...
#include <dune/grid/yaspgrid.hh>
Public Types | |
enum | { MAXL =64 } |
maximum number of levels allowed More... | |
typedef yaspgrid_ctype | ctype |
define type used for coordinates in grid module More... | |
typedef bigunsignedint< dim *yaspgrid_dim_bits+yaspgrid_level_bits+yaspgrid_codim_bits > | PersistentIndexType |
typedef YaspGridFamily< dim, dim > | GridFamily |
the GridFamily of this grid More... | |
typedef YaspGridFamily< dim, dim >::Traits | Traits |
typedef YaspLevelIndexSet < YaspGrid< dim > > | LevelIndexSetType |
typedef YaspLeafIndexSet < YaspGrid< dim > > | LeafIndexSetType |
typedef YaspGlobalIdSet < YaspGrid< dim > > | GlobalIdSetType |
typedef MultiYGrid< dim, ctype > | YMG |
shorthand for base class data types More... | |
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 |
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 | |
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=YMG::defaultLoadbalancer()) | |
~YaspGrid () | |
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::GlobalIdSet & | globalIdSet () const |
const Traits::LocalIdSet & | localIdSet () const |
const Traits::LevelIndexSet & | levelIndexSet (int level) const |
const Traits::LeafIndexSet & | leafIndexSet () const |
const CollectiveCommunication < MPI_Comm > & | comm () const |
return a collective communication object More... | |
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. 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... | |
void | communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir, int level) const |
void | communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir) const |
bool | loadBalance () |
default implementation of load balance does nothing and returns false More... | |
bool | loadBalance (DataHandle &data) |
default implementation of load balance does nothing and returns false More... | |
template<class EntitySeed > | |
Codim< EntitySeed::codimension > ::EntityPointer | entityPointer (const EntitySeed &seed) const |
obtain EntityPointer from EntitySeed. More... | |
Adaptivity and grid refinement | |
bool | mark (int refCount, const typename Codim< 0 >::Entity &e) |
Marks an entity to be refined/coarsened in a subsequent adapt. More... | |
int | getMark (const typename Codim< 0 >::Entity &e) const |
returns adaptation mark for given entity More... | |
Protected Member Functions | |
GridImp & | asImp () |
Barton-Nackman trick. More... | |
const GridImp & | asImp () const |
Barton-Nackman trick. More... | |
Static Protected Member Functions | |
static ReturnImplementationType < InterfaceType > ::ImplementationType & | getRealImplementation (InterfaceType &i) |
return real implementation of interface class More... | |
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 > > |
template<int codim_, int dim_, class GridImp_ , template< int, int, class > class EntityImp_> | |
class | Entity |
[ 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.
dim | The dimension of the grid and its surrounding world |
|
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.
typedef yaspgrid_ctype Dune::YaspGrid< dim >::ctype |
define type used for coordinates in grid module
|
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.
typedef YaspGlobalIdSet<YaspGrid<dim> > Dune::YaspGrid< dim >::GlobalIdSetType |
typedef YaspGridFamily<dim,dim> Dune::YaspGrid< dim >::GridFamily |
the GridFamily of this grid
|
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.
typedef MultiYGrid<dim,ctype>::Intersection Dune::YaspGrid< dim >::IS |
typedef std::deque<IS>::const_iterator Dune::YaspGrid< dim >::ISIT |
|
inherited |
|
inherited |
A type that is a model of Dune::IndexSet which provides a consecutive, but non persistent, numbering for entities in the leaf grid.
typedef YaspLeafIndexSet<YaspGrid<dim> > Dune::YaspGrid< dim >::LeafIndexSetType |
|
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.
|
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.
|
inherited |
View types for All_Partition.
|
inherited |
A type that is a model of Dune::IndexSet which provides a consecutive, but non persistent, numbering for entities on a grid level.
typedef YaspLevelIndexSet<YaspGrid<dim> > Dune::YaspGrid< dim >::LevelIndexSetType |
|
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.
|
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.
|
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.
typedef bigunsignedint<dim*yaspgrid_dim_bits+yaspgrid_level_bits+yaspgrid_codim_bits> Dune::YaspGrid< dim >::PersistentIndexType |
typedef YaspGridFamily<dim,dim>::Traits Dune::YaspGrid< dim >::Traits |
typedef SubYGrid<dim,ctype>::TransformingSubIterator Dune::YaspGrid< dim >::TSI |
typedef MultiYGrid<dim,ctype>::YGridLevelIterator Dune::YaspGrid< dim >::YGLI |
typedef MultiYGrid<dim,ctype> Dune::YaspGrid< dim >::YMG |
shorthand for base class data types
|
inherited |
|
inherited |
|
inline |
Constructor for a YaspGrid, they are all forwarded to the base class
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 |
|
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.
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 |
|
inline |
|
inline |
map adapt to global refine
References Dune::YaspGrid< dim >::globalRefine().
|
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 >::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 >::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().
|
inlineprotectedinherited |
Barton-Nackman trick.
|
inline |
return a collective communication object
Referenced by Dune::YaspGrid< dim >::preAdapt().
|
inlineinherited |
dummy communicate, doing nothing
|
inlineinherited |
dummy communicate, doing nothing
|
inline |
The new communication interface
communicate objects for all codims on a given level
References Dune::YaspCommunicateMeta< dim, codim >::comm().
|
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().
|
inline |
The new communication interface
communicate objects for one codim
References Dune::All_All_Interface, Dune::BackwardCommunication, Dune::InteriorBorder_All_Interface, Dune::InteriorBorder_InteriorBorder_Interface, Dune::Overlap_All_Interface, and Dune::Overlap_OverlapFront_Interface.
|
inlineinherited |
obtain EntityPointer from EntitySeed.
References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp().
|
inline |
|
inlineinherited |
returns adaptation mark for given entity
[in] | e | Entity for which adaptation mark should be determined |
References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp().
|
inline |
returns adaptation mark for given entity
[in] | e | Entity for which adaptation mark should be determined |
References Dune::YaspGrid< dim >::maxLevel().
|
inlinestaticprotectedinherited |
return real implementation of interface class
Referenced by Dune::YaspGrid< dim >::getRealIntersectionIterator().
|
inline |
|
inline |
|
inline |
return size (= distance in graph) of ghost region
|
inline |
return size (= distance in graph) of ghost region
|
inline |
|
inline |
refine the grid refCount times. What about overlap?
References Dune::YaspGrid< dim >::maxLevel().
Referenced by Dune::YaspGrid< dim >::adapt().
|
inline |
one past the end on this level
|
inline |
version without second template parameter for convenience
|
inline |
return LeafIterator which points to the first entity in maxLevel
References Dune::YaspGrid< dim >::maxLevel().
|
inline |
return LeafIterator which points to the first entity in maxLevel
References Dune::YaspGrid< dim >::maxLevel().
|
inline |
return LeafIterator which points behind the last entity in maxLevel
References Dune::YaspGrid< dim >::maxLevel().
|
inline |
return LeafIterator which points behind the last entity in maxLevel
References Dune::YaspGrid< dim >::maxLevel().
|
inline |
|
inlineinherited |
View for the leaf grid.
|
inlineinherited |
View for the leaf grid for All_Partition.
|
inline |
Iterator to one past the last entity of given codim on level for partition type.
|
inline |
version without second template parameter for convenience
|
inline |
References Dune::YaspGrid< dim >::maxLevel().
|
inlineinherited |
View for a grid level.
|
inlineinherited |
View for a grid level for All_Partition.
|
inlineinherited |
default implementation of load balance does nothing and returns false
|
inlineinherited |
default implementation of load balance does nothing and returns false
|
inline |
|
inlineinherited |
Marks an entity to be refined/coarsened in a subsequent adapt.
[in] | refCount | Number of subdivisions that should be applied. Negative value means coarsening. |
[in] | e | Entity that should be marked |
References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp().
|
inline |
Marks an entity to be refined/coarsened in a subsequent adapt.
[in] | refCount | Number of subdivisions that should be applied. Negative value means coarsening. |
[in] | e | Entity to Entity that should be refined |
References Dune::Alberta::max(), and Dune::YaspGrid< dim >::maxLevel().
|
inline |
Return maximum level defined in this grid. Levels are numbered 0 ... maxlevel with 0 the coarsest level.
Referenced by Dune::YaspGrid< dim >::communicate(), Dune::YaspGrid< dim >::getMark(), Dune::YaspGrid< dim >::globalRefine(), Dune::YaspGrid< dim >::leafbegin(), Dune::YaspGrid< dim >::leafend(), Dune::YaspGrid< dim >::levelIndexSet(), Dune::YaspGrid< dim >::mark(), Dune::YaspGrid< dim >::overlapSize(), and Dune::YaspGrid< dim >::size().
|
inline |
returns the number of boundary segments within the macro grid
|
inline |
return size (= distance in graph) of overlap region
|
inline |
return size (= distance in graph) of overlap region
References Dune::YaspGrid< dim >::maxLevel().
|
inline |
clean up some markers
|
inline |
returns true, if the grid will be coarsened
References Dune::YaspGrid< dim >::comm().
|
inline |
set options for refinement
keepPhysicalOverlap | [true] keep the physical size of the overlap, [false] keep the number of cells in the overlap. Default is [true]. |
|
inline |
number of entities per level and codim in this process
Referenced by Dune::YaspGrid< dim >::size().
|
inline |
number of leaf entities per codim in this process
References Dune::YaspGrid< dim >::maxLevel().
|
inline |
number of entities per level and geometry type in this process
|
inline |
number of leaf entities per geometry type in this process
References Dune::YaspGrid< dim >::maxLevel(), and Dune::YaspGrid< dim >::size().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |