Dune::ALUCubeGrid< 3, 3 > Class Template Reference
[ALUCubeGrid]
#include <alugrid.hh>
Inheritance diagram for Dune::ALUCubeGrid< 3, 3 >:

Detailed Description
template<>
class Dune::ALUCubeGrid< 3, 3 >
[ provides Dune::Grid ] 3D grid with support for hexahedrons.
[ provides Dune::Grid ] 3D grid with support for hexahedrons.
The ALUCubeGrid implements the Dune GridInterface for 3d hexahedral meshes. This grid can be locally adapted (non-conforming) and used in parallel computations using dynamcic load balancing.
- Note:
- Adaptive parallel grid supporting dynamic load balancing, written mainly by Bernard Schupp. This grid supports hexahedrons - a 2d/3d simplex grid is also available via the grid implementation ALUSimplexGrid or ALUConformGrid.
Two tools are available for partitioning :
- Metis ( version 4.0 and higher, see http://www-users.cs.umn.edu/~karypis/metis/metis/ )
- Party Lib ( version 1.1 and higher, see http://wwwcs.upb.de/fachbereich/AG/monien/RESEARCH/PART/party.html)
- Available Implementations
Public Types | |||||||
typedef BaseType::ctype | ctype | ||||||
Define type used for coordinates in grid module. | |||||||
typedef GridFamily::Traits | Traits | ||||||
my Traits class | |||||||
typedef BaseType::LocalIdSetImp | 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, needed by data handle. | |||||||
typedef GridFamily::LeafIndexSetImp | LeafIndexSetImp | ||||||
Type of the leaf index set, needed by data handle. | |||||||
typedef BaseType::LeafIteratorImp | LeafIteratorImp | ||||||
a standard leaf iterator | |||||||
typedef ALU3dGridHierarchicIndexSet< dim, dimworld, elType > | HierarchicIndexSet | ||||||
Type of the hierarchic index set. | |||||||
typedef SelectType< elType==tetra, ReferenceSimplex< alu3d_ctype, dim >, ReferenceCube< alu3d_ctype, dim > >::Type | ReferenceElementType | ||||||
reference element type | |||||||
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... | |||||||
Public Member Functions | |||||||
ALUCubeGrid (const std::string macroName, int mpiComm=0) | |||||||
constructor for creating ALUCubeGrid from given macro grid file | |||||||
ALUCubeGrid (int myrank=-1) | |||||||
constructor creating empty grid | |||||||
std::string | name () const | ||||||
for grid identification | |||||||
int | maxLevel () const | ||||||
Return maximum level defined in this grid. Levels are numbered maxLevel with 0 the coarsest level. | |||||||
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator | lbegin (int level) const | ||||||
Iterator to first entity of given codim on level. | |||||||
Traits::template Codim< cd >::template Partition< All_Partition >::LevelIterator | lbegin (int level) const | ||||||
Iterator to first entity of given codim on level. | |||||||
Traits::template Codim< cd >::template Partition< pitype >::LevelIterator | lend (int level) const | ||||||
one past the end on this level | |||||||
Traits::template Codim< cd >::template Partition< All_Partition >::LevelIterator | lend (int level) const | ||||||
one past the end on this level | |||||||
Traits::template Codim< codim >::template Partition< pitype >::LeafIterator | leafbegin () const | ||||||
General definiton for a leaf iterator. | |||||||
Traits::template Codim< codim >::LeafIterator | leafbegin () const | ||||||
General definiton for a leaf iterator. | |||||||
Traits::template Codim< codim >::template Partition< pitype >::LeafIterator | leafend () const | ||||||
General definition for an end iterator on leaf level. | |||||||
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 and geometry type in this process | |||||||
int | size (GeometryType type) const | ||||||
number of leaf entities per geometry type in this process | |||||||
int | global_size (int cd) const | ||||||
number of grid entities on all levels for given codim | |||||||
const GlobalIdSet & | globalIdSet () const | ||||||
get global id set of grid | |||||||
const LocalIdSet & | localIdSet () const | ||||||
get global id set of 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 | loadBalance () | ||||||
Calculates load of each process and repartition the grid if neccessary. For parameters of the load balancing process see the README file of the ALUGrid package. | |||||||
bool | loadBalance (DataHandle &data) | ||||||
Calculates load of each process and repartition the grid if neccessary. For parameters of the load balancing process see the README file of the ALUGrid package. | |||||||
int | ghostSize (int level, int codim) const | ||||||
ghostSize is one for codim 0 and zero otherwise for this grid | |||||||
int | ghostSize (int codim) const | ||||||
ghostSize is one for codim 0 and zero otherwise for this grid | |||||||
int | overlapSize (int level, int codim) const | ||||||
overlapSize is zero for this grid | |||||||
int | overlapSize (int codim) const | ||||||
overlapSize is zero for this grid | |||||||
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. | |||||||
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. | |||||||
const CollectiveCommunicationType & | comm () const | ||||||
return const reference to a collective communication object. The return type is a model of Dune::CollectiveCommunication. | |||||||
bool | preAdapt () | ||||||
returns if a least one entity was marked for coarsening | |||||||
void | postAdapt () | ||||||
clear all entity new markers | |||||||
bool | adapt () | ||||||
Refine all positive marked leaf entities, coarsen all negative marked entities if possible.
| |||||||
bool | adapt (DofManagerType &dm, RestrictProlongOperatorType &rp, bool verbose=false) | ||||||
Refine all positive marked leaf entities, coarsen all negative marked entities if possible.
| |||||||
bool | globalRefine (int refCount) | ||||||
uses the interface, mark on entity and refineLocal | |||||||
bool | writeGrid (const std::string filename, alu3d_ctype time) const | ||||||
write Grid to file in specified FileFormatType | |||||||
bool | writeGrid_Ascii (const std::string filename, alu3d_ctype time, bool scientific=false) const | ||||||
write leaf grid in macro grid format to ascii file | |||||||
bool | readGrid (const std::string filename, alu3d_ctype &time) | ||||||
read Grid from file filename and store time of mesh in time | |||||||
bool | mark (int refCount, const typename Traits::template Codim< 0 >::EntityPointer &ep) | ||||||
Marks an entity to be refined/coarsened in a subsequent adapt.
| |||||||
int | getMark (const typename Traits::template Codim< 0 >::EntityPointer &) const | ||||||
returns adaptation mark for given entity pointer
| |||||||
const std::vector< GeometryType > & | geomTypes (int codim) const | ||||||
deliver all geometry types used in this grid | |||||||
const ReferenceElementType & | referenceElement () const | ||||||
return reference to Dune reference element according to elType | |||||||
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 Types | |||||||
enum | |||||||
max number of levels | |||||||
enum | |||||||
element chunk for refinement | |||||||
enum | |||||||
upper estimate on number of elements that could be created when a new element is created | |||||||
typedef ALU3dGridFamily< dim, dimworld, elType >::GlobalIdSetImp | GlobalIdSetImp | ||||||
Type of the global id set. | |||||||
Protected Member Functions | |||||||
void | calcExtras () | ||||||
reset size and global size, update Level- and LeafIndexSet, if they exist | |||||||
void | calcMaxLevel () | ||||||
calculate maxlevel | |||||||
void | recalcGlobalSize () | ||||||
make grid walkthrough and calc global size | |||||||
void | checkMacroGridFile (const std::string filename) | ||||||
check whether macro grid format is of our type | |||||||
void | checkMacroGrid () | ||||||
check whether macro grid has the right element type | |||||||
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 [inherited] |
anonymous enum [inherited] |
Constructor & Destructor Documentation
Dune::ALUCubeGrid< 3, 3 >::ALUCubeGrid | ( | const std::string | macroName, | |
int | mpiComm = 0 | |||
) | [inline] |
constructor for creating ALUCubeGrid from given macro grid file
- Parameters:
-
macroName filename for macro grid in ALUGrid hexa format mpiComm MPI Communicator (when HAVE_MPI == 1 then mpiComm is of type MPI_Comm and the default value is MPI_COMM_WORLD)
Member Function Documentation
bool Dune::ALU3dGrid< dim, dimworld, elType >::loadBalance | ( | DataHandle & | data | ) | [inline, inherited] |
Calculates load of each process and repartition the grid if neccessary. For parameters of the load balancing process see the README file of the ALUGrid package.
- Parameters:
-
data the data handler class that must implement three methods: // calls data inline on macro element. From there the data of // all children can be written to the message buffer. // MessageBufferImp implements the MessageBufferIF interface. template<class MessageBufferImp> void inlineData ( MessageBufferImp& buff, Dune::Entity<0> & e); // calls data xtract on macro element. From there the data of // all children can be restored from the message buffer. // numChildren is the number of all children underneath the // macro element e. // MessageBufferImp implements the MessageBufferIF interface. template<class MessageBufferImp> void xtractData ( MessageBufferImp& buff, Dune::Entity<0> & e, size_t numChildren ); // This method is called at the end of the load balancing process // before adaptation markers are removed. Here the user can apply // a data compression or other features. This method can be // empty if nothing should be done. void compress ();
Reimplemented from Dune::GridDefaultImplementation< dim, dimworld, alu3d_ctype, ALU3dGridFamily< dim, dimworld, elType > >.
bool Dune::ALU3dGrid< dim, dimworld, elType >::adapt | ( | DofManagerType & | dm, | |
RestrictProlongOperatorType & | rp, | |||
bool | verbose = false | |||
) | [inline, inherited] |
Refine all positive marked leaf entities, coarsen all negative marked entities if possible.
- Returns:
- true if a least one entity was refined
- mark entities with the mark() method
- call preAdapt()
- if preAdapt() returned true: possibly save current solution
- call adapt()
- if adapt() returned true: possibly interpolate the (saved) solution
- call postAdapt()
- Parameters:
-
dm DofManager for dune-fem package for using callback during adaptation rp handler for restriction and prolongation operations which is a Model of the dune-fem RestrictProlongInterface class.
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
The documentation for this class was generated from the following file: