Dune::ALU2dGrid< dim, dimworld > Class Template Reference
#include <grid.hh>
Inheritance diagram for Dune::ALU2dGrid< dim, dimworld >:

Detailed Description
template<int dim, int dimworld>
class Dune::ALU2dGrid< dim, dimworld >
[ provides Dune::Grid ] 2D grid, will provide non conform grids The ALU2dGrid implements the Dune GridInterface for 2d meshes. This grid can be locally adapted and will provide non conform grids.
- Note:
- Adaptive grid, written mainly by Bernard Schupp. This grid supports non conform grids.
Public Types | |
enum | { MAXL = 64 } |
maximal number of levels More... | |
enum | { newElementsChunk_ = 100 } |
element chunk for refinement More... | |
enum | { refineEstimate_ = 40 } |
upper estimate on number of elements that could be created when a new element is created More... | |
typedef ALU2dGridFamily< dim, dimworld >::Traits | Traits |
my Traits class | |
typedef ALU2dGridObjectStream | ObjectStreamType |
dummy object stream | |
typedef ALU2dGridFamily< dim, dimworld > | GridFamily |
my Traits class | |
typedef ALU2dGridHierarchicIndexSet< dim, dimworld > | HierarchicIndexSet |
Type of the hierarchic index set. | |
typedef ALU2dGridLocalIdSet< dim, dimworld > | LocalIdSetImp |
Type of the local id set. | |
typedef Traits::GlobalIdSet | GlobalIdSet |
Type of the global id set. | |
typedef Traits::LocalIdSet | LocalIdSet |
Type of the local id set. | |
typedef GridFamily::LevelIndexSetImp | LevelIndexSetImp |
Type of the level index set. | |
typedef GridFamily::LeafIndexSetImp | LeafIndexSetImp |
Type of the leaf index set. | |
typedef ALU2dGridLeafIterator< 0, All_Partition, const ThisType > | LeafIteratorImp |
a standard leaf iterator | |
typedef ALU2dGridLevelIterator< 0, All_Partition, const ThisType > | LevelIteratorImp |
a standard leaf iterator | |
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 ct | ctype |
Define type used for coordinates in grid module. | |
Public Member Functions | |
~ALU2dGrid () | |
Desctructor. | |
std::string | name () const |
for grid identification | |
int | maxLevel () const |
template<int cd, PartitionIteratorType pitype> | |
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator | lbegin (int level) const |
Iterator to first entity of codim 0 on level. | |
template<int cd, PartitionIteratorType pitype> | |
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator | lend (int level) const |
last entity of codim 0 on level | |
template<int cd> | |
Traits::template Codim< cd >::template Partition< All_Partition >::LevelIterator | lbegin (int level) const |
Iterator to first entity of given codim on level. | |
template<int cd> | |
Traits::template Codim< cd >::template Partition< All_Partition >::LevelIterator | lend (int level) const |
one past the end on this level | |
LevelIteratorType | lbegin (int level) const |
Iterator to first entity of codim 0 on level. | |
LevelIteratorType | lend (int level) const |
last entity of codim 0 on level | |
template<int codim, PartitionIteratorType pitype> | |
Traits::template Codim< codim >::template Partition< pitype >::LeafIterator | leafbegin () const |
Iterator to first entity of codim 0 on leaf level (All_Partition). | |
template<int codim, PartitionIteratorType pitype> | |
Traits::template Codim< codim >::template Partition< pitype >::LeafIterator | leafend () const |
one past the end on this leaf level (codim 0 and All_Partition) | |
template<int codim> | |
Traits::template Codim< codim >::LeafIterator | leafbegin () const |
General definiton for a leaf iterator. | |
template<int codim> | |
Traits::template Codim< codim >::LeafIterator | leafend () const |
General definition for an end iterator on leaf level. | |
int | size (int level, int cd) const |
number of grid entities per level and codim | |
int | size (int codim) const |
number of leaf entities per codim in this process | |
int | size (int level, GeometryType type) const |
number of entities per level, codim and geometry type in this process | |
int | size (GeometryType type) const |
number of leaf entities per codim and geometry type in this process | |
const std::vector< GeometryType > & | geomTypes (int codim) const |
deliver all geometry types used in this grid | |
const GlobalIdSet & | globalIdSet () const |
get global id set of grid | |
const LocalIdSet & | localIdSet () const |
get global id set of grid | |
int | hierSetSize (int cd) const |
number of grid entities in the entire grid for given codim | |
const HierarchicIndexSet & | hierarchicIndexSet () const |
get hierarchic index set of the grid | |
const Traits::LeafIndexSet & | leafIndexSet () const |
get leaf index set of the grid | |
const Traits::LevelIndexSet & | levelIndexSet (int level) const |
get level index set of the grid | |
bool | globalRefine (int refCount) |
refine grid refCount times | |
bool | preAdapt () |
returns true if a least one entity was marked for coarseing | |
void | postAdapt () |
clear all entity new markers | |
bool | adapt () |
template<class DofManagerType, class RestrictProlongOperatorType> | |
bool | adapt (DofManagerType &, RestrictProlongOperatorType &, bool verbose=false) |
adapt with DofManager | |
bool | refineGrid () |
refine grid | |
bool | mark (int refCount, const typename Traits::template Codim< 0 >::EntityPointer &ep) |
int | getMark (const typename Traits::template Codim< 0 >::EntityPointer &) const |
return current adaptation marker for entity pointer | |
const CollectiveCommunicationType & | comm () const |
return dummy communication | |
ALU2dGridMarkerVector & | getMarkerVector (int level) const |
ALU2dGridLeafMarkerVectorType & | getLeafMarker () const |
template<GrapeIOFileFormatType ftype> | |
bool | writeGrid (const std::string filename, alu2d_ctype time) const |
write Grid to file in specified FileFormatType | |
template<GrapeIOFileFormatType ftype> | |
bool | readGrid (const std::string filename, alu2d_ctype &time) |
read Grid from file filename and store time of mesh in time | |
template<class T> | |
bool | mark (int refCount, T &e) |
Marks an entity to be refined/coarsened in a subsequent adapt. | |
template<class T> | |
int | getMark (T &) const |
returns adaptation mark for given entity, i.e. here the default implementation returns 0. | |
int | ghostSize (int level, int codim) const |
ghostSize is zero by default | |
int | ghostSize (int codim) const |
ghostSize is zero by default | |
int | overlapSize (int level, int codim) const |
overlapSize is zero by default | |
int | overlapSize (int codim) const |
overlapSize is zero by default | |
template<class DataHandleImp, class DataTypeImp> | |
void | communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir, int level) const |
template<class DataHandleImp, class DataTypeImp> | |
void | communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir) const |
bool | loadBalance () |
default implementation of load balance does nothing and returns false | |
template<class DataHandle> | |
bool | loadBalance (DataHandle &data) |
default implementation of load balance does nothing and returns false | |
Protected Member Functions | |
ALU2dGrid (std::string macroTriangFilename) | |
ALU2dGrid (int) | |
Constructor which constructs an empty ALU2dGrid. | |
template<class InterfaceType> | |
ReturnImplementationType< InterfaceType >::ImplementationType & | getRealImplementation (InterfaceType &i) const |
return real implementation of interface class | |
GridImp & | asImp () |
Barton-Nackman trick. | |
const GridImp & | asImp () const |
Barton-Nackman trick. |
Member Enumeration Documentation
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum [inherited] |
anonymous enum [inherited] |
Constructor & Destructor Documentation
Dune::ALU2dGrid< dim, dimworld >::ALU2dGrid | ( | std::string | macroTriangFilename | ) | [inline, protected] |
Constructor which reads an ALU2dGrid Macro Triang file or given GridFile
Member Function Documentation
int Dune::ALU2dGrid< dim, dimworld >::maxLevel | ( | ) | const [inline] |
Return maximum level defined in this grid. Levels are numbered 0 ... maxLevel with 0 the coarsest level.
Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.
ALU2dGrid< dim, dimworld >::LevelIteratorType Dune::ALU2dGrid< dim, dimworld >::lbegin | ( | int | level | ) | const [inline] |
Iterator to first entity of codim 0 on level.
--Leveliterator Iterator to first entity of given codim on level
Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.
bool Dune::ALU2dGrid< dim, dimworld >::adapt | ( | ) | [inline] |
! refine all positive marked leaf entities, return true if a least one entity was refined
Reimplemented from Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >.
bool Dune::ALU2dGrid< dim, dimworld >::mark | ( | int | refCount, | |
const typename Traits::template Codim< 0 >::EntityPointer & | ep | |||
) | [inline] |
mark entities for refinement or coarsening, refCount < 0 will mark the entity for one coarsen step and refCount > 0 will mark for one refinement, one refinement will create 8 children per element
ALU2dGridMarkerVector& Dune::ALU2dGrid< dim, dimworld >::getMarkerVector | ( | int | level | ) | const [inline] |
return reference to vector telling on which element a face is visted for this level
ALU2dGridLeafMarkerVectorType& Dune::ALU2dGrid< dim, dimworld >::getLeafMarker | ( | ) | const [inline] |
return reference to vector determing on which element a face is visited
bool Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::mark | ( | int | refCount, | |
T & | e | |||
) | [inline, inherited] |
Marks an entity to be refined/coarsened in a subsequent adapt.
- Parameters:
-
[in] refCount Number of subdivisions that should be applied. Negative value means coarsening. [in] e EntityPointer 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 This template method will vanish due to the inheritance rules.
bool mark( int refCount, typename Traits::template Codim<0>::EntityPointer & e ).
Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.
int Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::getMark | ( | T & | ) | const [inline, inherited] |
returns adaptation mark for given entity, i.e. here the default implementation returns 0.
- Parameters:
-
[in] e Entity for which adaptation mark should be determined
- Returns:
- int adaptation mark, here the default value 0 is returned
Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.
void Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::communicate | ( | CommDataHandleIF< DataHandleImp, DataTypeImp > & | data, | |
InterfaceType | iftype, | |||
CommunicationDirection | dir, | |||
int | level | |||
) | const [inline, inherited] |
dummy communicate, doing nothing
Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.
Reimplemented in Dune::ALU3dGrid< 3, 3, Dune::hexa >, and Dune::ALU3dGrid< 3, 3, Dune::tetra >.
void Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::communicate | ( | CommDataHandleIF< DataHandleImp, DataTypeImp > & | data, | |
InterfaceType | iftype, | |||
CommunicationDirection | dir | |||
) | const [inline, inherited] |
dummy communicate, doing nothing
Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.
Reimplemented in Dune::ALU3dGrid< 3, 3, Dune::hexa >, and Dune::ALU3dGrid< 3, 3, Dune::tetra >.
The documentation for this class was generated from the following files:
- alugrid/2d/grid.hh
- 2d/grid_imp.cc