|
dune-grid-glue
2.5.0
|
Merge two codimension-1 surfaces that may be a positive distance apart. More...
#include <dune/grid-glue/merging/contactmerge.hh>

Public Types | |
| enum | ProjectionType { OUTER_NORMAL, CLOSEST_POINT } |
| Type of the projection, closest point or outer normal projection. More... | |
| typedef T | ctype |
| the numeric type used in this interface More... | |
| typedef Dune::FieldVector< T, dimworld > | WorldCoords |
| the coordinate type used in this interface More... | |
| typedef Dune::FieldVector< T, dim > | LocalCoords |
| the coordinate type used in this interface More... | |
| typedef Merger< T, grid1Dim, grid2Dim, dimworld >::Grid1Coords | Grid1Coords |
| Type used for local coordinates on the grid1 side. More... | |
| typedef Merger< T, grid1Dim, grid2Dim, dimworld >::Grid2Coords | Grid2Coords |
| Type used for local coordinates on the grid2 side. More... | |
Public Member Functions | |
| ContactMerge (const T allowedOverlap=T(0), std::function< WorldCoords(WorldCoords)> domainDirections=nullptr, std::function< WorldCoords(WorldCoords)> targetDirections=nullptr, ProjectionType type=OUTER_NORMAL) | |
| Construct merger given overlap and possible projection directions. More... | |
| ContactMerge (const T allowedOverlap, ProjectionType type) | |
| Construct merger given overlap and type of the projection. More... | |
| void | setSurfaceDirections (std::function< WorldCoords(WorldCoords)> domainDirections, std::function< WorldCoords(WorldCoords)> targetDirections) |
| Set surface direction functions. More... | |
| void | setOverlap (T overlap) |
| Set the allowed overlap of the surfaces. More... | |
| T | getOverlap () const |
| Get the allowed overlap of the surfaces. More... | |
| void | minNormalAngle (T angle) |
set minimum angle in radians between normals at x and Φ(x) More... | |
| T | minNormalAngle () const |
get minimum angle in radians between normals at x and Φ(x) More... | |
| unsigned int | nSimplices () const |
| get the number of simplices in the merged grid The indices are then in 0..nSimplices()-1 More... | |
| void | clear () |
| void | enableFallback (bool fallback) |
| void | enableBruteForce (bool bruteForce) |
| unsigned int | parents (unsigned int idx) const |
| unsigned int | parent (unsigned int idx, unsigned int parId=0) const |
| get index of grid-n's parent simplex for given merged grid simplex More... | |
| bool | simplexRefined (unsigned int idx, std::vector< unsigned int > &indices) const |
| get the merged grid simplices refining a given grid-n simplex More... | |
| GridTraits< n >::Coords | parentLocal (unsigned int idx, unsigned int corner, unsigned int parId=0) const |
| get the grid-n parent's simplex local coordinates for a particular merged grid simplex corner (parent's index can be obtained via "parent<n>") More... | |
Public Attributes | |
| unsigned int | counter |
| Counts the number of times the computeIntersection method has been called. More... | |
Protected Types | |
| typedef StandardMerge< T, dimworld-1, dimworld-1, dimworld >::RemoteSimplicialIntersection | RemoteSimplicialIntersection |
Protected Member Functions | |
| void | build (const std::vector< Dune::FieldVector< T, dimworld > > &grid1Coords, const std::vector< unsigned int > &grid1Elements, const std::vector< Dune::GeometryType > &grid1ElementTypes, const std::vector< Dune::FieldVector< T, dimworld > > &grid2Coords, const std::vector< unsigned int > &grid2Elements, const std::vector< Dune::GeometryType > &grid2ElementTypes) |
| builds the merged grid More... | |
| void | computeCyclicOrder (const std::vector< std::array< LocalCoords, 2 > > &polytopeCorners, const LocalCoords ¢er, std::vector< int > &ordering) const |
| Order the corners of the intersection polytope in cyclic order. More... | |
| void | setupNodalDirections (const std::vector< WorldCoords > &coords1, const std::vector< unsigned int > &elements1, const std::vector< Dune::GeometryType > &elementTypes1, const std::vector< WorldCoords > &coords2, const std::vector< unsigned int > &elements2, const std::vector< Dune::GeometryType > &elementTypes2) |
| Setup the direction vectors containing the directions for each vertex. More... | |
| void | computeOuterNormalField (const std::vector< WorldCoords > &coords, const std::vector< unsigned int > &elements, const std::vector< Dune::GeometryType > &elementTypes, std::vector< WorldCoords > &normals) |
| If no direction field was specified compute the outer normal field. More... | |
| void | removeDoubles (std::vector< std::array< LocalCoords, 2 > > &polytopeCorners) |
| Remove all multiples. More... | |
| virtual void | computeIntersections (const Dune::GeometryType &grid1ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::bitset<(1<< grid1Dim)> &neighborIntersects1, unsigned int grid1Index, const Dune::GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid2ElementCorners, std::bitset<(1<< grid2Dim)> &neighborIntersects2, unsigned int grid2Index, std::vector< RemoteSimplicialIntersection > &intersections)=0 |
| Compute the intersection between two overlapping elements. More... | |
| bool | computeIntersection (unsigned int candidate0, unsigned int candidate1, const std::vector< Dune::FieldVector< T, dimworld > > &grid1Coords, const std::vector< Dune::GeometryType > &grid1_element_types, std::bitset<(1<< grid1Dim)> &neighborIntersects1, const std::vector< Dune::FieldVector< T, dimworld > > &grid2Coords, const std::vector< Dune::GeometryType > &grid2_element_types, std::bitset<(1<< grid2Dim)> &neighborIntersects2, bool insert=true) |
| Compute the intersection between two overlapping elements. More... | |
Protected Attributes | |
| bool | valid |
| std::vector< RemoteSimplicialIntersection > | intersections_ |
| The computed intersections. More... | |
| std::vector< std::vector< unsigned int > > | grid1ElementCorners_ |
| Temporary internal data. More... | |
| std::vector< std::vector< unsigned int > > | grid2ElementCorners_ |
| std::vector< std::vector< int > > | elementNeighbors1_ |
| std::vector< std::vector< int > > | elementNeighbors2_ |
Merge two codimension-1 surfaces that may be a positive distance apart.
| dimworld | Dimension of the world coordinates. |
| T | Type used for coordinates |
| typedef T Dune::GridGlue::ContactMerge< dimworld, T >::ctype |
the numeric type used in this interface
|
inherited |
Type used for local coordinates on the grid1 side.
|
inherited |
Type used for local coordinates on the grid2 side.
| typedef Dune::FieldVector<T, dim> Dune::GridGlue::ContactMerge< dimworld, T >::LocalCoords |
the coordinate type used in this interface
|
protected |
| typedef Dune::FieldVector<T, dimworld> Dune::GridGlue::ContactMerge< dimworld, T >::WorldCoords |
the coordinate type used in this interface
| enum Dune::GridGlue::ContactMerge::ProjectionType |
|
inline |
Construct merger given overlap and possible projection directions.
| allowedOverlap | Allowed overlap of the surfaces |
| domainDirections | Projection direction field for the first surface that differ from the defualt normal field |
| targetDirections | Projection direction field for the second surface that differ from the default normal field |
|
inline |
Construct merger given overlap and type of the projection.
| allowedOverlap | Allowed overlap of the surfacs |
| type | Type of the projection |
|
inlineprotectedvirtual |
builds the merged grid
Note that the indices are used consequently throughout the whole class interface just like they are introduced here.
| grid1_coords | the grid1 vertices' coordinates ordered like e.g. in 3D x_0 y_0 z_0 x_1 y_1 ... y_(n-1) z_(n-1) |
| grid1_elements | array with all grid1 elements represented as corner indices into grid1_coords |
| grid1_element_types | array with the GeometryType of the elements listed grid1_elements |
| grid2_coords | the grid2 vertices' coordinates ordered like e.g. in 3D x_0 y_0 z_0 x_1 y_1 ... y_(n-1) z_(n-1) |
| grid2_elements | just like with the grid1_elements and grid1_coords |
| grid2_element_types | array with the GeometryType of the elements listed grid2_elements |
Reimplemented from Dune::GridGlue::StandardMerge< T, dimworld-1, dimworld-1, dimworld >.
|
inlinevirtualinherited |
|
protected |
Order the corners of the intersection polytope in cyclic order.
|
protectedinherited |
Compute the intersection between two overlapping elements.
|
protectedpure virtualinherited |
Compute the intersection between two overlapping elements.
The result is a set of simplices stored in the vector intersections.
|
protected |
If no direction field was specified compute the outer normal field.
|
inlineinherited |
|
inlineinherited |
|
inline |
Get the allowed overlap of the surfaces.
|
inline |
set minimum angle in radians between normals at x and Φ(x)
|
inline |
get minimum angle in radians between normals at x and Φ(x)
|
inlinevirtualinherited |
get the number of simplices in the merged grid The indices are then in 0..nSimplices()-1
Implements Dune::GridGlue::Merger< T, grid1Dim, grid2Dim, dimworld >.
|
inlineinherited |
get index of grid-n's parent simplex for given merged grid simplex
| n | specify which grid |
| idx | index of the merged grid simplex |
|
inlineinherited |
get the grid-n parent's simplex local coordinates for a particular merged grid simplex corner (parent's index can be obtained via "parent<n>")
| n | specify which grid |
| idx | the index of the merged grid simplex |
| corner | the index of the simplex' corner |
|
inlineinherited |
doc me
|
protected |
Remove all multiples.
|
inline |
Set the allowed overlap of the surfaces.
|
inline |
Set surface direction functions.
The matching of the geometries offers the possibility to specify a function for the exact evaluation of domain surface normals. If no such function is specified (default) normals are interpolated.
| value | the new function (or nullptr to unset the function) |
|
protected |
Setup the direction vectors containing the directions for each vertex.
|
inlineinherited |
get the merged grid simplices refining a given grid-n simplex
| n | specify which grid (grid1/grid2: 0/1) |
| idx | index of grid-n simplex |
| indices | will be resized first and then filled with the refining simplices |
|
inherited |
Counts the number of times the computeIntersection method has been called.
Used temporarily to speed up the implementation
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Temporary internal data.
|
protectedinherited |
|
protectedinherited |
The computed intersections.
|
protectedinherited |
1.8.13