Dune Core Modules (2.9.0)
Factory class for ALUGrids. More...
#include <dune/alugrid/3d/gridfactory.hh>
Public Types | |
typedef Transformation::WorldVector | WorldVector |
type of vector for world coordinates | |
typedef Transformation::WorldMatrix | WorldMatrix |
type of matrix from world coordinates to world coordinates | |
Public Member Functions | |
ALU3dGridFactory (const MPICommunicatorType &communicator=Grid::defaultCommunicator(), bool removeGeneratedFile=true) | |
default constructor | |
ALU3dGridFactory (const std::string &filename, const MPICommunicatorType &communicator=Grid::defaultCommunicator()) | |
constructor taking filename for temporary outfile | |
virtual | ~ALU3dGridFactory () |
Destructor. | |
virtual void | insertVertex (const VertexInputType &pos) |
insert a vertex into the coarse grid More... | |
void | insertVertex (const VertexInputType &pos, const VertexId globalId) |
insert a vertex into the coarse grid including the vertex's globally unique id More... | |
virtual void | insertElement (const GeometryType &geometry, const std::vector< VertexId > &vertices) |
insert an element into the coarse grid More... | |
virtual void | insertBoundary (const GeometryType &geometry, const std::vector< VertexId > &faceVertices, int boundaryId=1) |
insert a boundary element into the coarse grid More... | |
virtual void | insertBoundary (int element, int face, int boundaryId=1) |
mark a face as boundary (and assign a boundary id) More... | |
virtual void | insertBoundaryProjection (const GeometryType &type, const std::vector< VertexId > &vertices, const DuneBoundaryProjectionType *projection) |
insert a boundary projection into the macro grid More... | |
virtual void | insertBoundarySegment (const std::vector< VertexId > &vertices) |
insert a boundary segment into the macro grid More... | |
virtual void | insertBoundarySegment (const std::vector< VertexId > &vertices, const std::shared_ptr< BoundarySegment< dimension, dimensionworld > > &boundarySegment) |
insert a shaped boundary segment into the macro grid More... | |
virtual void | insertBoundaryProjection (const DuneBoundaryProjectionType &bndProjection, const bool isSurfaceProjection=(dimension !=dimensionworld)) |
insert a boundary projection object, (a copy is made) More... | |
void | insertFaceTransformation (const WorldMatrix &matrix, const WorldVector &shift) |
add a face transformation (for periodic identification) More... | |
GridPtrType | createGrid () |
finalize the grid creation and hand over the grid More... | |
virtual unsigned int | insertionIndex (const typename Codim< 0 >::Entity &entity) const |
obtain an element's insertion index More... | |
virtual unsigned int | insertionIndex (const typename Codim< dimension >::Entity &entity) const |
obtain a vertex' insertion index More... | |
void | setLongestEdgeFlag (bool flag=true) |
set longest edge marking for biscetion grids (default is off) | |
Communication | comm () const |
Return the Communication used by the grid factory. More... | |
virtual void | insertVertex (const FieldVector< ctype, dimworld > &pos)=0 |
Insert a vertex into the coarse grid. | |
virtual DUNE_NO_DEPRECATED_BEGIN void | insertElement (const GeometryType &type, const std::vector< unsigned int > &vertices, const std::shared_ptr< VirtualFunction< FieldVector< ctype, dimension >, FieldVector< ctype, dimworld > > > &elementParametrization) |
Insert a parametrized element into the coarse grid. More... | |
virtual DUNE_NO_DEPRECATED_END void | insertElement (const GeometryType &type, const std::vector< unsigned int > &vertices, std::function< FieldVector< ctype, dimworld >(FieldVector< ctype, dimension >)> elementParametrization) |
Insert a parametrized element into the coarse grid. More... | |
virtual void | insertBoundarySegment (const std::vector< unsigned int > &vertices, const std::shared_ptr< BoundarySegment< dimension, dimworld > > &boundarySegment) |
insert an arbitrarily shaped boundary segment More... | |
virtual unsigned int | insertionIndex (const typename GridType::LeafIntersection &intersection) const |
obtain a boundary's insertion index More... | |
virtual bool | wasInserted (const typename GridType::LeafIntersection &intersection) const |
determine whether an intersection was inserted More... | |
Protected Member Functions | |
ALU3dGridFactory (const bool verbose, const MPICommunicatorType &communicator) | |
constructor taking verbose flag | |
Static Protected Attributes | |
static constexpr int | dimworld |
The grid world dimension. | |
Detailed Description
class Dune::ALU3dGridFactory< ALUGrid >
Factory class for ALUGrids.
Member Function Documentation
◆ comm()
|
inline |
Return the Communication used by the grid factory.
Use the Communication available from the grid.
◆ createGrid()
|
virtual |
finalize the grid creation and hand over the grid
The caller takes responsibility for deleing the grid.
Implements Dune::GridFactoryInterface< ALUGrid >.
◆ insertBoundary() [1/2]
|
virtual |
insert a boundary element into the coarse grid
- Note
- The order of the vertices must coincide with the vertex order in the corresponding DUNE reference element.
- Parameters
-
[in] geometry GeometryType of the boundary element [in] faceVertices vertices of the boundary element [in] boundaryId boundary identifier of the boundary element, the default value is 1
References Dune::GeometryType::dim(), and DUNE_THROW.
◆ insertBoundary() [2/2]
|
virtual |
mark a face as boundary (and assign a boundary id)
- Parameters
-
[in] element index of the element, the face belongs to [in] face local number of the face within the element [in] boundaryId boundary id to assign to the face, the default value is 1
◆ insertBoundaryProjection() [1/2]
|
virtual |
insert a boundary projection object, (a copy is made)
- Parameters
-
[in] bndProjection instance of an ALUGridBoundaryProjection projecting vertices to a curved
References DUNE_THROW.
◆ insertBoundaryProjection() [2/2]
|
virtual |
insert a boundary projection into the macro grid
- Parameters
-
[in] type geometry type of boundary face [in] vertices vertices of the boundary face [in] projection boundary projection
- Note
- The grid takes control of the projection object.
References Dune::GeometryType::dim(), DUNE_THROW, Dune::GeometryType::isCube(), and Dune::GeometryType::isSimplex().
◆ insertBoundarySegment() [1/3]
|
inlinevirtualinherited |
insert an arbitrarily shaped boundary segment
This method inserts a boundary segment into the coarse grid.
- Parameters
-
[in] vertices the indices of the vertices of the segment [in] boundarySegment user defined implementation of the boundary segment's geometry
◆ insertBoundarySegment() [2/3]
|
inlinevirtual |
insert a boundary segment into the macro grid
- Parameters
-
[in] vertices vertex indices of boundary face
Implements Dune::GridFactoryInterface< ALUGrid >.
References DUNE_THROW.
◆ insertBoundarySegment() [3/3]
|
inlinevirtual |
insert a shaped boundary segment into the macro grid
- Parameters
-
[in] vertices vertex indices of boundary face [in] boundarySegment geometric realization of shaped boundary
References Dune::GeometryTypes::cube(), DUNE_THROW, and Dune::GeometryTypes::simplex().
◆ insertElement() [1/3]
|
virtual |
insert an element into the coarse grid
- Note
- The order of the vertices must coincide with the vertex order in the corresponding DUNE reference element.
- Parameters
-
[in] geometry GeometryType of the new element [in] vertices vertices of the new element
Implements Dune::GridFactoryInterface< ALUGrid >.
References Dune::GeometryType::dim(), and DUNE_THROW.
◆ insertElement() [2/3]
|
inlinevirtualinherited |
Insert a parametrized element into the coarse grid.
- Parameters
-
type The GeometryType of the new element vertices The vertices of the new element, using the DUNE numbering elementParametrization A function prescribing the shape of this element
Make sure the inserted element is not inverted (this holds even for simplices). There are grids that can't handle inverted elements.
- Deprecated:
- [After Dune 2.7] VirtualFunction is deprecated, use the overload taking a std::function instead
◆ insertElement() [3/3]
|
inlinevirtualinherited |
Insert a parametrized element into the coarse grid.
- Parameters
-
type The GeometryType of the new element vertices The vertices of the new element, using the DUNE numbering elementParametrization A function prescribing the shape of this element
Make sure the inserted element is not inverted (this holds even for simplices). There are grids that can't handle inverted elements.
◆ insertFaceTransformation()
alu_inline void Dune::ALU3dGridFactory< ALUGrid >::insertFaceTransformation | ( | const WorldMatrix & | matrix, |
const WorldVector & | shift | ||
) |
add a face transformation (for periodic identification)
A face transformation is an affine mapping T from world coordinates to world coordinates. The grid factory then glues two faces f and g if T( f ) = g or T( g ) = f.
- Parameters
-
[in] matrix matrix describing the linear part of T [in] shift vector describing T( 0 )
◆ insertionIndex() [1/3]
|
inlinevirtual |
obtain an element's insertion index
Data can be associated to the created macro grid using the insertion index of each entity that has been inserted during the grid creation process.
Between grid construction (createGrid) and the first grid modification, this method allows to obtain this insertion index from the grid factory. This way, data can be stored using the index maps provided by the grid.
- Parameters
-
[in] entity entity whose insertion index is requested
- Returns
- insertion index of the entity
Reimplemented from Dune::GridFactoryInterface< ALUGrid >.
◆ insertionIndex() [2/3]
|
inlinevirtual |
obtain a vertex' insertion index
Data can be associated to the created macro grid using the insertion index of each entity that has been inserted during the grid creation process.
Between grid construction (createGrid) and the first grid modification, this method allows to obtain this insertion index from the grid factory. This way, data can be stored using the index maps provided by the grid.
- Parameters
-
[in] entity entity whose insertion index is requested
- Returns
- insertion index of the entity
Reimplemented from Dune::GridFactoryInterface< ALUGrid >.
◆ insertionIndex() [3/3]
|
inlinevirtualinherited |
obtain a boundary's insertion index
Data can be associated to the created macro grid using the insertion index of each entity that has been inserted during the grid creation process.
Between grid construction (createGrid) and the first grid modification, this method allows to obtain this insertion index from the grid factory. This way, data can be stored using the index maps provided by the grid.
- Parameters
-
[in] intersection intersection whose insertion index is requested
- Returns
- insertion index of the intersection
- Note
- The insertion index can only be obtained for boundary intersections that were actually inserted (see also wasInserted).
◆ insertVertex() [1/2]
|
virtual |
insert a vertex into the coarse grid
- Parameters
-
[in] pos position of the vertex
◆ insertVertex() [2/2]
alu_inline void Dune::ALU3dGridFactory< ALUGrid >::insertVertex | ( | const VertexInputType & | pos, |
const VertexId | globalId | ||
) |
insert a vertex into the coarse grid including the vertex's globally unique id
- Parameters
-
[in] pos position of the vertex [in] globalId globally unique id for vertex
◆ wasInserted()
|
inlinevirtualinherited |
determine whether an intersection was inserted
This method allows checking whether an intersection was actually inserted into the grid factory.
- Note
- Not all boundary segments need to be inserted into the grid factory.
- This method returns false for all interior intersections
- Parameters
-
[in] intersection intersection in question
- Returns
- true, if the intersection was inserted
The documentation for this class was generated from the following files:
- dune/alugrid/3d/grid.hh
- dune/alugrid/3d/gridfactory.hh
- dune/alugrid/3d/gridfactory.cc