dune-grid-glue  2.9
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 // SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
4 // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
5 #ifndef DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH
6 #define DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH
7 
8 #include <iostream>
9 #include <iomanip>
10 #include <vector>
11 #include <algorithm>
12 
13 #include <dune/common/fmatrix.hh>
14 #include <dune/common/fvector.hh>
15 
16 #include <dune/geometry/referenceelements.hh>
17 #include <dune/geometry/multilineargeometry.hh>
18 
19 #include <dune/grid/common/grid.hh>
20 
23 
24 namespace Dune {
25 namespace GridGlue {
26 
34 template<int dim1, int dim2, int dimworld, typename T = double>
36  : public StandardMerge<T,dim1,dim2,dimworld>
37 {
38 
39 public:
40 
41  /* 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 */
42 
44  typedef T ctype;
45 
47  typedef Dune::FieldVector<T, dimworld> WorldCoords;
48 
50  //typedef Dune::FieldVector<T, dim> LocalCoords;
51 
53  {}
54 
55 protected:
57 
69  void computeIntersections(const Dune::GeometryType& grid1ElementType,
70  const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
71  std::bitset<(1<<dim1)>& neighborIntersects1,
72  unsigned int grid1Index,
73  const Dune::GeometryType& grid2ElementType,
74  const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
75  std::bitset<(1<<dim2)>& neighborIntersects2,
76  unsigned int grid2Index,
77  std::vector<SimplicialIntersection>& intersections);
78 
79 private:
80  bool inPlane(std::vector<FieldVector<T,dimworld> >& points);
81 
82 };
83 
84 } /* namespace Dune::GridGlue */
85 } /* namespace Dune */
86 
87 #include "overlappingmerge.cc"
88 
89 
90 #endif // DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH
Common base class for many merger implementations: produce pairs of entities that may intersect.
Definition: gridglue.hh:37
Computing overlapping grid intersections for grids of different dimensions.
Definition: overlappingmerge.hh:37
StandardMerge< T, dim1, dim2, dimworld >::SimplicialIntersection SimplicialIntersection
Definition: overlappingmerge.hh:56
OverlappingMerge()
the coordinate type used in this interface
Definition: overlappingmerge.hh:52
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:34
Dune::FieldVector< T, dimworld > WorldCoords
the coordinate type used in this interface
Definition: overlappingmerge.hh:47
T ctype
the numeric type used in this interface
Definition: overlappingmerge.hh:44
Common base class for many merger implementations: produce pairs of entities that may intersect.
Definition: standardmerge.hh:58
typename IntersectionListProvider::SimplicialIntersection SimplicialIntersection
Definition: standardmerge.hh:83