Loading...
Searching...
No Matches
Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld > Class Template Referenceabstract

Abstract base for all classes that take extracted grids and build sets of intersections. More...

`#include <dune/grid-glue/merging/merger.hh>`

Inheritance diagram for Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >:

## Public Types

typedef Dune::FieldVector< ctype, grid1Dim > | Grid1Coords
| the local coordinate type for the grid1 coordinates
typedef Dune::FieldVector< ctype, grid2Dim > | Grid2Coords
| the local coordinate type for the grid2 coordinates
typedef Dune::FieldVector< ctype, dimworld > | WorldCoords
| the coordinate type used in this interface
using | IntersectionList = Dune::GridGlue::IntersectionList<Grid1Coords, Grid2Coords>

## Public Member Functions

virtual 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)=0
| builds the merged grid
unsigned int | nSimplices () const
| get the number of simplices in the merged grid The indices are then in 0..nSimplices()-1
virtual void | clear ()=0
virtual std::shared_ptr< IntersectionList > | intersectionList () const =0
template<int n>
unsigned int | parents (unsigned int idx) const
template<int n>
unsigned int | parent (unsigned int idx, unsigned int parId=0) const
| get index of grid-n's parent simplex for given merged grid simplex
template<int n>
auto | 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>")

## Public Attributes

unsigned int | counter
| Counts the number of times the computeIntersection method has been called.

## Detailed Description

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
class Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >

Abstract base for all classes that take extracted grids and build sets of intersections.

Template Parameters

  ctype | The type used for coordinates (assumed to be the same for both grids)
  grid1Dim | Dimension of the grid1 grid
  grid2Dim | Dimension of the grid2 grid
  dimworld | Dimension of the world space where the coupling takes place

## Member Typedef Documentation

## Grid1Coords

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>

typedef Dune::FieldVector<ctype, grid1Dim> Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >::Grid1Coords

the local coordinate type for the grid1 coordinates

## Grid2Coords

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>

typedef Dune::FieldVector<ctype, grid2Dim> Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >::Grid2Coords

the local coordinate type for the grid2 coordinates

## IntersectionList

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>

using Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >::IntersectionList = Dune::GridGlue::IntersectionList<Grid1Coords, Grid2Coords>

## WorldCoords

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>

typedef Dune::FieldVector<ctype, dimworld> Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >::WorldCoords

the coordinate type used in this interface

## Member Function Documentation

## build()

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>

virtual void Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >::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 )

pure 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

Implemented in Dune::GridGlue::SimplicialIntersection< T, dim, dim, dimworld >, Dune::GridGlue::SimplicialIntersection< T, dim1, dim2, dimworld >, Dune::GridGlue::SimplicialIntersection< T, 1, 1, dimworld >, Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >, and Dune::GridGlue::StandardMerge< T, dim, dim, dimworld >.

## clear()

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>

virtual void Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >::clear | ( |  | ) |

pure virtual

Implemented in Dune::GridGlue::SimplicialIntersection< T, dim, dim, dimworld >, Dune::GridGlue::SimplicialIntersection< T, dim1, dim2, dimworld >, Dune::GridGlue::SimplicialIntersection< T, 1, 1, dimworld >, Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >, Dune::GridGlue::StandardMerge< double, dim, dim, dimworld >, Dune::GridGlue::StandardMerge< double, dim1, dim2, dimworld >, Dune::GridGlue::StandardMerge< double, dimworld-1, dimworld-1, dimworld >, and Dune::GridGlue::StandardMerge< T, dim, dim, dimworld >.

## intersectionList()

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>

virtual std::shared_ptr< IntersectionList > Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >::intersectionList | ( |  | ) | const

pure virtual

list of intersections

Note
  only valid after build() was called

Implemented in Dune::GridGlue::SimplicialIntersection< T, dim, dim, dimworld >, Dune::GridGlue::SimplicialIntersection< T, dim1, dim2, dimworld >, Dune::GridGlue::SimplicialIntersection< T, 1, 1, dimworld >, Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >, Dune::GridGlue::StandardMerge< double, dim, dim, dimworld >, Dune::GridGlue::StandardMerge< double, dim1, dim2, dimworld >, Dune::GridGlue::StandardMerge< double, dimworld-1, dimworld-1, dimworld >, and Dune::GridGlue::StandardMerge< T, dim, dim, dimworld >.

## nSimplices()

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>

unsigned int Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >::nSimplices | ( |  | ) | const

inline

get the number of simplices in the merged grid The indices are then in 0..nSimplices()-1

## parent()

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
template<int n>

unsigned int Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >::parent | ( | unsigned int | idx,
|  | unsigned int | parId = 0 ) const

inline

get index of grid-n's parent simplex for given merged grid simplex

Template Parameters

  n | specify which grid

Parameters

  idx | index of the merged grid simplex

Returns
  index of the parent simplex

## parentLocal()

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
template<int n>

auto Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >::parentLocal | ( | unsigned int | idx,
|  | unsigned int | corner,
|  | unsigned int | parId = 0 ) const

inline

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

  n | specify which grid

Parameters

  idx | the index of the merged grid simplex
  corner | the index of the simplex' corner

Returns
  local coordinates in grid-n grid1

## parents()

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
template<int n>

unsigned int Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >::parents | ( | unsigned int | idx | ) | const

inline

doc me

## Member Data Documentation

## counter

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>

unsigned int Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >::counter

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 file:

- merger.hh