dune-grid-glue 2.8-git
overlappingmerge.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH
4#define DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH
5
6#include <iostream>
7#include <iomanip>
8#include <vector>
9#include <algorithm>
10
11#include <dune/common/fmatrix.hh>
12#include <dune/common/fvector.hh>
13
14#include <dune/geometry/referenceelements.hh>
15#include <dune/geometry/multilineargeometry.hh>
16
17#include <dune/grid/common/grid.hh>
18
21
22namespace Dune {
23namespace GridGlue {
24
32template<int dim1, int dim2, int dimworld, typename T = double>
34 : public StandardMerge<T,dim1,dim2,dimworld>
35{
36
37public:
38
39 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */
40
42 typedef T ctype;
43
45 typedef Dune::FieldVector<T, dimworld> WorldCoords;
46
48 //typedef Dune::FieldVector<T, dim> LocalCoords;
49
51 {}
52
53protected:
55
67 void computeIntersections(const Dune::GeometryType& grid1ElementType,
68 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
69 std::bitset<(1<<dim1)>& neighborIntersects1,
70 unsigned int grid1Index,
71 const Dune::GeometryType& grid2ElementType,
72 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
73 std::bitset<(1<<dim2)>& neighborIntersects2,
74 unsigned int grid2Index,
75 std::vector<SimplicialIntersection>& intersections);
76
77private:
78 bool inPlane(std::vector<FieldVector<T,dimworld> >& points);
79
80};
81
82} /* namespace Dune::GridGlue */
83} /* namespace Dune */
84
85#include "overlappingmerge.cc"
86
87
88#endif // DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH
Common base class for many merger implementations: produce pairs of entities that may intersect.
Definition: gridglue.hh:35
Computing overlapping grid intersections for grids of different dimensions.
Definition: overlappingmerge.hh:35
StandardMerge< T, dim1, dim2, dimworld >::SimplicialIntersection SimplicialIntersection
Definition: overlappingmerge.hh:54
OverlappingMerge()
the coordinate type used in this interface
Definition: overlappingmerge.hh:50
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.
Definition: overlappingmerge.cc:32
Dune::FieldVector< T, dimworld > WorldCoords
the coordinate type used in this interface
Definition: overlappingmerge.hh:45
T ctype
the numeric type used in this interface
Definition: overlappingmerge.hh:42
Common base class for many merger implementations: produce pairs of entities that may intersect.
Definition: standardmerge.hh:56
typename IntersectionListProvider::SimplicialIntersection SimplicialIntersection
Definition: standardmerge.hh:81