dune-grid-glue 2.5-git
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Dune::GridGlue::ConformingMerge< dim, dimworld, T > Class Template Referenceabstract

Implementation of the Merger concept for conforming interfaces. More...

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

Inheritance diagram for Dune::GridGlue::ConformingMerge< dim, dimworld, T >:
Inheritance graph

Public Types

typedef T ctype
 the numeric type used in this interface
 
typedef Dune::FieldVector< T, dimworld > WorldCoords
 the coordinate type used in this interface
 
typedef Dune::FieldVector< T, dim > LocalCoords
 the coordinate type used in this interface
 
typedef Merger< T, grid1Dim, grid2Dim, dimworld >::Grid1Coords Grid1Coords
 Type used for local coordinates on the grid1 side.
 
typedef Merger< T, grid1Dim, grid2Dim, dimworld >::Grid2Coords Grid2Coords
 Type used for local coordinates on the grid2 side.
 

Public Member Functions

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

Public Attributes

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

Protected Member Functions

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.
 
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.
 

Protected Attributes

bool valid
 
std::vector< RemoteSimplicialIntersectionintersections_
 The computed intersections.
 
std::vector< std::vector< unsigned int > > grid1ElementCorners_
 Temporary internal data.
 
std::vector< std::vector< unsigned int > > grid2ElementCorners_
 
std::vector< std::vector< int > > elementNeighbors1_
 
std::vector< std::vector< int > > elementNeighbors2_
 

Detailed Description

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
dimGrid dimension of the coupling grids. Must be the same for both sides
dimworldDimension of the world coordinates.
TType used for coordinates

Member Typedef Documentation

◆ ctype

template<int dim, int dimworld, typename T = double>
typedef T Dune::GridGlue::ConformingMerge< dim, dimworld, T >::ctype

the numeric type used in this interface

◆ Grid1Coords

template<class T , int grid1Dim, int grid2Dim, int dimworld>
typedef Merger<T,grid1Dim,grid2Dim,dimworld>::Grid1Coords Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::Grid1Coords
inherited

Type used for local coordinates on the grid1 side.

◆ Grid2Coords

template<class T , int grid1Dim, int grid2Dim, int dimworld>
typedef Merger<T,grid1Dim,grid2Dim,dimworld>::Grid2Coords Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::Grid2Coords
inherited

Type used for local coordinates on the grid2 side.

◆ LocalCoords

template<int dim, int dimworld, typename T = double>
typedef Dune::FieldVector<T, dim> Dune::GridGlue::ConformingMerge< dim, dimworld, T >::LocalCoords

the coordinate type used in this interface

◆ WorldCoords

template<int dim, int dimworld, typename T = double>
typedef Dune::FieldVector<T, dimworld> Dune::GridGlue::ConformingMerge< dim, dimworld, T >::WorldCoords

the coordinate type used in this interface

Constructor & Destructor Documentation

◆ ConformingMerge()

template<int dim, int dimworld, typename T = double>
Dune::GridGlue::ConformingMerge< dim, dimworld, T >::ConformingMerge ( tolerance = 1E-4)
inline

Member Function Documentation

◆ build()

template<typename T , int grid1Dim, int grid2Dim, int dimworld>
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

◆ clear()

template<class T , int grid1Dim, int grid2Dim, int dimworld>
void Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::clear ( )
inlinevirtualinherited

◆ computeIntersection()

template<typename T , int grid1Dim, int grid2Dim, int dimworld>
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()

template<class T , int grid1Dim, int grid2Dim, int dimworld>
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()

template<class T , int grid1Dim, int grid2Dim, int dimworld>
void Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::enableBruteForce ( bool  bruteForce)
inlineinherited

◆ enableFallback()

template<class T , int grid1Dim, int grid2Dim, int dimworld>
void Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::enableFallback ( bool  fallback)
inlineinherited

◆ nSimplices()

template<typename T , int grid1Dim, int grid2Dim, int dimworld>
unsigned int Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::nSimplices ( ) const
inlinevirtualinherited

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

Implements Dune::GridGlue::Merger< T, grid1Dim, grid2Dim, dimworld >.

◆ 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
nspecify which grid
Parameters
idxindex 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
nspecify which grid
Parameters
idxthe index of the merged grid simplex
cornerthe index of the simplex' corner
Returns
local coordinates in grid-n grid1

◆ parents()

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

doc me

◆ 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
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

Member Data Documentation

◆ counter

unsigned int Dune::GridGlue::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

◆ elementNeighbors1_

template<class T , int grid1Dim, int grid2Dim, int dimworld>
std::vector<std::vector<int> > Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::elementNeighbors1_
protectedinherited

◆ elementNeighbors2_

template<class T , int grid1Dim, int grid2Dim, int dimworld>
std::vector<std::vector<int> > Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::elementNeighbors2_
protectedinherited

◆ grid1ElementCorners_

template<class T , int grid1Dim, int grid2Dim, int dimworld>
std::vector<std::vector<unsigned int> > Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::grid1ElementCorners_
protectedinherited

Temporary internal data.

◆ grid2ElementCorners_

template<class T , int grid1Dim, int grid2Dim, int dimworld>
std::vector<std::vector<unsigned int> > Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::grid2ElementCorners_
protectedinherited

◆ intersections_

template<class T , int grid1Dim, int grid2Dim, int dimworld>
std::vector<RemoteSimplicialIntersection> Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::intersections_
protectedinherited

The computed intersections.

◆ valid

template<class T , int grid1Dim, int grid2Dim, int dimworld>
bool Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::valid
protectedinherited

The documentation for this class was generated from the following file: