dune-grid-glue  2.4.0
intersection.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:
9 #ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH
10 #define DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH
11 
12 #include <memory>
13 
14 #include <dune/common/version.hh>
15 
16 #if DUNE_VERSION_NEWER(DUNE_GEOMETRY,2,3)
17 #include <dune/geometry/affinegeometry.hh>
18 #else
20 #endif
22 
23 #define ONLY_SIMPLEX_INTERSECTIONS
24 
25 namespace Dune {
26  namespace GridGlue {
27 
28  // forward declaration
29  template<typename P0, typename P1>
30  class IntersectionIndexSet;
31 
35  template<typename P0, typename P1>
36  class IntersectionData
37  {
38  public:
39  typedef ::Dune::GridGlue::GridGlue<P0, P1> GridGlue;
40 
41  typedef typename GridGlue::IndexType IndexType;
42 
45 
46  private:
47  // intermediate quantities
48  static const int dim0 = GridGlue::Grid0View::Grid::dimension - GridGlue::Grid0Patch::codim;
49  static const int dim1 = GridGlue::Grid1View::Grid::dimension - GridGlue::Grid1Patch::codim;
50 
51  public:
53  enum { mydim = (dim0<dim1) ? dim0 : dim1 };
54 
55 #if DUNE_VERSION_NEWER(DUNE_GEOMETRY,2,3)
56  typedef AffineGeometry<typename GridGlue::Grid0View::ctype, mydim, GridGlue::Grid0View::dimension>
58  typedef AffineGeometry<typename GridGlue::Grid0View::ctype, mydim, GridGlue::Grid0View::dimensionworld>
60  typedef AffineGeometry<typename GridGlue::Grid1View::ctype, mydim, GridGlue::Grid1View::dimension>
62  typedef AffineGeometry<typename GridGlue::Grid1View::ctype, mydim, GridGlue::Grid1View::dimensionworld>
64 #else
73 #endif
74 
77 
79  IntersectionData(const GridGlue& glue, unsigned int mergeindex, unsigned int offset, bool grid0local, bool grid1local);
80 
83 
84  /* M E M B E R V A R I A B L E S */
85 
87  IndexType index_;
88 
89  bool grid0local_;
90  std::vector<Grid0IndexType> grid0indices_;
91  bool grid1local_;
92  std::vector<Grid1IndexType> grid1indices_;
93 
97  std::vector<shared_ptr<Grid0LocalGeometry> > grid0localgeom_;
105  shared_ptr<Grid0Geometry> grid0geom_;
109  std::vector<shared_ptr<Grid1LocalGeometry> > grid1localgeom_;
117  shared_ptr<Grid1Geometry> grid1geom_;
118 
119  };
120 
122  template<typename P0, typename P1>
123  IntersectionData<P0, P1>::IntersectionData(const GridGlue& glue, unsigned int mergeindex, unsigned int offset,
124  bool grid0local, bool grid1local)
125  : index_(mergeindex+offset),
126  grid0local_(grid0local),
127  grid1local_(grid1local)
128  {
129  unsigned int n_grid0Parents = glue.merger_->template parents<0>(mergeindex);
130  unsigned int n_grid1Parents = glue.merger_->template parents<1>(mergeindex);
131 
132  assert (0 <= n_grid0Parents || 0 <= n_grid1Parents);
133 
134  // init containers
135  grid0indices_.resize(n_grid0Parents);
136  grid0localgeom_.resize(n_grid0Parents);
137 
138  grid1indices_.resize(n_grid1Parents);
139  grid1localgeom_.resize(n_grid1Parents);
140 
141  // default values
142  grid0indices_[0] = 0;
143  grid1indices_[0] = 0;
144 
145  typedef typename GridGlue::ctype ctype;
146 
147  // Number of corners of the intersection
148  const int nSimplexCorners = mydim + 1;
149 
150  // if an invalid index is given do not proceed!
151  // (happens when the parent GridGlue initializes the "end"-Intersection)
152  assert (0 <= mergeindex || mergeindex < glue.index__sz);
153 
154  // initialize the local and the global geometries of grid0
155  {
156  // compute the coordinates of the subface's corners in codim 0 entity local coordinates
157  const int elementdim = GridGlue::Grid0View::template Codim<0>::Geometry::mydimension;
158 
159  // coordinates within the subentity that contains the remote intersection
160  std::array<Dune::FieldVector<ctype, dim0>, nSimplexCorners> corners_subEntity_local;
161 
162  for (unsigned int par = 0; par < n_grid0Parents; ++par) {
163  for (int i = 0; i < nSimplexCorners; ++i)
164  corners_subEntity_local[i] = glue.merger_->template parentLocal<0>(mergeindex, i, par);
165 
166  // Coordinates of the remote intersection corners wrt the element coordinate system
167  std::array<Dune::FieldVector<ctype, elementdim>, nSimplexCorners> corners_element_local;
168 
169  if (grid0local)
170  {
171  grid0indices_[par] = glue.merger_->template parent<0>(mergeindex,par);
172 
173  typename GridGlue::Grid0Patch::LocalGeometry
174  grid0LocalGeometry = glue.template patch<0>().geometryLocal(grid0indices_[par]);
175  typename GridGlue::Grid0Patch::Geometry grid0WorldGeometry1 = glue.template patch<0>().geometry(grid0indices_[par]);
176  for (std::size_t i=0; i<corners_subEntity_local.size(); i++) {
177  corners_element_local[i] = grid0LocalGeometry.global(corners_subEntity_local[i]);
178  }
179 
180  // set the corners of the local geometry
181  #ifdef ONLY_SIMPLEX_INTERSECTIONS
182  Dune::GeometryType type(Dune::GeometryType::simplex, mydim);
183  #else
184  #error Not Implemented
185  #endif
186  grid0localgeom_[par] = make_shared<Grid0LocalGeometry>(type, corners_element_local);
187 
188  // Add world geometry only for 0th parent
189  if (par == 0) {
190  typename GridGlue::Grid0Patch::Geometry
191  grid0WorldGeometry = glue.template patch<0>().geometry(grid0indices_[par]);
192 
193  // world coordinates of the remote intersection corners
194  std::array<Dune::FieldVector<ctype, GridGlue::Grid0View::dimensionworld>, nSimplexCorners> corners_global;
195 
196  for (std::size_t i=0; i<corners_subEntity_local.size(); i++) {
197  corners_global[i] = grid0WorldGeometry.global(corners_subEntity_local[i]);
198  }
199 
200  grid0geom_ = make_shared<Grid0Geometry>(type, corners_global);
201  }
202  }
203  }
204  }
205 
206  // do the same for the local and the global geometry of grid1
207  {
208  // compute the coordinates of the subface's corners in codim 0 entity local coordinates
209  const int elementdim = GridGlue::Grid1View::template Codim<0>::Geometry::mydimension;
210 
211  // coordinates within the subentity that contains the remote intersection
212  std::array<Dune::FieldVector<ctype, dim1>, nSimplexCorners> corners_subEntity_local;
213 
214  for (unsigned int par = 0; par < n_grid1Parents; ++par) {
215 
216  for (int i = 0; i < nSimplexCorners; ++i)
217  corners_subEntity_local[i] = glue.merger_->template parentLocal<1>(mergeindex, i, par);
218 
219  // Coordinates of the remote intersection corners wrt the element coordinate system
220  std::array<Dune::FieldVector<ctype, elementdim>, nSimplexCorners> corners_element_local;
221 
222  if (grid1local)
223  {
224  grid1indices_[par] = glue.merger_->template parent<1>(mergeindex, par);
225 
226  typename GridGlue::Grid1Patch::LocalGeometry
227  grid1LocalGeometry = glue.template patch<1>().geometryLocal(grid1indices_[par]);
228 
229  for (std::size_t i=0; i<corners_subEntity_local.size(); i++) {
230  corners_element_local[i] = grid1LocalGeometry.global(corners_subEntity_local[i]);
231  }
232 
233  // set the corners of the geometries
234  #ifdef ONLY_SIMPLEX_INTERSECTIONS
235  Dune::GeometryType type(Dune::GeometryType::simplex, mydim);
236  #else
237  #error Not Implemented
238  #endif
239  grid1localgeom_[par] = make_shared<Grid1LocalGeometry>(type, corners_element_local);
240 
241  // Add world geomety only for 0th parent
242  if (par == 0) {
243  typename GridGlue::Grid1Patch::Geometry
244  grid1WorldGeometry = glue.template patch<1>().geometry(grid1indices_[par]);
245 
246  // world coordinates of the remote intersection corners
247  std::array<Dune::FieldVector<ctype, GridGlue::Grid1View::dimensionworld>, nSimplexCorners> corners_global;
248 
249  for (std::size_t i=0; i<corners_subEntity_local.size(); i++) {
250  corners_global[i] = grid1WorldGeometry.global(corners_subEntity_local[i]);
251  }
252 
253  grid1geom_ = make_shared<Grid1Geometry>(type, corners_global);
254  }
255  }
256  }
257  }
258  }
259 
264  template<typename P0, typename P1, int P>
266 
267  template<typename P0, typename P1>
268  struct IntersectionDataView<P0, P1, 0>
269  {
273  static LocalGeometry& localGeometry(const IntersectionData<P0,P1> & i, unsigned int parentId = 0)
274  {
275  return *i.grid0localgeom_[parentId];
276  }
277  static Geometry& geometry(const IntersectionData<P0,P1> & i)
278  {
279  return *i.grid0geom_;
280  }
281  static bool local(const IntersectionData<P0,P1> & i)
282  {
283  return i.grid0local_;
284  }
285  static IndexType index(const IntersectionData<P0,P1> & i, unsigned int parentId = 0)
286  {
287  return i.grid0indices_[parentId];
288  }
289  static IndexType parents(const IntersectionData<P0,P1> & i)
290  {
291  return i.grid0indices_.size();
292  }
293  };
294 
295  template<typename P0, typename P1>
296  struct IntersectionDataView<P0, P1, 1>
297  {
301  static LocalGeometry& localGeometry(const IntersectionData<P0,P1> & i, unsigned int parentId = 0)
302  {
303  return *i.grid1localgeom_[parentId];
304  }
305  static Geometry& geometry(const IntersectionData<P0,P1> & i)
306  {
307  return *i.grid1geom_;
308  }
309  static IndexType local(const IntersectionData<P0,P1> & i)
310  {
311  return i.grid1local_;
312  }
313  static IndexType index(const IntersectionData<P0,P1> & i, unsigned int parentId = 0)
314  {
315  return i.grid1indices_[parentId];
316  }
317  static IndexType parents(const IntersectionData<P0,P1> & i)
318  {
319  return i.grid1indices_.size();
320  }
321  };
322 
327  template<typename P0, typename P1, int inside, int outside>
329 
330  template<typename P0, typename P1>
331  struct IntersectionTraits<P0,P1,0,1>
332  {
333  typedef ::Dune::GridGlue::GridGlue<P0, P1> GridGlue;
335 
338 
343 
344  enum {
347  insidePatch = 0,
348  outsidePatch = 1
349  };
350 
351  typedef typename GridGlue::ctype ctype;
352  typedef Dune::FieldVector<ctype, mydim> LocalCoordinate;
353  typedef Dune::FieldVector<ctype, coorddim> GlobalCoordinate;
354  };
355 
356  template<typename P0, typename P1>
357  struct IntersectionTraits<P0,P1,1,0>
358  {
359  typedef ::Dune::GridGlue::GridGlue<P0, P1> GridGlue;
361 
364 
371 
372  enum {
375  insidePatch = 1,
376  outsidePatch = 0
377  };
378 
379  typedef typename GridGlue::ctype ctype;
380  typedef Dune::FieldVector<ctype, mydim> LocalCoordinate;
381  typedef Dune::FieldVector<ctype, coorddim> GlobalCoordinate;
382  };
383 
386  template<typename P0, typename P1, int I, int O>
387  class Intersection
388  {
389 
390  public:
391 
393 
394  typedef typename Traits::GridGlue GridGlue;
395  typedef typename Traits::IntersectionData IntersectionData;
396 
397 
398  typedef typename Traits::InsideGridView InsideGridView;
399  typedef typename Traits::InsideLocalGeometry InsideLocalGeometry;
400 
401  typedef typename Traits::OutsideGridView OutsideGridView;
402  typedef typename Traits::OutsideLocalGeometry OutsideLocalGeometry;
403  typedef typename Traits::OutsideGeometry OutsideGeometry;
404 
405  typedef typename Traits::Geometry Geometry;
406  typedef typename Traits::ctype ctype;
407 
408  typedef typename InsideGridView::Traits::template Codim<0>::Entity InsideEntity;
409  typedef typename InsideGridView::Traits::template Codim<0>::EntityPointer InsideEntityPointer;
410 
411  typedef typename OutsideGridView::Traits::template Codim<0>::Entity OutsideEntity;
412  typedef typename OutsideGridView::Traits::template Codim<0>::EntityPointer OutsideEntityPointer;
413 
414  typedef typename Traits::LocalCoordinate LocalCoordinate;
415  typedef typename Traits::GlobalCoordinate GlobalCoordinate;
416 
417  enum {
419  coorddim = Traits::coorddim,
421  mydim = Traits::mydim,
423  insidePatch = Traits::insidePatch,
425  outsidePatch = Traits::outsidePatch
427  };
428 
429  // typedef unsigned int IndexType;
430 
431  private:
435  const static int codimensionWorld = coorddim - mydim;
436 
437  public:
438  /* C O N S T R U C T O R S */
439 
441  Intersection(const GridGlue* glue, const IntersectionData* i) :
442  glue_(glue), i_(i) {}
443 
444  /* F U N C T I O N A L I T Y */
445 
448 #if DUNE_VERSION_NEWER(DUNE_GRID, 2, 4) || DOXYGEN
449  InsideEntity
450 #else
451  InsideEntityPointer
452 #endif
453  inside(unsigned int parentId = 0) const
454  {
455  assert(self());
456  return glue_->template patch<I>().element(
457  IntersectionDataView<P0,P1,I>::index(*i_, parentId));
458  }
459 
462 #if DUNE_VERSION_NEWER(DUNE_GRID, 2, 4) || DOXYGEN
463  OutsideEntity
464 #else
465  OutsideEntityPointer
466 #endif
467  outside(unsigned int parentId = 0) const
468  {
469  assert(neighbor());
470  return glue_->template patch<O>().element(
471  IntersectionDataView<P0,P1,O>::index(*i_, parentId));
472  }
473 
475  bool conforming() const
476  {
477  throw Dune::NotImplemented();
478  }
479 
482  const InsideLocalGeometry& geometryInInside(unsigned int parentId = 0) const
483  {
484  return IntersectionDataView<P0,P1,I>::localGeometry(*i_, parentId);
485  }
486 
489  const OutsideLocalGeometry& geometryInOutside(unsigned int parentId = 0) const
490  {
491  return IntersectionDataView<P0,P1,O>::localGeometry(*i_, parentId);
492  }
493 
500  const Geometry& geometry() const
501  {
503  }
504 
511  const OutsideGeometry& geometryOutside() const // DUNE_DEPRECATED
512  {
514  }
515 
517  Dune::GeometryType type() const
518  {
519  #ifdef ONLY_SIMPLEX_INTERSECTIONS
520  static const Dune::GeometryType type(Dune::GeometryType::simplex, mydim);
521  return type;
522  #else
523  #error Not Implemented
524  #endif
525  }
526 
527 
529  bool self() const
530  {
532  }
533 
535  size_t neighbor(unsigned int g = 0) const
536  {
537  if (g == 0 && IntersectionDataView<P0,P1,O>::local(*i_)) {
539  } else if (g == 1 && IntersectionDataView<P0,P1,I>::local(*i_)) {
541  }
542  return 0;
543  }
544 
546  int indexInInside(unsigned int parentId = 0) const
547  {
548  assert(self());
549  return glue_->template patch<I>().indexInInside(
550  IntersectionDataView<P0,P1,I>::index(*i_, parentId));
551  }
552 
554  int indexInOutside(unsigned int parentId = 0) const
555  {
556  assert(neighbor());
557  return glue_->template patch<O>().indexInInside(
558  IntersectionDataView<P0,P1,O>::index(*i_, parentId));
559  }
560 
565  GlobalCoordinate outerNormal(const LocalCoordinate &local) const
566  {
567  GlobalCoordinate normal;
568 
569  if (codimensionWorld == 0)
570  DUNE_THROW(Dune::Exception, "There is no normal vector to a full-dimensional intersection");
571  else if (codimensionWorld == 1) {
572  /* TODO: Implement the general n-ary cross product here */
573  const auto jacobianTransposed = geometry().jacobianTransposed(local);
574  if (mydim==1) {
575  normal[0] = - jacobianTransposed[0][1];
576  normal[1] = jacobianTransposed[0][0];
577  } else if (mydim==2) {
578  normal[0] = (jacobianTransposed[0][1] * jacobianTransposed[1][2] - jacobianTransposed[0][2] * jacobianTransposed[1][1]);
579  normal[1] = - (jacobianTransposed[0][0] * jacobianTransposed[1][2] - jacobianTransposed[0][2] * jacobianTransposed[1][0]);
580  normal[2] = (jacobianTransposed[0][0] * jacobianTransposed[1][1] - jacobianTransposed[0][1] * jacobianTransposed[1][0]);
581  } else
582  DUNE_THROW(Dune::NotImplemented, "Remote intersections don't implement the 'outerNormal' method for " << mydim << "-dimensional intersections yet");
583  } else
584  DUNE_THROW(Dune::NotImplemented, "Remote intersections don't implement the 'outerNormal' method for intersections with codim >= 2 yet");
585 
586  return normal;
587  }
588 
593  GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
594  {
595  GlobalCoordinate normal = outerNormal(local);
596  normal /= normal.two_norm();
597  return normal;
598  }
599 
604  GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
605  {
606  return (unitOuterNormal(local) *= geometry().integrationElement(local));
607  }
608 
613  GlobalCoordinate centerUnitOuterNormal () const
614  {
615 #if DUNE_VERSION_NEWER(DUNE_GEOMETRY,2,3)
616  return unitOuterNormal(ReferenceElements<ctype,mydim>::general(type()).position(0,0));
617 #else
618  return unitOuterNormal(GenericReferenceElements<ctype,mydim>::general(type()).position(0,0));
619 #endif
620  }
621 
626  {
627  return Intersection<P0,P1,O,I>(glue_,i_);
628  }
629 
630 #ifdef QUICKHACK_INDEX
631  typedef typename GridGlue::IndexType IndexType;
632 
633  IndexType index() const
634  {
635  return i_->index_;
636  }
637 
638 #endif
639 
640  private:
641 
642  friend class IntersectionIndexSet<P0,P1>;
643 
644  /* M E M B E R V A R I A B L E S */
645 
647  const GridGlue* glue_;
648 
650  const IntersectionData* i_;
651  };
652 
653 
654  } // end namespace GridGlue
655 } // end namespace Dune
656 
657 #endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH
The intersection of two entities of the two patches of a GridGlue.
Definition: gridglue.hh:50
const IntersectionData< P0, P1 >::Grid1Geometry Geometry
Definition: intersection.hh:299
static LocalGeometry & localGeometry(const IntersectionData< P0, P1 > &i, unsigned int parentId=0)
Definition: intersection.hh:273
std::vector< shared_ptr< Grid0LocalGeometry > > grid0localgeom_
Definition: intersection.hh:97
InsideGridView::Traits::template Codim< 0 >::EntityPointer InsideEntityPointer
Definition: intersection.hh:409
bool grid0local_
true if the associated grid0 entity is local
Definition: intersection.hh:89
const IntersectionData::Grid0Geometry Geometry
Definition: intersection.hh:341
GridGlue::Grid0View OutsideGridView
Definition: intersection.hh:363
static Geometry & geometry(const IntersectionData< P0, P1 > &i)
Definition: intersection.hh:277
Definition: intersection.hh:265
Dune::GeometryType type() const
Type of reference element for this intersection.
Definition: intersection.hh:517
P1::GridView Grid1View
GridView of grid 1 (aka target grid)
Definition: gridglue.hh:150
GridGlue::Grid1View OutsideGridView
Definition: intersection.hh:337
GridGlue::Grid0View::IndexSet::IndexType Grid0IndexType
Definition: intersection.hh:75
Traits::IntersectionData IntersectionData
Definition: intersection.hh:395
Traits::GridGlue GridGlue
Definition: intersection.hh:394
Definition: gridglue.hh:56
std::vector< shared_ptr< Grid1LocalGeometry > > grid1localgeom_
Definition: intersection.hh:109
GridGlue::ctype ctype
Definition: intersection.hh:379
Dimension of the world space of the intersection.
Definition: intersection.hh:419
static Geometry & geometry(const IntersectionData< P0, P1 > &i)
Definition: intersection.hh:305
Definition: gridglue.hh:33
Traits::Geometry Geometry
Definition: intersection.hh:405
Traits::OutsideGeometry OutsideGeometry
Definition: intersection.hh:403
::Dune::GridGlue::GridGlue< P0, P1 > GridGlue
Definition: intersection.hh:39
shared_ptr< Grid0Geometry > grid0geom_
Definition: intersection.hh:105
Definition: intersection.hh:53
std::vector< Grid0IndexType > grid0indices_
indices of the associated local grid0 entity
Definition: intersection.hh:90
Dune::FieldVector< ctype, coorddim > GlobalCoordinate
Definition: intersection.hh:353
static bool local(const IntersectionData< P0, P1 > &i)
Definition: intersection.hh:281
shared_ptr< Grid1Geometry > grid1geom_
Definition: intersection.hh:117
Dune::FieldVector< ctype, mydim > LocalCoordinate
Definition: intersection.hh:380
Dune::GridGlue::IntersectionData< P0, P1 > IntersectionData
Definition: intersection.hh:360
static IndexType parents(const IntersectionData< P0, P1 > &i)
Definition: intersection.hh:289
Grid0View::ctype ctype
The type used for coordinates.
Definition: gridglue.hh:188
Traits::ctype ctype
Definition: intersection.hh:406
document the inside & outside patch
Definition: intersection.hh:424
const OutsideLocalGeometry & geometryInOutside(unsigned int parentId=0) const
Geometric information about this intersection in local coordinates of the outside() element...
Definition: intersection.hh:489
SimplexGeometry< typename GridGlue::Grid0View::ctype, mydim, GridGlue::Grid0View::dimensionworld > Grid0Geometry
Definition: intersection.hh:68
GridGlue::Grid1View::IndexSet::IndexType Grid1IndexType
Definition: intersection.hh:76
OutsideGridView::Traits::template Codim< 0 >::Entity OutsideEntity
Definition: intersection.hh:411
::Dune::GridGlue::GridGlue< P0, P1 > GridGlue
Definition: intersection.hh:333
const IntersectionData::Grid1IndexType InsideIndexType
Definition: intersection.hh:369
const IntersectionData::Grid1LocalGeometry InsideLocalGeometry
Definition: intersection.hh:365
Dimension of the intersection.
Definition: intersection.hh:421
std::vector< Grid1IndexType > grid1indices_
indices of the associated local grid1 entity
Definition: intersection.hh:92
static IndexType index(const IntersectionData< P0, P1 > &i, unsigned int parentId=0)
Definition: intersection.hh:285
const IntersectionData< P0, P1 >::Grid1LocalGeometry LocalGeometry
Definition: intersection.hh:298
const IntersectionData::Grid0IndexType OutsideIndexType
Definition: intersection.hh:370
const IntersectionData< P0, P1 >::Grid0Geometry Geometry
Definition: intersection.hh:271
storage class for Dune::GridGlue::Intersection related data
Definition: gridglue.hh:47
size_t neighbor(unsigned int g=0) const
Return number of embeddings into local grid0 (grid1) entities.
Definition: intersection.hh:535
const InsideLocalGeometry & geometryInInside(unsigned int parentId=0) const
Geometric information about this intersection in local coordinates of the inside() element...
Definition: intersection.hh:482
const IntersectionData< P0, P1 >::Grid1IndexType IndexType
Definition: intersection.hh:300
const IntersectionData::Grid1LocalGeometry OutsideLocalGeometry
Definition: intersection.hh:340
const IntersectionData::Grid0Geometry OutsideGeometry
Definition: intersection.hh:368
static IndexType local(const IntersectionData< P0, P1 > &i)
Definition: intersection.hh:309
contains customized geometry implementations for simplices
static LocalGeometry & localGeometry(const IntersectionData< P0, P1 > &i, unsigned int parentId=0)
Definition: intersection.hh:301
const IntersectionData< P0, P1 >::Grid0IndexType IndexType
Definition: intersection.hh:272
GridGlue::Grid1View InsideGridView
Definition: intersection.hh:362
export the world dimension : maximum of the two extractor world dimensions
Definition: gridglue.hh:181
SimplexGeometry< typename GridGlue::Grid0View::ctype, mydim, GridGlue::Grid0View::dimension > Grid0LocalGeometry
Definition: intersection.hh:66
Dune::GridGlue::IntersectionData< P0, P1 > IntersectionData
Definition: intersection.hh:334
static IndexType parents(const IntersectionData< P0, P1 > &i)
Definition: intersection.hh:317
GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
Return a unit outer normal.
Definition: intersection.hh:593
InsideGridView::Traits::template Codim< 0 >::Entity InsideEntity
Definition: intersection.hh:408
Definition: intersection.hh:328
GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
Return an outer normal with the length of the integration element.
Definition: intersection.hh:604
Traits::InsideGridView InsideGridView
Definition: intersection.hh:398
int indexInOutside(unsigned int parentId=0) const
Local number of codim 1 entity in outside() Entity where intersection is contained in...
Definition: intersection.hh:554
Traits::OutsideGridView OutsideGridView
Definition: intersection.hh:401
Intersection< P0, P1, O, I > flip() const
Return a copy of the intersection with inside and outside switched.
Definition: intersection.hh:625
GlobalCoordinate centerUnitOuterNormal() const
Unit outer normal at the center of the intersection.
Definition: intersection.hh:613
GridGlue::IndexType IndexType
Definition: intersection.hh:41
Dune::FieldVector< ctype, mydim > LocalCoordinate
Definition: intersection.hh:352
unsigned int IndexType
Definition: gridglue.hh:164
const IntersectionData::Grid1Geometry OutsideGeometry
Definition: intersection.hh:342
GridGlue::Grid0View InsideGridView
Definition: intersection.hh:336
Definition: intersection.hh:44
OutsideGridView::Traits::template Codim< 0 >::EntityPointer OutsideEntityPointer
Definition: intersection.hh:412
const IntersectionData::Grid1Geometry Geometry
Definition: intersection.hh:367
OutsideEntity outside(unsigned int parentId=0) const
Return element on the outside of this intersection.
Definition: intersection.hh:467
SimplexGeometry< typename GridGlue::Grid1View::ctype, mydim, GridGlue::Grid1View::dimensionworld > Grid1Geometry
Definition: intersection.hh:72
const IntersectionData< P0, P1 >::Grid0LocalGeometry LocalGeometry
Definition: intersection.hh:270
SimplexGeometry< typename GridGlue::Grid1View::ctype, mydim, GridGlue::Grid1View::dimension > Grid1LocalGeometry
Definition: intersection.hh:70
IntersectionTraits< P0, P1, I, O > Traits
Definition: intersection.hh:392
bool conforming() const
Return true if intersection is conforming.
Definition: intersection.hh:475
Central component of the module implementing the coupling of two grids.
static IndexType index(const IntersectionData< P0, P1 > &i, unsigned int parentId=0)
Definition: intersection.hh:313
GridGlue::ctype ctype
Definition: intersection.hh:351
Intersection(const GridGlue *glue, const IntersectionData *i)
Constructor for a given Dataset.
Definition: intersection.hh:441
bool grid1local_
true if the associated grid1 entity is local
Definition: intersection.hh:91
const Geometry & geometry() const
Geometric information about this intersection as part of the inside grid.
Definition: intersection.hh:500
Dune::FieldVector< ctype, coorddim > GlobalCoordinate
Definition: intersection.hh:381
Traits::InsideLocalGeometry InsideLocalGeometry
Definition: intersection.hh:399
Traits::GlobalCoordinate GlobalCoordinate
Definition: intersection.hh:415
const OutsideGeometry & geometryOutside() const
Geometric information about this intersection as part of the outside grid.
Definition: intersection.hh:511
const IntersectionData::Grid0LocalGeometry OutsideLocalGeometry
Definition: intersection.hh:366
Traits::OutsideLocalGeometry OutsideLocalGeometry
Definition: intersection.hh:402
P0::GridView Grid0View
GridView of grid 0 (aka domain grid)
Definition: gridglue.hh:126
InsideEntity inside(unsigned int parentId=0) const
Return element on the inside of this intersection.
Definition: intersection.hh:453
Definition: intersection.hh:425
const IntersectionData::Grid0LocalGeometry InsideLocalGeometry
Definition: intersection.hh:339
IndexType index_
index of this intersection after GridGlue interface
Definition: intersection.hh:87
GlobalCoordinate outerNormal(const LocalCoordinate &local) const
Return an outer normal (length not necessarily 1)
Definition: intersection.hh:565
int indexInInside(unsigned int parentId=0) const
Local number of codim 1 entity in the inside() Entity where intersection is contained in...
Definition: intersection.hh:546
This class is derived from BasicGeometry using tuned geometry traits.
Definition: simplexgeometry.hh:61
IntersectionData()
Default Constructor.
Definition: intersection.hh:82
::Dune::GridGlue::GridGlue< P0, P1 > GridGlue
Definition: intersection.hh:359
Traits::LocalCoordinate LocalCoordinate
Definition: intersection.hh:414