dune-grid-glue 2.9
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Dune::GridGlue::OverlappingMerge< dim1, dim2, dimworld, T > Class Template Referenceabstract

Computing overlapping grid intersections for grids of different dimensions. More...

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

Inheritance diagram for Dune::GridGlue::OverlappingMerge< dim1, dim2, 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
 
using Grid1Coords = typename Base::Grid1Coords
 Type used for local coordinates on the grid1 side.
 
using Grid2Coords = typename Base::Grid2Coords
 Type used for local coordinates on the grid2 side.
 
using IntersectionList = typename Base::IntersectionList
 

Public Member Functions

 OverlappingMerge ()
 the coordinate type used in this interface
 
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) override
 
void clear () override
 
std::shared_ptr< IntersectionListintersectionList () const final
 
void enableFallback (bool fallback)
 
void enableBruteForce (bool bruteForce)
 
unsigned int nSimplices () const
 get the number of simplices in the merged grid The indices are then in 0..nSimplices()-1
 
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
 
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.
 

Protected Types

typedef StandardMerge< T, dim1, dim2, dimworld >::SimplicialIntersection SimplicialIntersection
 
using IntersectionListProvider = SimplicialIntersectionListProvider< grid1Dim, grid2Dim >
 The computed intersections.
 
using RemoteSimplicialIntersection = SimplicialIntersection
 

Protected Member Functions

void computeIntersections (const Dune::GeometryType &grid1ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::bitset<(1<< dim1)> &neighborIntersects1, unsigned int grid1Index, const Dune::GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid2ElementCorners, std::bitset<(1<< dim2)> &neighborIntersects2, unsigned int grid2Index, std::vector< SimplicialIntersection > &intersections)
 Compute the intersection between two overlapping elements.
 
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< SimplicialIntersection > &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 = false
 
std::shared_ptr< IntersectionListProviderintersectionListProvider_
 
std::shared_ptr< IntersectionListintersectionList_
 
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 dim1, int dim2, int dimworld, typename T = double>
class Dune::GridGlue::OverlappingMerge< dim1, dim2, dimworld, T >

Computing overlapping grid intersections for grids of different dimensions.

Template Parameters
dim1Grid dimension of grid 1
dim2Grid dimension of grid 2
dimworldWorld dimension
TType used for coordinates

Member Typedef Documentation

◆ ctype

template<int dim1, int dim2, int dimworld, typename T = double>
typedef T Dune::GridGlue::OverlappingMerge< dim1, dim2, dimworld, T >::ctype

the numeric type used in this interface

◆ Grid1Coords

template<class T , int grid1Dim, int grid2Dim, int dimworld>
using Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::Grid1Coords = typename Base::Grid1Coords
inherited

Type used for local coordinates on the grid1 side.

◆ Grid2Coords

template<class T , int grid1Dim, int grid2Dim, int dimworld>
using Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::Grid2Coords = typename Base::Grid2Coords
inherited

Type used for local coordinates on the grid2 side.

◆ IntersectionList

template<class T , int grid1Dim, int grid2Dim, int dimworld>
using Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::IntersectionList = typename Base::IntersectionList
inherited

◆ IntersectionListProvider

template<class T , int grid1Dim, int grid2Dim, int dimworld>
using Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::IntersectionListProvider = SimplicialIntersectionListProvider<grid1Dim, grid2Dim>
protectedinherited

The computed intersections.

◆ RemoteSimplicialIntersection

template<class T , int grid1Dim, int grid2Dim, int dimworld>
using Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::RemoteSimplicialIntersection = SimplicialIntersection
protectedinherited

◆ SimplicialIntersection

template<int dim1, int dim2, int dimworld, typename T = double>
typedef StandardMerge<T,dim1,dim2,dimworld>::SimplicialIntersection Dune::GridGlue::OverlappingMerge< dim1, dim2, dimworld, T >::SimplicialIntersection
protected

◆ WorldCoords

template<int dim1, int dim2, int dimworld, typename T = double>
typedef Dune::FieldVector<T, dimworld> Dune::GridGlue::OverlappingMerge< dim1, dim2, dimworld, T >::WorldCoords

the coordinate type used in this interface

Constructor & Destructor Documentation

◆ OverlappingMerge()

template<int dim1, int dim2, int dimworld, typename T = double>
Dune::GridGlue::OverlappingMerge< dim1, dim2, dimworld, T >::OverlappingMerge ( )
inline

the coordinate type used in this interface

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 
)
overridevirtualinherited

◆ clear()

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

◆ 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() [1/2]

template<int dim1, int dim2, int dimworld, typename T >
void Dune::GridGlue::OverlappingMerge< dim1, dim2, dimworld, T >::computeIntersections ( const Dune::GeometryType &  grid1ElementType,
const std::vector< Dune::FieldVector< T, dimworld > > &  grid1ElementCorners,
std::bitset<(1<< dim1)> &  neighborIntersects1,
unsigned int  grid1Index,
const Dune::GeometryType &  grid2ElementType,
const std::vector< Dune::FieldVector< T, dimworld > > &  grid2ElementCorners,
std::bitset<(1<< dim2)> &  neighborIntersects2,
unsigned int  grid2Index,
std::vector< SimplicialIntersection > &  intersections 
)
protected

Compute the intersection between two overlapping elements.

The result is a set of simplices.

Parameters
grid1ElementTypeType of the first element to be intersected
grid1ElementCornersWorld coordinates of the corners of the first element
grid2ElementTypeType of the second element to be intersected
grid2ElementCornersWorld coordinates of the corners of the second element

◆ computeIntersections() [2/2]

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< SimplicialIntersection > &  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

◆ intersectionList()

template<class T , int grid1Dim, int grid2Dim, int dimworld>
std::shared_ptr< IntersectionList > Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::intersectionList ( ) const
inlinefinalvirtualinherited

list of intersections

Note
only valid after build() was called

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

◆ nSimplices()

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

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

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

auto 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

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

◆ intersectionList_

template<class T , int grid1Dim, int grid2Dim, int dimworld>
std::shared_ptr<IntersectionList> Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::intersectionList_
protectedinherited

◆ intersectionListProvider_

template<class T , int grid1Dim, int grid2Dim, int dimworld>
std::shared_ptr<IntersectionListProvider> Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >::intersectionListProvider_
protectedinherited

◆ valid

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

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