Standard implementation of the SurfaceMerge concept using the psurface library.
More...
#include <dune/grid-glue/merging/psurfacemerge.hh>
|
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 Dune::FieldVector< T,
grid1Dim > | Grid1Coords |
| the local coordinate type for the grid1 coordinates More...
|
|
typedef Dune::FieldVector< T,
grid2Dim > | Grid2Coords |
| the local coordinate type for the grid2 coordinates More...
|
|
|
| PSurfaceMerge (const PSURFACE_NAMESPACE DirectionFunction< psurfaceDimworld, ctype > *domainDirections, const PSURFACE_NAMESPACE DirectionFunction< psurfaceDimworld, ctype > *targetDirections) |
|
| PSurfaceMerge (std::shared_ptr< const PSURFACE_NAMESPACE DirectionFunction< psurfaceDimworld, ctype > > domainDirections=nullptr, std::shared_ptr< const PSURFACE_NAMESPACE DirectionFunction< psurfaceDimworld, ctype > > targetDirections=nullptr) |
|
void | setSurfaceDirections (const PSURFACE_NAMESPACE DirectionFunction< psurfaceDimworld, ctype > *domainDirections, const PSURFACE_NAMESPACE DirectionFunction< psurfaceDimworld, ctype > *targetDirections) |
| Set surface direction functions. More...
|
|
void | setSurfaceDirections (std::shared_ptr< const PSURFACE_NAMESPACE DirectionFunction< psurfaceDimworld, ctype > > domainDirections, std::shared_ptr< const PSURFACE_NAMESPACE DirectionFunction< psurfaceDimworld, ctype > > targetDirections) |
|
void | build (const std::vector< Dune::FieldVector< ctype, dimworld > > &grid1_coords, const std::vector< unsigned int > &grid1_elements, const std::vector< Dune::GeometryType > &grid1_element_types, const std::vector< Dune::FieldVector< ctype, 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 () |
| clear the internal state, so that we can run a new merging process More...
|
|
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...
|
|
template<int dim, int dimworld, typename T = double>
class PSurfaceMerge< dim, dimworld, T >
Standard implementation of the SurfaceMerge concept using the psurface library.
- Template Parameters
-
dim | Grid dimension of the coupling grids. Must be the same for both sides |
dimworld | Dimension of the world coordinates. Must be equal to dim or to dim+1 |
T | Type used for coordinates |
template<int dim, int dimworld, typename T = double>
the numeric type used in this interface
typedef Dune::FieldVector<T , grid1Dim> Merger< T , grid1Dim, grid2Dim, dimworld >::Grid1Coords |
|
inherited |
the local coordinate type for the grid1 coordinates
typedef Dune::FieldVector<T , grid2Dim> Merger< T , grid1Dim, grid2Dim, dimworld >::Grid2Coords |
|
inherited |
the local coordinate type for the grid2 coordinates
template<int dim, int dimworld, typename T = double>
the coordinate type used in this interface
template<int dim, int dimworld, typename T = double>
the coordinate type used in this interface
template<int dim, int dimworld, typename T >
PSurfaceMerge< dim, dimworld, T >::PSurfaceMerge |
( |
const PSURFACE_NAMESPACE DirectionFunction< psurfaceDimworld, ctype > * |
domainDirections, |
|
|
const PSURFACE_NAMESPACE DirectionFunction< psurfaceDimworld, ctype > * |
targetDirections |
|
) |
| |
template<int dim, int dimworld, typename T >
PSurfaceMerge< dim, dimworld, T >::PSurfaceMerge |
( |
std::shared_ptr< const PSURFACE_NAMESPACE DirectionFunction< psurfaceDimworld, ctype > > |
domainDirections = nullptr , |
|
|
std::shared_ptr< const PSURFACE_NAMESPACE DirectionFunction< psurfaceDimworld, ctype > > |
targetDirections = nullptr |
|
) |
| |
template<int dim, int dimworld, typename T >
void PSurfaceMerge< dim, dimworld, T >::build |
( |
const std::vector< Dune::FieldVector< ctype, dimworld > > & |
grid1_coords, |
|
|
const std::vector< unsigned int > & |
grid1_elements, |
|
|
const std::vector< Dune::GeometryType > & |
grid1_element_types, |
|
|
const std::vector< Dune::FieldVector< ctype, dimworld > > & |
grid2_coords, |
|
|
const std::vector< unsigned int > & |
grid2_elements, |
|
|
const std::vector< Dune::GeometryType > & |
grid2_element_types |
|
) |
| |
|
virtual |
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 Merger< T, dim, dim, dimworld >.
template<int dim, int dimworld, typename T = double>
template<int dim, int dimworld, typename T >
unsigned int PSurfaceMerge< dim, dimworld, T >::nSimplices |
( |
| ) |
const |
|
inlinevirtual |
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 dim, int dimworld, typename T >
void PSurfaceMerge< dim, dimworld, T >::setSurfaceDirections |
( |
const PSURFACE_NAMESPACE DirectionFunction< psurfaceDimworld, ctype > * |
domainDirections, |
|
|
const PSURFACE_NAMESPACE DirectionFunction< psurfaceDimworld, ctype > * |
targetDirections |
|
) |
| |
|
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.
- Parameters
-
domainDirections | the new function for the outer normal of grid0 (domain) (or NULL to unset the function) |
targetDirections | the new function for the outer normal of grid1 (domain) (or NULL to unset the function) |
template<int dim, int dimworld, typename T >
void PSurfaceMerge< dim, dimworld, T >::setSurfaceDirections |
( |
std::shared_ptr< const PSURFACE_NAMESPACE DirectionFunction< psurfaceDimworld, ctype > > |
domainDirections, |
|
|
std::shared_ptr< const PSURFACE_NAMESPACE DirectionFunction< psurfaceDimworld, ctype > > |
targetDirections |
|
) |
| |
|
inline |
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 |
Counts the number of times the computeIntersection method has been called.
Used temporarily to speed up the implementation
The documentation for this class was generated from the following files: