dune-grid
2.7.0
|
One-dimensional adaptive grid. More...
#include <dune/grid/onedgrid.hh>
Public Types | |
enum | RefinementType { LOCAL, COPY } |
The different forms of grid refinement supported by OneDGrid. More... | |
typedef OneDGridGeometry< 0, 1, OneDGrid >::ctype | ctype |
The type used to store coordinates. More... | |
typedef OneDGridFamily | GridFamily |
GridFamily of OneDGrid. More... | |
typedef OneDGridFamily::Traits | Traits |
Public Member Functions | |
OneDGrid (const std::vector< ctype > &coords) | |
Constructor with an explicit set of coordinates. More... | |
OneDGrid (int numElements, const ctype &leftBoundary, const ctype &rightBoundary) | |
Constructor for a uniform grid. More... | |
~OneDGrid () | |
Destructor. More... | |
int | maxLevel () const |
Return maximum level defined in this grid. More... | |
int | size (int level, int codim) const |
Number of grid entities per level and codim. More... | |
int | size (int codim) const |
number of leaf entities per codim in this process More... | |
int | size (int level, GeometryType type) const |
number of entities per level and geometry type in this process More... | |
int | size (GeometryType type) const |
number of leaf entities per geometry type in this process More... | |
size_t | numBoundarySegments () const |
Return the number of coarse grid boundary segments. More... | |
const Traits::GlobalIdSet & | globalIdSet () const |
Get the set of global ids. More... | |
const Traits::LocalIdSet & | localIdSet () const |
Get the set of local ids. More... | |
const Traits::LevelIndexSet & | levelIndexSet (int level) const |
Get an index set for the given level. More... | |
const Traits::LeafIndexSet & | leafIndexSet () const |
Get an index set for the leaf level. More... | |
bool | mark (int refCount, const Traits::Codim< 0 >::Entity &e) |
Mark entity for refinement. More... | |
int | getMark (const Traits::Codim< 0 >::Entity &e) const |
return current adaptation marker of given entity More... | |
bool | preAdapt () |
Does nothing except return true if some element has been marked for refinement. More... | |
bool | adapt () |
Triggers the grid refinement process. More... | |
void | postAdapt () |
Adaptation post-processing: Reset all adaptation state flags. More... | |
void | setRefinementType (RefinementType type) |
Sets the type of grid refinement. More... | |
void | globalRefine (int refCount) |
Does one uniform refinement step. More... | |
const CollectiveCommunication & | comm () const |
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... | |
int | getMark (const typename Traits::template Codim< 0 >::Entity &e) const |
returns adaptation mark for given entity, i.e. here the default implementation returns 0. More... | |
bool | 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... | |
Static Public Member Functions | |
template<typename Seed > | |
static Traits::template Codim< Seed::codimension >::Entity | entity (const Seed &seed) |
Create an Entity from an EntitySeed. More... | |
Protected Member Functions | |
DUNE_DEPRECATED_MSG ("use the facade class' `impl()` method instead") static typename std | |
return real implementation of interface class More... | |
One-dimensional adaptive grid.
[ provides Dune::Grid ]
This implementation of the grid interface provides one-dimensional grids only. The OneDGrid can be nonuniform and provides local mesh refinement and coarsening.
typedef OneDGridGeometry<0,1,OneDGrid>::ctype Dune::OneDGrid::ctype |
The type used to store coordinates.
GridFamily of OneDGrid.
The different forms of grid refinement supported by OneDGrid.
Enumerator | |
---|---|
LOCAL | New level consists only of the refined elements. |
COPY | New level consists of the refined elements and the unrefined ones, too. |
Dune::OneDGrid::OneDGrid | ( | const std::vector< ctype > & | coords | ) |
Constructor with an explicit set of coordinates.
Dune::OneDGrid::OneDGrid | ( | int | numElements, |
const ctype & | leftBoundary, | ||
const ctype & | rightBoundary | ||
) |
Constructor for a uniform grid.
Dune::OneDGrid::~OneDGrid | ( | ) |
Destructor.
bool Dune::OneDGrid::adapt | ( | ) |
Triggers the grid refinement process.
|
inline |
|
inlineprotectedinherited |
return real implementation of interface class
|
inlinestatic |
Create an Entity from an EntitySeed.
int Dune::OneDGrid::getMark | ( | const Traits::Codim< 0 >::Entity & | e | ) | const |
return current adaptation marker of given entity
e | Entity to the entity you want to mark |
|
inlineinherited |
returns adaptation mark for given entity, i.e. here the default implementation returns 0.
[in] | e | Entity for which adaptation mark should be determined |
|
inline |
Get the set of global ids.
void Dune::OneDGrid::globalRefine | ( | int | refCount | ) |
Does one uniform refinement step.
refCount | I don't know what this is good for. It doesn't actually do anything. |
|
inlineinherited |
View for the leaf grid for All_Partition.
|
inline |
Get an index set for the leaf level.
|
inlineinherited |
View for a grid level for All_Partition.
|
inline |
Get an index set for the given level.
|
inlineinherited |
default implementation of load balance does nothing and returns false
|
inlineinherited |
default implementation of load balance does nothing and returns false
|
inline |
Get the set of local ids.
bool Dune::OneDGrid::mark | ( | int | refCount, |
const Traits::Codim< 0 >::Entity & | e | ||
) |
Mark entity for refinement.
refCount | if >0 mark for refinement, if <0 mark for coarsening |
e | Entity to the entity you want to mark |
|
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 to Entity that should be refined |
|
inline |
Return maximum level defined in this grid.
Levels are numbered 0 ... maxlevel with 0 the coarsest level.
|
inline |
Return the number of coarse grid boundary segments.
For this grid implementation, the return value is always 2, because only connected domains are supported, and then the coarse grid boundary consists of two points.
void Dune::OneDGrid::postAdapt | ( | ) |
Adaptation post-processing: Reset all adaptation state flags.
bool Dune::OneDGrid::preAdapt | ( | ) |
Does nothing except return true if some element has been marked for refinement.
|
inline |
Sets the type of grid refinement.
|
inline |
number of leaf entities per geometry type in this process
|
inline |
number of leaf entities per codim in this process
|
inline |
number of entities per level and geometry type in this process
|
inline |
Number of grid entities per level and codim.