dune-grid-glue  2.3.0
Classes | Public Types | Public Member Functions | Public Attributes | Friends | List of all members
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 Merger< ctype, grid1Dim, grid2Dim, dimworld >:
Inheritance graph

Classes

struct  GridTraits
 

Public Types

typedef Dune::FieldVector
< ctype, grid1Dim > 
Grid1Coords
 the local coordinate type for the grid1 coordinates More...
 
typedef Dune::FieldVector
< ctype, grid2Dim > 
Grid2Coords
 the local coordinate type for the grid2 coordinates More...
 
typedef Dune::FieldVector
< ctype, dimworld > 
WorldCoords
 the coordinate type used in this interface More...
 

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 More...
 
virtual unsigned int nSimplices () const =0
 get the number of simplices in the merged grid The indices are then in 0..nSimplices()-1 More...
 
virtual void clear ()=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 More...
 
template<int n>
bool simplexRefined (unsigned int idx, std::vector< unsigned int > &indices) const
 get the merged grid simplices refining a given grid-n simplex More...
 
template<int n>
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...
 

Friends

struct MergerGridPolicy< ctype, grid1Dim, grid2Dim, dimworld, 0 >
 
struct MergerGridPolicy< ctype, grid1Dim, grid2Dim, dimworld, 1 >
 

Detailed Description

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

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

Template Parameters
ctypeThe type used for coordinates (assumed to be the same for both grids)
grid1DimDimension of the grid1 grid
grid2DimDimension of the grid2 grid
dimworldDimension of the world space where the coupling takes place

Member Typedef Documentation

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
typedef Dune::FieldVector<ctype, grid1Dim> Merger< ctype, grid1Dim, grid2Dim, dimworld >::Grid1Coords

the local coordinate type for the grid1 coordinates

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
typedef Dune::FieldVector<ctype, grid2Dim> Merger< ctype, grid1Dim, grid2Dim, dimworld >::Grid2Coords

the local coordinate type for the grid2 coordinates

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
typedef Dune::FieldVector<ctype, dimworld> Merger< ctype, grid1Dim, grid2Dim, dimworld >::WorldCoords

the coordinate type used in this interface

Member Function Documentation

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
virtual void 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_coordsthe 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_elementsarray with all grid1 elements represented as corner indices into grid1_coords
grid1_element_typesarray with the GeometryType of the elements listed grid1_elements
grid2_coordsthe 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_elementsjust like with the grid1_elements and grid1_coords
grid2_element_typesarray with the GeometryType of the elements listed grid2_elements

Implemented in PSurfaceMerge< dim, dimworld, T >, StandardMerge< T, grid1Dim, grid2Dim, dimworld >, StandardMerge< T, dim, dim, dimworld >, StandardMerge< T, dimworld-1, dimworld-1, dimworld >, and StandardMerge< T, dim1, dim2, dimworld >.

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
virtual void Merger< ctype, grid1Dim, grid2Dim, dimworld >::clear ( )
pure virtual
template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
virtual unsigned int Merger< ctype, grid1Dim, grid2Dim, dimworld >::nSimplices ( ) const
pure virtual
template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
template<int n>
unsigned int 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
nspecify which grid
Parameters
idxindex of the merged grid simplex
Returns
index of the parent simplex
template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
template<int n>
GridTraits<n>::Coords 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
nspecify which grid
Parameters
idxthe index of the merged grid simplex
cornerthe index of the simplex' corner
Returns
local coordinates in grid-n grid1
template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
template<int n>
unsigned int Merger< ctype, grid1Dim, grid2Dim, dimworld >::parents ( unsigned int  idx) const
inline

doc me

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
template<int n>
bool Merger< ctype, grid1Dim, grid2Dim, dimworld >::simplexRefined ( unsigned int  idx,
std::vector< unsigned int > &  indices 
) const
inline

get the merged grid simplices refining a given grid-n simplex

Template Parameters
nspecify which grid (grid1/grid2: 0/1)
Parameters
idxindex of grid-n simplex
indiceswill be resized first and then filled with the refining simplices
Returns
TRUE <=> given simplex could be matched and is part of the merged grid

Friends And Related Function Documentation

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
friend struct MergerGridPolicy< ctype, grid1Dim, grid2Dim, dimworld, 0 >
friend
template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
friend struct MergerGridPolicy< ctype, grid1Dim, grid2Dim, dimworld, 1 >
friend

Member Data Documentation

template<class ctype, int grid1Dim, int grid2Dim, int dimworld>
unsigned int 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: