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 | |
int | getMark (const typename Traits::template Codim< 0 >::Entity &) 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 DataHandleImp, class DataTypeImp> | |
void | communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir, int level) const |
Communicate information on distributed entities on a given level Template parameter is a model of Dune::CommDataHandleIF. | |
template<class DataHandleImp, class DataTypeImp> | |
void | communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir) const |
Communicate information on distributed entities on the leaf grid. Template parameter is a model of Dune::CommDataHandleIF. | |
bool | loadBalance () |
Re-balances the load each process has to handle for a parallel grid, if grid has changed , true is returned. | |
template<class DataHandle> | |
bool | loadBalance (DataHandle &data) |
Re-balances the load each process has to handle for a parallel grid, if grid has changed , true is returned. | |
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 | |
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 (DataHandle &data) |
default implementation of load balance does nothing and returns false | |
Adaptivity and grid refinement | |
bool | mark (int refCount, const typename Codim< 0 >::EntityPointer &e) |
Marks an entity to be refined/coarsened in a subsequent adapt. | |
int | getMark (const typename Codim< 0 >::EntityPointer &e) const |
returns adaptation mark for given entity pointer | |
Protected Member Functions | |
ALU2dGrid (std::string macroTriangFilename) | |
ALU2dGrid (int) | |
Constructor which constructs an empty ALU2dGrid. | |
bool | nonConform () const |
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, alu2d_ctype, ALU2dGridFamily< dim, dimworld > >.
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
Reimplemented from Dune::GridDefaultImplementation< dim, dimworld, alu2d_ctype, ALU2dGridFamily< dim, dimworld > >.
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::ALU2dGrid< dim, dimworld >::nonConform | ( | ) | const [inline, protected] |
return true if grid allows hanging nodes on leaf level i.e. returns true for ALUSimplexGrid and returns false for ALUConformGrid
bool Dune::Grid< dim, dimworld, ct, GridFamily >::mark | ( | int | refCount, | |
const typename Codim< 0 >::EntityPointer & | 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.
int Dune::Grid< dim, dimworld, ct, GridFamily >::getMark | ( | const typename Codim< 0 >::EntityPointer & | e | ) | const [inline, inherited] |
returns adaptation mark for given entity pointer
- Parameters:
-
[in] e EntityPointer for which adaptation mark should be determined
- Returns:
- int adaptation mark currently set for given EntityPointer e
void Dune::GridDefaultImplementation< dim, dimworld, alu2d_ctype , ALU2dGridFamily< dim, dimworld > >::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::ALU2dGrid< 2, 2 >.
void Dune::GridDefaultImplementation< dim, dimworld, alu2d_ctype , ALU2dGridFamily< dim, dimworld > >::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::ALU2dGrid< 2, 2 >.
The documentation for this class was generated from the following files:
- alugrid/2d/grid.hh
- 2d/grid_imp.cc