Dune Core Modules (2.3.1)
constructor for creating ALUSimplexGrid from given macro grid file More...
#include <dune/grid/alugrid/3d/alugrid.hh>
Public Types | |
typedef BaseType::DuneBoundaryProjectionType | DuneBoundaryProjectionType |
type of boundary projection | |
typedef BaseType::DuneBoundaryProjectionVector | DuneBoundaryProjectionVector |
type of boundary projection | |
typedef ALU3dGridHierarchicIndexSet< elType, Comm > | HierarchicIndexSet |
Type of the hierarchic index set. | |
typedef ReferenceElement< alu3d_ctype, dimension > | ReferenceElementType |
reference element type | |
typedef ALU3DSPACE ProjectVertex | ALUGridVertexProjectionType |
type of ALUGrid Vertex Projection Interface | |
typedef Traits::CollectiveCommunication | CollectiveCommunication |
type of collective communication object | |
Exported constants | |
enum | |
A constant that exports the template parameter dim. | |
enum | |
A constant that exports the template parameter dimworld. | |
Exported types | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
Public Member Functions | |
DUNE_DEPRECATED | ALUSimplexGrid (const std::string macroName, const MPICommunicatorType mpiComm=BaseType::defaultCommunicator(), const DuneBoundaryProjectionType *bndProject=0, const DuneBoundaryProjectionVector *bndVector=0, const bool verb=true) |
constructor for creating ALUSimplexGrid from given macro grid file More... | |
DUNE_DEPRECATED | ALUSimplexGrid (const MPICommunicatorType mpiComm, const DuneBoundaryProjectionType *bndProject, const DuneBoundaryProjectionVector *bndVector, const std::string macroName, const bool verb=true) |
constructor called from ALUGridFactory for creating ALUSimplexGrid from given macro grid file More... | |
DUNE_DEPRECATED | ALUSimplexGrid (const MPICommunicatorType mpiComm=BaseType::defaultCommunicator()) |
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 | |
size_t | numBoundarySegments () const |
number of boundary segments | |
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. More... | |
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. More... | |
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 CollectiveCommunication & | comm () const |
return const reference to a collective communication object. The return type is a model of Dune::CollectiveCommunication. More... | |
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. More... | |
bool | adapt (AdaptDataHandleInterface< GridImp, DataHandle > &handle) |
Refine all positive marked leaf entities, coarsen all negative marked entities if possible. More... | |
void | 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 | writeMacroGrid (const std::string path, const std::string filename) const |
write macro grid in ALUGrid macro format to path/filename.rank | |
bool | readGrid (const std::string filename, alu3d_ctype &time) |
read Grid from file filename and store time of mesh in time | |
void | backup (std::ostream &) const |
backup to ostream | |
void | restore (std::istream &) |
restore from istream | |
bool | mark (int refCount, const typename Traits::template Codim< 0 >::Entity &e) |
Marks an entity to be refined/coarsened in a subsequent adapt. 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... | |
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 | |
Traits::template Partition< pitype >::LevelGridView | DUNE_DEPRECATED_MSG ("The method levelView has been renamed to levelGridView.") levelView(int level) const |
View for a grid level. | |
Traits::template Partition< pitype >::LeafGridView | DUNE_DEPRECATED_MSG ("The method levelView has been renamed to leafGridView.") leafView() const |
View for the leaf grid. | |
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... | |
Static Public Member Functions | |
static std::string | name () |
for grid identification | |
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 | |
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 | |
const DuneBoundaryProjectionType * | boundaryProjection (const int segmentIndex) const |
return boudanry projection for given segment Id | |
Parallel data distribution and communication | |
GridImp & | asImp () |
Barton-Nackman trick. | |
const GridImp & | asImp () const |
Barton-Nackman trick. | |
Static Protected Member Functions | |
static ReturnImplementationType< InterfaceType >::ImplementationType & | getRealImplementation (InterfaceType &i) |
return real implementation of interface class | |
Detailed Description
constructor for creating ALUSimplexGrid from given macro grid file
- Parameters
-
macroName filename for macro grid in ALUGrid tetra format mpiComm MPI Communicator (when HAVE_MPI == 1 then mpiComm is of type MPI_Comm and the default value is MPI_COMM_WORLD) bndProject global boundary projection pointer bndVector pointer to vector holding boundary projection for each boundary segment. ALUGrid takes ownership of this pointer and will delete it in the desctructor verb Whether to write a notice about grid creation to stdout.
- Deprecated:
- Use ALUGrid< 3, 3, simplex, nonconforming > instead.
[ provides Dune::Grid ]
grid with support for simplicial mesh in 3d.
- Deprecated:
- Use ALUGrid< 3, 3, simplex, nonconforming > instead.
Constructor & Destructor Documentation
◆ ALUSimplexGrid() [1/3]
|
inline |
constructor for creating ALUSimplexGrid from given macro grid file
- Parameters
-
macroName filename for macro grid in ALUGrid tetra format mpiComm MPI Communicator (when HAVE_MPI == 1 then mpiComm is of type MPI_Comm and the default value is MPI_COMM_WORLD) bndProject global boundary projection pointer bndVector pointer to vector holding boundary projection for each boundary segment. ALUGrid takes ownership of this pointer and will delete it in the desctructor verb Whether to write a notice about grid creation to stdout.
- Deprecated:
- Use ALUGrid< 3, 3, simplex, nonconforming > instead.
◆ ALUSimplexGrid() [2/3]
|
inline |
constructor called from ALUGridFactory for creating ALUSimplexGrid from given macro grid file
- Parameters
-
mpiComm MPI Communicator (when HAVE_MPI == 1 then mpiComm is of type MPI_Comm) bndProject global boundary projection pointer bndVector pointer to vector holding boundary projection for each boundary segment
- Note
- ALUGrid takes ownership of this pointer and will delete it in the desctructor
- Parameters
-
macroName filename from which ALUGrid is being generated verb Whether to write a notice about grid creation to stdout.
- Deprecated:
- Use ALUGrid< 3, 3, simplex, nonconforming > instead.
◆ ALUSimplexGrid() [3/3]
|
inline |
constructor creating empty grid, empty string creates empty grid
- Deprecated:
- Use ALUGrid< 3, 3, simplex, nonconforming > instead.
Member Function Documentation
◆ adapt() [1/2]
|
inherited |
Refine all positive marked leaf entities, coarsen all negative marked entities if possible.
\return true if a least one entity was refined The complete adaptation process works as follows: - 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()
◆ adapt() [2/2]
|
inlineinherited |
Refine all positive marked leaf entities, coarsen all negative marked entities if possible.
\return true if a least one entity was refined The complete adaptation process works as follows: - 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
-
handle handler for restriction and prolongation operations which is a Model of the AdaptDataHandleInterface class.
◆ comm()
|
inlineinherited |
return const reference to a collective communication object. The return type is a model of Dune::CollectiveCommunication.
◆ communicate()
|
inherited |
Communicate information on distributed entities on a given level Template parameter is a model of Dune::CommDataHandleIF.
- Parameters
-
data A data handle telling the method what data is communicated and how this should be done. interface The communication interface to use. dir The direction of the communication along the interface (forward or backward. level The index of the grid level where the communication should happen.
◆ getMark() [1/2]
|
inlineinherited |
◆ getMark() [2/2]
|
inlineinherited |
◆ loadBalance()
|
inlineinherited |
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>// 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 ();
◆ mark() [1/3]
|
inlineinherited |
◆ mark() [2/3]
|
inlineinherited |
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 Entity 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 typename Traits::template Codim<0>::Entity & e ).bool mark(int refCount, const typename Traits::template Codim< 0 >::Entity &e)Marks an entity to be refined/coarsened in a subsequent adapt.Definition: grid_inline.hh:299
◆ mark() [3/3]
|
inlineinherited |
The documentation for this class was generated from the following file:
- dune/grid/alugrid/3d/alugrid.hh
