Implementation of the Merger concept for conforming interfaces.
More...
#include <dune/grid-glue/merging/conformingmerge.hh>
|
| ConformingMerge (T tolerance=1E-4) |
|
virtual void | build (const std::vector< Dune::FieldVector< T, dimworld > > &grid1_Coords, const std::vector< unsigned int > &grid1_elements, const std::vector< Dune::GeometryType > &grid1_element_types, const std::vector< Dune::FieldVector< T, dimworld > > &grid2_coords, const std::vector< unsigned int > &grid2_elements, const std::vector< Dune::GeometryType > &grid2_element_types) |
| builds the merged grid 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...
|
|
|
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 dim, int dimworld, typename T = double>
class Dune::GridGlue::ConformingMerge< dim, dimworld, T >
Implementation of the Merger concept for conforming interfaces.
- Template Parameters
-
dim | Grid dimension of the coupling grids. Must be the same for both sides |
dimworld | Dimension of the world coordinates. |
T | Type used for coordinates |
◆ ctype
template<int dim, int dimworld, typename T = double>
the numeric type used in this interface
◆ Grid1Coords
Type used for local coordinates on the grid1 side.
◆ Grid2Coords
Type used for local coordinates on the grid2 side.
◆ LocalCoords
template<int dim, int dimworld, typename T = double>
the coordinate type used in this interface
◆ WorldCoords
template<int dim, int dimworld, typename T = double>
the coordinate type used in this interface
◆ ConformingMerge()
template<int dim, int dimworld, typename T = double>
◆ build()
void Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::build |
( |
const std::vector< Dune::FieldVector< T, dimworld > > & |
grid1_Coords, |
|
|
const std::vector< unsigned int > & |
grid1_elements, |
|
|
const std::vector< Dune::GeometryType > & |
grid1_element_types, |
|
|
const std::vector< Dune::FieldVector< T, dimworld > > & |
grid2_coords, |
|
|
const std::vector< unsigned int > & |
grid2_elements, |
|
|
const std::vector< Dune::GeometryType > & |
grid2_element_types |
|
) |
| |
|
virtualinherited |
builds the merged grid
Note that the indices are used consequently throughout the whole class interface just like they are introduced here.
- Parameters
-
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 |
Implements Dune::GridGlue::Merger< T, grid1Dim, grid2Dim, dimworld >.
◆ clear()
◆ computeIntersection()
bool Dune::GridGlue::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
◆ computeIntersections()
virtual void Dune::GridGlue::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.
◆ enableBruteForce()
◆ enableFallback()
◆ nSimplices()
◆ parent()
unsigned int Dune::GridGlue::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
◆ parentLocal()
GridTraits<n>::Coords Dune::GridGlue::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
◆ parents()
◆ simplexRefined()
bool Dune::GridGlue::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
◆ counter
Counts the number of times the computeIntersection method has been called.
Used temporarily to speed up the implementation
◆ elementNeighbors1_
◆ elementNeighbors2_
◆ grid1ElementCorners_
◆ grid2ElementCorners_
◆ intersections_
The computed intersections.
◆ valid
The documentation for this class was generated from the following file: