Merge two codimension-1 surfaces that may be a positive distance apart.
More...
#include <dune/grid-glue/merging/contactmerge.hh>
|
| ContactMerge (const T allowedOverlap=T(0), const Dune::VirtualFunction< WorldCoords, WorldCoords > *domainDirections=NULL, const Dune::VirtualFunction< WorldCoords, WorldCoords > *targetDirections=NULL) |
|
void | setSurfaceDirections (const Dune::VirtualFunction< WorldCoords, WorldCoords > *domainDirections, const Dune::VirtualFunction< WorldCoords, WorldCoords > *targetDirections) |
| Set surface direction functions. More...
|
|
void | setOverlap (T overlap) |
| Set the allowed overlap of the surfaces. 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 () |
|
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...
|
|
|
unsigned int | counter |
| Counts the number of times the computeIntersection method has been called. 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...
|
|
template<int dimworld, typename T = double>
class ContactMerge< dimworld, T >
Merge two codimension-1 surfaces that may be a positive distance apart.
- Template Parameters
-
dimworld | Dimension of the world coordinates. |
T | Type used for coordinates |
template<int dimworld, typename T = double>
the numeric type used in this interface
Type used for local coordinates on the grid1 side.
Type used for local coordinates on the grid2 side.
template<int dimworld, typename T = double>
the coordinate type used in this interface
template<int dimworld, typename T = double>
template<int dimworld, typename T = double>
the coordinate type used in this interface
template<int dimworld, typename T = double>
bool StandardMerge< T, grid1Dim, grid2Dim, dimworld >::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 |
|
) |
| |
|
protectedinherited |
Compute the intersection between two overlapping elements.
- Returns
- true if at least one intersection point was found
virtual void StandardMerge< T, grid1Dim, grid2Dim, dimworld >::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 |
|
) |
| |
|
protectedpure virtualinherited |
Compute the intersection between two overlapping elements.
The result is a set of simplices stored in the vector intersections.
unsigned int StandardMerge< T, grid1Dim, grid2Dim, dimworld >::nSimplices |
( |
| ) |
const |
|
virtualinherited |
unsigned int Merger< T , grid1Dim, grid2Dim, dimworld >::parent |
( |
unsigned int |
idx, |
|
|
unsigned int |
parId = 0 |
|
) |
| const |
|
inlineinherited |
get index of grid-n's parent simplex for given merged grid simplex
- Template Parameters
-
- Parameters
-
idx | index of the merged grid simplex |
- Returns
- index of the parent simplex
GridTraits<n>::Coords Merger< T , grid1Dim, grid2Dim, dimworld >::parentLocal |
( |
unsigned int |
idx, |
|
|
unsigned int |
corner, |
|
|
unsigned int |
parId = 0 |
|
) |
| const |
|
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>")
- Template Parameters
-
- Parameters
-
idx | the index of the merged grid simplex |
corner | the index of the simplex' corner |
- Returns
- local coordinates in grid-n grid1
unsigned int Merger< T , grid1Dim, grid2Dim, dimworld >::parents |
( |
unsigned int |
idx | ) |
const |
|
inlineinherited |
template<int dimworld, typename T = double>
Set the allowed overlap of the surfaces.
template<int dimworld, typename T = double>
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.
- Parameters
-
value | the new function (or NULL to unset the function) |
References StandardMerge< T, dimworld-1, dimworld-1, dimworld >::valid.
bool Merger< T , grid1Dim, grid2Dim, dimworld >::simplexRefined |
( |
unsigned int |
idx, |
|
|
std::vector< unsigned int > & |
indices |
|
) |
| const |
|
inlineinherited |
get the merged grid simplices refining a given grid-n simplex
- Template Parameters
-
n | specify which grid (grid1/grid2: 0/1) |
- Parameters
-
idx | index of grid-n simplex |
indices | will be resized first and then filled with the refining simplices |
- Returns
- TRUE <=> given simplex could be matched and is part of the merged grid
unsigned int Merger< T , grid1Dim, grid2Dim, dimworld >::counter |
|
inherited |
std::vector<std::vector<int> > StandardMerge< T, grid1Dim, grid2Dim, dimworld >::elementNeighbors1_ |
|
protectedinherited |
std::vector<std::vector<int> > StandardMerge< T, grid1Dim, grid2Dim, dimworld >::elementNeighbors2_ |
|
protectedinherited |
std::vector<std::vector<unsigned int> > StandardMerge< T, grid1Dim, grid2Dim, dimworld >::grid1ElementCorners_ |
|
protectedinherited |
std::vector<std::vector<unsigned int> > StandardMerge< T, grid1Dim, grid2Dim, dimworld >::grid2ElementCorners_ |
|
protectedinherited |
The computed intersections.
The documentation for this class was generated from the following files: