Dune Core Modules (2.9.0)
Specialization of the generic GridFactory for ALUGrid. 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 | |
GridFactory (const MPICommunicatorType &communicator=Grid::defaultCommunicator()) | |
Default constructor. | |
template<class MPIComm > | |
GridFactory (const MPIComm &) | |
Default constructor ignoring MPIComm. | |
GridFactory (const std::string &filename, const MPICommunicatorType &communicator=Grid::defaultCommunicator()) | |
constructor taking filename | |
template<class MPIComm > | |
GridFactory (const std::string &filename, const MPIComm &) | |
constructor taking filename and ignoring MPIComm | |
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 | insertVertex (const FieldVector< ctype, dimworld > &pos)=0 |
Insert a vertex into the coarse grid. | |
virtual void | insertElement (const GeometryType &geometry, const std::vector< VertexId > &vertices) |
insert an element into the coarse grid More... | |
virtual DUNE_NO_DEPRECATED_BEGIN void | insertElement ([[maybe_unused]] const GeometryType &type,[[maybe_unused]] const std::vector< unsigned int > &vertices,[[maybe_unused]] 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 | 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 | insertBoundaryProjection (const DuneBoundaryProjectionType &bndProjection, const bool isSurfaceProjection=(dimension !=dimensionworld)) |
insert a boundary projection object, (a copy is made) 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 | insertBoundarySegment ([[maybe_unused]] const std::vector< unsigned int > &vertices,[[maybe_unused]] const std::shared_ptr< BoundarySegment< dimension, dimworld > > &boundarySegment) |
insert an arbitrarily shaped boundary segment 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 ([[maybe_unused]] const typename Codim< 0 >::Entity &entity) const |
obtain an element's insertion index More... | |
virtual unsigned int | insertionIndex ([[maybe_unused]] const typename Codim< dimension >::Entity &entity) const |
obtain a vertex' insertion index More... | |
virtual unsigned int | insertionIndex ([[maybe_unused]] const typename GridType::LeafIntersection &intersection) const |
obtain a boundary's insertion index More... | |
virtual bool | wasInserted ([[maybe_unused]] const typename GridType::LeafIntersection &intersection) const |
determine whether an intersection was inserted 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... | |
Static Protected Attributes | |
constexpr static int | dimworld |
The grid world dimension. | |
Detailed Description
template<int dim, int dimw, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm>
class Dune::GridFactory< ALUGrid< dim, dimw, eltype, refinementtype, Comm > >
Specialization of the generic GridFactory for ALUGrid.
Member Function Documentation
◆ comm()
|
inlineinherited |
Return the Communication used by the grid factory.
Use the Communication available from the grid.
◆ createGrid()
|
virtualinherited |
finalize the grid creation and hand over the grid
The caller takes responsibility for deleing the grid.
Implements Dune::GridFactoryInterface< ALUGrid< dim, dimw, eltype, refinementtype, Comm > >.
◆ insertBoundary() [1/2]
|
virtualinherited |
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
◆ insertBoundary() [2/2]
|
virtualinherited |
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]
|
virtualinherited |
insert a boundary projection object, (a copy is made)
- Parameters
-
[in] bndProjection instance of an ALUGridBoundaryProjection projecting vertices to a curved
◆ insertBoundaryProjection() [2/2]
|
virtualinherited |
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.
◆ 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]
|
inlinevirtualinherited |
insert a boundary segment into the macro grid
- Parameters
-
[in] vertices vertex indices of boundary face
Implements Dune::GridFactoryInterface< ALUGrid< dim, dimw, eltype, refinementtype, Comm > >.
◆ insertBoundarySegment() [3/3]
|
inlinevirtualinherited |
insert a shaped boundary segment into the macro grid
- Parameters
-
[in] vertices vertex indices of boundary face [in] boundarySegment geometric realization of shaped boundary
◆ insertElement() [1/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() [2/3]
|
virtualinherited |
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< dim, dimw, eltype, refinementtype, Comm > >.
◆ 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()
|
inherited |
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]
|
inlinevirtualinherited |
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
◆ insertionIndex() [2/3]
|
inlinevirtualinherited |
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
◆ 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]
|
virtualinherited |
insert a vertex into the coarse grid
- Parameters
-
[in] pos position of the vertex
◆ insertVertex() [2/2]
|
inherited |
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 file:
- dune/alugrid/3d/gridfactory.hh