dune-grid-glue  2.3.0
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 #include <dune/common/version.hh>
14 
15 #include <dune/geometry/referenceelements.hh>
16 #include <dune/geometry/multilineargeometry.hh>
17 
18 #include <dune/grid/common/grid.hh>
19 
22 
23 namespace Dune {
24 namespace GridGlue {
25 
33 template<int dim1, int dim2, int dimworld, typename T = double>
35  : public StandardMerge<T,dim1,dim2,dimworld>
36 {
37 
38 public:
39 
40  /* 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 */
41 
43  typedef T ctype;
44 
46  typedef Dune::FieldVector<T, dimworld> WorldCoords;
47 
49  //typedef Dune::FieldVector<T, dim> LocalCoords;
50 
52  {}
53 
54 protected:
56 
68  void computeIntersections(const Dune::GeometryType& grid1ElementType,
69  const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
70  std::bitset<(1<<dim1)>& neighborIntersects1,
71  unsigned int grid1Index,
72  const Dune::GeometryType& grid2ElementType,
73  const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
74  std::bitset<(1<<dim2)>& neighborIntersects2,
75  unsigned int grid2Index,
76  std::vector<RemoteSimplicialIntersection>& intersections);
77 
78 private:
79  bool inPlane(std::vector<FieldVector<T,dimworld> >& points);
80 
81 };
82 
83 } /* namespace Dune::GridGlue */
84 } /* namespace Dune */
85 
86 #include "overlappingmerge.cc"
87 
88 
89 #endif // DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH
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< RemoteSimplicialIntersection > &intersections)
Compute the intersection between two overlapping elements.
Definition: overlappingmerge.cc:32
T ctype
the numeric type used in this interface
Definition: overlappingmerge.hh:43
Definition: gridglue.hh:34
Computing overlapping grid intersections for grids of different dimensions.
Definition: overlappingmerge.hh:34
Dune::FieldVector< T, dimworld > WorldCoords
the coordinate type used in this interface
Definition: overlappingmerge.hh:46
StandardMerge< T, dim1, dim2, dimworld >::RemoteSimplicialIntersection RemoteSimplicialIntersection
Definition: overlappingmerge.hh:55
Common base class for many merger implementations: produce pairs of entities that may intersect...
Definition: standardmerge.hh:50
Common base class for many merger implementations: produce pairs of entities that may intersect...
OverlappingMerge()
the coordinate type used in this interface
Definition: overlappingmerge.hh:51