dune-grid-glue  2.4-git
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 dim1 = GridGlue::Grid0View::Grid::dimension - GridGlue::Grid0Patch::codim;
49  static const int dim2 = GridGlue::Grid1View::Grid::dimension - GridGlue::Grid1Patch::codim;
50 
51  public:
53  enum { mydim = (dim1<dim2) ? dim1 : dim2 };
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 
94  std::vector<shared_ptr<Grid0LocalGeometry> > grid0localgeom_;
95  shared_ptr<Grid0Geometry> grid0geom_;
96  std::vector<shared_ptr<Grid1LocalGeometry> > grid1localgeom_;
97  shared_ptr<Grid1Geometry> grid1geom_;
98 
99  };
100 
102  template<typename P0, typename P1>
103  IntersectionData<P0, P1>::IntersectionData(const GridGlue& glue, unsigned int mergeindex, unsigned int offset,
104  bool grid0local, bool grid1local)
105  : index_(mergeindex+offset),
106  grid0local_(grid0local),
107  grid1local_(grid1local)
108  {
109  unsigned int n_grid0Parents = glue.merger_->template parents<0>(mergeindex);
110  unsigned int n_grid1Parents = glue.merger_->template parents<1>(mergeindex);
111 
112  assert (0 <= n_grid0Parents || 0 <= n_grid1Parents);
113 
114  // init containers
115  grid0indices_.resize(n_grid0Parents);
116  grid0localgeom_.resize(n_grid0Parents);
117 
118  grid1indices_.resize(n_grid1Parents);
119  grid1localgeom_.resize(n_grid1Parents);
120 
121  // default values
122  grid0indices_[0] = 0;
123  grid1indices_[0] = 0;
124 
125  typedef typename GridGlue::ctype ctype;
126 
127  // Number of corners of the intersection
128  const int nSimplexCorners = mydim + 1;
129 
130  // if an invalid index is given do not proceed!
131  // (happens when the parent GridGlue initializes the "end"-Intersection)
132  assert (0 <= mergeindex || mergeindex < glue.index__sz);
133 
134  // initialize the local and the global geometries of grid0
135  {
136  // compute the coordinates of the subface's corners in codim 0 entity local coordinates
137  const int elementdim = GridGlue::Grid0View::template Codim<0>::Geometry::mydimension;
138 
139  // coordinates within the subentity that contains the remote intersection
140  std::array<Dune::FieldVector<ctype, dim1>, nSimplexCorners> corners_subEntity_local;
141 
142  for (unsigned int par = 0; par < n_grid0Parents; ++par) {
143  for (int i = 0; i < nSimplexCorners; ++i)
144  corners_subEntity_local[i] = glue.merger_->template parentLocal<0>(mergeindex, i, par);
145 
146  // Coordinates of the remote intersection corners wrt the element coordinate system
147  std::array<Dune::FieldVector<ctype, elementdim>, nSimplexCorners> corners_element_local;
148 
149  if (grid0local)
150  {
151  grid0indices_[par] = glue.merger_->template parent<0>(mergeindex,par);
152 
153  typename GridGlue::Grid0Patch::LocalGeometry
154  grid0LocalGeometry = glue.template patch<0>().geometryLocal(grid0indices_[par]);
155  typename GridGlue::Grid0Patch::Geometry grid0WorldGeometry1 = glue.template patch<0>().geometry(grid0indices_[par]);
156  for (std::size_t i=0; i<corners_subEntity_local.size(); i++) {
157  corners_element_local[i] = grid0LocalGeometry.global(corners_subEntity_local[i]);
158  }
159 
160  // set the corners of the local geometry
161  #ifdef ONLY_SIMPLEX_INTERSECTIONS
162  Dune::GeometryType type(Dune::GeometryType::simplex, mydim);
163  #else
164  #error Not Implemented
165  #endif
166  grid0localgeom_[par] = make_shared<Grid0LocalGeometry>(type, corners_element_local);
167 
168  // Add world geomety only for 0th parent
169  if (par == 0) {
170  typename GridGlue::Grid0Patch::Geometry
171  grid0WorldGeometry = glue.template patch<0>().geometry(grid0indices_[par]);
172 
173  // world coordinates of the remote intersection corners
174  std::array<Dune::FieldVector<ctype, GridGlue::Grid0View::dimensionworld>, nSimplexCorners> corners_global;
175 
176  for (std::size_t i=0; i<corners_subEntity_local.size(); i++) {
177  corners_global[i] = grid0WorldGeometry.global(corners_subEntity_local[i]);
178  }
179 
180  grid0geom_ = make_shared<Grid0Geometry>(type, corners_global);
181  }
182  }
183  }
184  }
185 
186  // do the same for the local and the global geometry of grid1
187  {
188  // compute the coordinates of the subface's corners in codim 0 entity local coordinates
189  const int elementdim = GridGlue::Grid1View::template Codim<0>::Geometry::mydimension;
190 
191  // coordinates within the subentity that contains the remote intersection
192  std::array<Dune::FieldVector<ctype, dim2>, nSimplexCorners> corners_subEntity_local;
193 
194  for (unsigned int par = 0; par < n_grid1Parents; ++par) {
195 
196  for (int i = 0; i < nSimplexCorners; ++i)
197  corners_subEntity_local[i] = glue.merger_->template parentLocal<1>(mergeindex, i, par);
198 
199  // Coordinates of the remote intersection corners wrt the element coordinate system
200  std::array<Dune::FieldVector<ctype, elementdim>, nSimplexCorners> corners_element_local;
201 
202  if (grid1local)
203  {
204  grid1indices_[par] = glue.merger_->template parent<1>(mergeindex, par);
205 
206  typename GridGlue::Grid1Patch::LocalGeometry
207  grid1LocalGeometry = glue.template patch<1>().geometryLocal(grid1indices_[par]);
208 
209  for (std::size_t i=0; i<corners_subEntity_local.size(); i++) {
210  corners_element_local[i] = grid1LocalGeometry.global(corners_subEntity_local[i]);
211  }
212 
213  // set the corners of the geometries
214  #ifdef ONLY_SIMPLEX_INTERSECTIONS
215  Dune::GeometryType type(Dune::GeometryType::simplex, mydim);
216  #else
217  #error Not Implemented
218  #endif
219  grid1localgeom_[par] = make_shared<Grid1LocalGeometry>(type, corners_element_local);
220 
221  // Add world geomety only for 0th parent
222  if (par == 0) {
223  typename GridGlue::Grid1Patch::Geometry
224  grid1WorldGeometry = glue.template patch<1>().geometry(grid1indices_[par]);
225 
226  // world coordinates of the remote intersection corners
227  std::array<Dune::FieldVector<ctype, GridGlue::Grid1View::dimensionworld>, nSimplexCorners> corners_global;
228 
229  for (std::size_t i=0; i<corners_subEntity_local.size(); i++) {
230  corners_global[i] = grid1WorldGeometry.global(corners_subEntity_local[i]);
231  }
232 
233  grid1geom_ = make_shared<Grid1Geometry>(type, corners_global);
234  }
235  }
236  }
237  }
238  }
239 
244  template<typename P0, typename P1, int P>
246 
247  template<typename P0, typename P1>
248  struct IntersectionDataView<P0, P1, 0>
249  {
253  static LocalGeometry& localGeometry(const IntersectionData<P0,P1> & i, unsigned int parentId = 0)
254  {
255  return *i.grid0localgeom_[parentId];
256  }
257  static Geometry& geometry(const IntersectionData<P0,P1> & i)
258  {
259  return *i.grid0geom_;
260  }
261  static bool local(const IntersectionData<P0,P1> & i)
262  {
263  return i.grid0local_;
264  }
265  static IndexType index(const IntersectionData<P0,P1> & i, unsigned int parentId = 0)
266  {
267  return i.grid0indices_[parentId];
268  }
269  static IndexType parents(const IntersectionData<P0,P1> & i)
270  {
271  return i.grid0indices_.size();
272  }
273  };
274 
275  template<typename P0, typename P1>
276  struct IntersectionDataView<P0, P1, 1>
277  {
281  static LocalGeometry& localGeometry(const IntersectionData<P0,P1> & i, unsigned int parentId = 0)
282  {
283  return *i.grid1localgeom_[parentId];
284  }
285  static Geometry& geometry(const IntersectionData<P0,P1> & i)
286  {
287  return *i.grid1geom_;
288  }
289  static IndexType local(const IntersectionData<P0,P1> & i)
290  {
291  return i.grid1local_;
292  }
293  static IndexType index(const IntersectionData<P0,P1> & i, unsigned int parentId = 0)
294  {
295  return i.grid1indices_[parentId];
296  }
297  static IndexType parents(const IntersectionData<P0,P1> & i)
298  {
299  return i.grid1indices_.size();
300  }
301  };
302 
307  template<typename P0, typename P1, int inside, int outside>
309 
310  template<typename P0, typename P1>
311  struct IntersectionTraits<P0,P1,0,1>
312  {
313  typedef ::Dune::GridGlue::GridGlue<P0, P1> GridGlue;
315 
318 
323 
324  enum {
327  insidePatch = 0,
328  outsidePatch = 1
329  };
330 
331  typedef typename GridGlue::ctype ctype;
332  typedef Dune::FieldVector<ctype, mydim> LocalCoordinate;
333  typedef Dune::FieldVector<ctype, coorddim> GlobalCoordinate;
334  };
335 
336  template<typename P0, typename P1>
337  struct IntersectionTraits<P0,P1,1,0>
338  {
339  typedef ::Dune::GridGlue::GridGlue<P0, P1> GridGlue;
341 
344 
351 
352  enum {
355  insidePatch = 1,
356  outsidePatch = 0
357  };
358 
359  typedef typename GridGlue::ctype ctype;
360  typedef Dune::FieldVector<ctype, mydim> LocalCoordinate;
361  typedef Dune::FieldVector<ctype, coorddim> GlobalCoordinate;
362  };
363 
366  template<typename P0, typename P1, int I, int O>
367  class Intersection
368  {
369 
370  public:
371 
373 
374  typedef typename Traits::GridGlue GridGlue;
375  typedef typename Traits::IntersectionData IntersectionData;
376 
377 
378  typedef typename Traits::InsideGridView InsideGridView;
379  typedef typename Traits::InsideLocalGeometry InsideLocalGeometry;
380 
381  typedef typename Traits::OutsideGridView OutsideGridView;
382  typedef typename Traits::OutsideLocalGeometry OutsideLocalGeometry;
383  typedef typename Traits::OutsideGeometry OutsideGeometry;
384 
385  typedef typename Traits::Geometry Geometry;
386  typedef typename Traits::ctype ctype;
387 
388  typedef typename InsideGridView::Traits::template Codim<0>::Entity InsideEntity;
389  typedef typename InsideGridView::Traits::template Codim<0>::EntityPointer InsideEntityPointer;
390 
391  typedef typename OutsideGridView::Traits::template Codim<0>::Entity OutsideEntity;
392  typedef typename OutsideGridView::Traits::template Codim<0>::EntityPointer OutsideEntityPointer;
393 
394  typedef typename Traits::LocalCoordinate LocalCoordinate;
395  typedef typename Traits::GlobalCoordinate GlobalCoordinate;
396 
397  enum {
399  coorddim = Traits::coorddim,
401  mydim = Traits::mydim,
403  insidePatch = Traits::insidePatch,
405  outsidePatch = Traits::outsidePatch
407  };
408 
409  // typedef unsigned int IndexType;
410 
411  /* C O N S T R U C T O R S */
412 
414  Intersection(const GridGlue* glue, const IntersectionData* i) :
415  glue_(glue), i_(i) {}
416 
417  /* F U N C T I O N A L I T Y */
418 
421 #if DUNE_VERSION_NEWER(DUNE_GRID, 2, 4) || DOXYGEN
422  InsideEntity
423 #else
424  InsideEntityPointer
425 #endif
426  inside(unsigned int parentId = 0) const
427  {
428  assert(self());
429  return glue_->template patch<I>().element(
430  IntersectionDataView<P0,P1,I>::index(*i_, parentId));
431  }
432 
435 #if DUNE_VERSION_NEWER(DUNE_GRID, 2, 4) || DOXYGEN
436  OutsideEntity
437 #else
438  OutsideEntityPointer
439 #endif
440  outside(unsigned int parentId = 0) const
441  {
442  assert(neighbor());
443  return glue_->template patch<O>().element(
444  IntersectionDataView<P0,P1,O>::index(*i_, parentId));
445  }
446 
448  bool conforming() const
449  {
450  throw Dune::NotImplemented();
451  }
452 
455  const InsideLocalGeometry& geometryInInside(unsigned int parentId = 0) const
456  {
457  return IntersectionDataView<P0,P1,I>::localGeometry(*i_, parentId);
458  }
459 
462  const OutsideLocalGeometry& geometryInOutside(unsigned int parentId = 0) const
463  {
464  return IntersectionDataView<P0,P1,O>::localGeometry(*i_, parentId);
465  }
466 
469  const Geometry& geometry() const
470  {
472  }
473 
476  const OutsideGeometry& geometryOutside() const // DUNE_DEPRECATED
477  {
479  }
480 
482  Dune::GeometryType type() const
483  {
484  #ifdef ONLY_SIMPLEX_INTERSECTIONS
485  static const Dune::GeometryType type(Dune::GeometryType::simplex, mydim);
486  return type;
487  #else
488  #error Not Implemented
489  #endif
490  }
491 
492 
494  bool self() const
495  {
497  }
498 
500  size_t neighbor(unsigned int g = 0) const
501  {
502  if (g == 0 && IntersectionDataView<P0,P1,O>::local(*i_)) {
504  } else if (g == 1 && IntersectionDataView<P0,P1,I>::local(*i_)) {
506  }
507  return 0;
508  }
509 
511  int indexInInside(unsigned int parentId = 0) const
512  {
513  assert(self());
514  return glue_->template patch<I>().indexInInside(
515  IntersectionDataView<P0,P1,I>::index(*i_, parentId));
516  }
517 
519  int indexInOutside(unsigned int parentId = 0) const
520  {
521  assert(neighbor());
522  return glue_->template patch<O>().indexInInside(
523  IntersectionDataView<P0,P1,O>::index(*i_, parentId));
524  }
525 
527  GlobalCoordinate outerNormal(const Dune::FieldVector<ctype, mydim> &local) const
528  {
529  Dune::FieldVector<ctype, coorddim> normal;
530 
531  // Codimension with respect to the world(!)
532  int codimension = coorddim - mydim;
533 
534  if (codimension == 0)
535 
536  DUNE_THROW(Dune::Exception, "There is no normal vector to a full-dimensional intersection");
537 
538  else if (codimension == 1) {
539 
541  FieldMatrix<ctype, mydim,coorddim> jacobianTransposed = geometry().jacobianTransposed(local);
542  if (mydim==1) {
543  normal[0] = - jacobianTransposed[0][1];
544  normal[1] = jacobianTransposed[0][0];
545  } else if (mydim==2) {
546  normal[0] = (jacobianTransposed[0][1] * jacobianTransposed[1][2] - jacobianTransposed[0][2] * jacobianTransposed[1][1]);
547  normal[1] = - (jacobianTransposed[0][0] * jacobianTransposed[1][2] - jacobianTransposed[0][2] * jacobianTransposed[1][0]);
548  normal[2] = (jacobianTransposed[0][0] * jacobianTransposed[1][1] - jacobianTransposed[0][1] * jacobianTransposed[1][0]);
549  } else
550  DUNE_THROW(Dune::NotImplemented, "Remote intersections don't implement the 'outerNormal' method for " << mydim << "-dimensional intersections yet");
551 
552  } else
553  DUNE_THROW(Dune::NotImplemented, "Remote intersections don't implement the 'outerNormal' method for intersections with codim >= 2 yet");
554 
555  return normal;
556  }
557 
559  GlobalCoordinate unitOuterNormal(const Dune::FieldVector<ctype, mydim> &local) const
560  {
561  Dune::FieldVector<ctype, coorddim> normal = outerNormal(local);
562  normal /= normal.two_norm();
563  return normal;
564  }
565 
567  GlobalCoordinate integrationOuterNormal(const Dune::FieldVector<ctype, mydim> &local) const
568  {
569  return (unitOuterNormal(local) *= geometry().integrationElement(local));
570  }
571 
576  GlobalCoordinate centerUnitOuterNormal () const
577  {
578 #if DUNE_VERSION_NEWER(DUNE_GEOMETRY,2,3)
579  return unitOuterNormal(ReferenceElements<ctype,mydim>::general(type()).position(0,0));
580 #else
581  return unitOuterNormal(GenericReferenceElements<ctype,mydim>::general(type()).position(0,0));
582 #endif
583  }
584 
586  {
587  return Intersection<P0,P1,O,I>(glue_,i_);
588  }
589 
590 #ifdef QUICKHACK_INDEX
591  typedef typename GridGlue::IndexType IndexType;
592 
593  IndexType index() const
594  {
595  return i_->index_;
596  }
597 
598 #endif
599 
600  private:
601 
602  friend class IntersectionIndexSet<P0,P1>;
603 
604  /* M E M B E R V A R I A B L E S */
605 
607  const GridGlue* glue_;
608 
610  const IntersectionData* i_;
611  };
612 
613 
614  } // end namespace GridGlue
615 } // end namespace Dune
616 
617 #endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH
IntersectionTraits< P0, P1, I, O > Traits
Definition: intersection.hh:372
static Geometry & geometry(const IntersectionData< P0, P1 > &i)
Definition: intersection.hh:257
const IntersectionData< P0, P1 >::Grid0LocalGeometry LocalGeometry
Definition: intersection.hh:250
GridGlue::Grid1View OutsideGridView
Definition: intersection.hh:317
Dimension of the world space of the intersection.
Definition: intersection.hh:399
std::vector< Grid0IndexType > grid0indices_
indices of the associated local grid0 entity
Definition: intersection.hh:90
Traits::IntersectionData IntersectionData
Definition: intersection.hh:375
Dimension of the intersection.
Definition: intersection.hh:401
static bool local(const IntersectionData< P0, P1 > &i)
Definition: intersection.hh:261
GridGlue::Grid0View OutsideGridView
Definition: intersection.hh:343
const IntersectionData::Grid1IndexType InsideIndexType
Definition: intersection.hh:349
contains customized geometry implementations for simplices
P0::GridView Grid0View
GridView of grid 0 (aka domain grid)
Definition: gridglue.hh:126
Definition: intersection.hh:44
storage class for Dune::GridGlue::Intersection related data
Definition: gridglue.hh:47
std::vector< shared_ptr< Grid0LocalGeometry > > grid0localgeom_
Definition: intersection.hh:94
Traits::OutsideGeometry OutsideGeometry
Definition: intersection.hh:383
Traits::LocalCoordinate LocalCoordinate
Definition: intersection.hh:394
Dune::FieldVector< ctype, mydim > LocalCoordinate
Definition: intersection.hh:332
Dune::GeometryType type() const
Type of reference element for this intersection.
Definition: intersection.hh:482
const InsideLocalGeometry & geometryInInside(unsigned int parentId=0) const
Geometric information about this intersection in local coordinates of the inside() entity...
Definition: intersection.hh:455
static IndexType parents(const IntersectionData< P0, P1 > &i)
Definition: intersection.hh:297
bool conforming() const
Return true if intersection is conforming.
Definition: intersection.hh:448
GridGlue::Grid1View::IndexSet::IndexType Grid1IndexType
Definition: intersection.hh:76
Traits::GlobalCoordinate GlobalCoordinate
Definition: intersection.hh:395
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:511
Central component of the module implementing the coupling of two grids.
const IntersectionData::Grid1LocalGeometry InsideLocalGeometry
Definition: intersection.hh:345
const IntersectionData::Grid0Geometry OutsideGeometry
Definition: intersection.hh:348
const IntersectionData::Grid1LocalGeometry OutsideLocalGeometry
Definition: intersection.hh:320
const IntersectionData< P0, P1 >::Grid0Geometry Geometry
Definition: intersection.hh:251
const IntersectionData< P0, P1 >::Grid1LocalGeometry LocalGeometry
Definition: intersection.hh:278
const IntersectionData::Grid0IndexType OutsideIndexType
Definition: intersection.hh:350
const Geometry & geometry() const
Geometric information about this intersection as part of the inside grid.
Definition: intersection.hh:469
static LocalGeometry & localGeometry(const IntersectionData< P0, P1 > &i, unsigned int parentId=0)
Definition: intersection.hh:253
Traits::InsideLocalGeometry InsideLocalGeometry
Definition: intersection.hh:379
const OutsideGeometry & geometryOutside() const
Geometric information about this intersection as part of the outside grid.
Definition: intersection.hh:476
shared_ptr< Grid1Geometry > grid1geom_
Definition: intersection.hh:97
static IndexType parents(const IntersectionData< P0, P1 > &i)
Definition: intersection.hh:269
const IntersectionData< P0, P1 >::Grid0IndexType IndexType
Definition: intersection.hh:252
::Dune::GridGlue::GridGlue< P0, P1 > GridGlue
Definition: intersection.hh:39
shared_ptr< Grid0Geometry > grid0geom_
Definition: intersection.hh:95
bool grid0local_
true if the associated grid0 entity is local
Definition: intersection.hh:89
P1::GridView Grid1View
GridView of grid 1 (aka target grid)
Definition: gridglue.hh:150
SimplexGeometry< typename GridGlue::Grid0View::ctype, mydim, GridGlue::Grid0View::dimensionworld > Grid0Geometry
Definition: intersection.hh:68
Intersection(const GridGlue *glue, const IntersectionData *i)
Constructor for a given Dataset.
Definition: intersection.hh:414
const IntersectionData::Grid1Geometry Geometry
Definition: intersection.hh:347
document the inside & outside patch
Definition: intersection.hh:404
Traits::InsideGridView InsideGridView
Definition: intersection.hh:378
GridGlue::Grid1View InsideGridView
Definition: intersection.hh:342
static IndexType index(const IntersectionData< P0, P1 > &i, unsigned int parentId=0)
Definition: intersection.hh:265
const IntersectionData::Grid1Geometry OutsideGeometry
Definition: intersection.hh:322
GridGlue::Grid0View InsideGridView
Definition: intersection.hh:316
InsideEntity inside(unsigned int parentId=0) const
Return EntityPointer to the Entity on the inside of this intersection.
Definition: intersection.hh:426
const IntersectionData::Grid0LocalGeometry InsideLocalGeometry
Definition: intersection.hh:319
Dune::GridGlue::IntersectionData< P0, P1 > IntersectionData
Definition: intersection.hh:340
int indexInOutside(unsigned int parentId=0) const
Local number of codim 1 entity in outside() Entity where intersection is contained in...
Definition: intersection.hh:519
GlobalCoordinate unitOuterNormal(const Dune::FieldVector< ctype, mydim > &local) const
Return a unit outer normal.
Definition: intersection.hh:559
std::vector< Grid1IndexType > grid1indices_
indices of the associated local grid1 entity
Definition: intersection.hh:92
InsideGridView::Traits::template Codim< 0 >::Entity InsideEntity
Definition: intersection.hh:388
size_t neighbor(unsigned int g=0) const
For parallel computations: Return true if outside() entity exists locally.
Definition: intersection.hh:500
static IndexType index(const IntersectionData< P0, P1 > &i, unsigned int parentId=0)
Definition: intersection.hh:293
const IntersectionData< P0, P1 >::Grid1IndexType IndexType
Definition: intersection.hh:280
Grid0View::ctype ctype
The type used for coordinates.
Definition: gridglue.hh:188
Definition: intersection.hh:53
Traits::OutsideLocalGeometry OutsideLocalGeometry
Definition: intersection.hh:382
Intersection< P0, P1, O, I > flip() const
Definition: intersection.hh:585
const OutsideLocalGeometry & geometryInOutside(unsigned int parentId=0) const
Geometric information about this intersection in local coordinates of the outside() entity...
Definition: intersection.hh:462
const IntersectionData::Grid0Geometry Geometry
Definition: intersection.hh:321
SimplexGeometry< typename GridGlue::Grid0View::ctype, mydim, GridGlue::Grid0View::dimension > Grid0LocalGeometry
Definition: intersection.hh:66
SimplexGeometry< typename GridGlue::Grid1View::ctype, mydim, GridGlue::Grid1View::dimension > Grid1LocalGeometry
Definition: intersection.hh:70
InsideGridView::Traits::template Codim< 0 >::EntityPointer InsideEntityPointer
Definition: intersection.hh:389
GridGlue::ctype ctype
Definition: intersection.hh:331
export the world dimension : maximum of the two extractor world dimensions
Definition: gridglue.hh:181
Traits::GridGlue GridGlue
Definition: intersection.hh:374
Dune::GridGlue::IntersectionData< P0, P1 > IntersectionData
Definition: intersection.hh:314
GlobalCoordinate outerNormal(const Dune::FieldVector< ctype, mydim > &local) const
Return an outer normal (length not necessarily 1)
Definition: intersection.hh:527
GridGlue::ctype ctype
Definition: intersection.hh:359
GridGlue::IndexType IndexType
Definition: intersection.hh:41
The intersection of two entities of the two patches of a GridGlue.
Definition: gridglue.hh:50
static IndexType local(const IntersectionData< P0, P1 > &i)
Definition: intersection.hh:289
static LocalGeometry & localGeometry(const IntersectionData< P0, P1 > &i, unsigned int parentId=0)
Definition: intersection.hh:281
OutsideGridView::Traits::template Codim< 0 >::EntityPointer OutsideEntityPointer
Definition: intersection.hh:392
GlobalCoordinate integrationOuterNormal(const Dune::FieldVector< ctype, mydim > &local) const
Return an outer normal with the length of the integration element.
Definition: intersection.hh:567
const IntersectionData::Grid0LocalGeometry OutsideLocalGeometry
Definition: intersection.hh:346
Definition: gridglue.hh:33
::Dune::GridGlue::GridGlue< P0, P1 > GridGlue
Definition: intersection.hh:313
SimplexGeometry< typename GridGlue::Grid1View::ctype, mydim, GridGlue::Grid1View::dimensionworld > Grid1Geometry
Definition: intersection.hh:72
static Geometry & geometry(const IntersectionData< P0, P1 > &i)
Definition: intersection.hh:285
Traits::OutsideGridView OutsideGridView
Definition: intersection.hh:381
Dune::FieldVector< ctype, coorddim > GlobalCoordinate
Definition: intersection.hh:333
Dune::FieldVector< ctype, mydim > LocalCoordinate
Definition: intersection.hh:360
Definition: intersection.hh:308
Definition: gridglue.hh:56
Traits::Geometry Geometry
Definition: intersection.hh:385
bool grid1local_
true if the associated grid1 entity is local
Definition: intersection.hh:91
OutsideGridView::Traits::template Codim< 0 >::Entity OutsideEntity
Definition: intersection.hh:391
const IntersectionData< P0, P1 >::Grid1Geometry Geometry
Definition: intersection.hh:279
GlobalCoordinate centerUnitOuterNormal() const
Unit outer normal at the center of the intersection.
Definition: intersection.hh:576
OutsideEntity outside(unsigned int parentId=0) const
Return EntityPointer to the Entity on the outside of this intersection.
Definition: intersection.hh:440
Definition: intersection.hh:245
Definition: intersection.hh:405
Traits::ctype ctype
Definition: intersection.hh:386
::Dune::GridGlue::GridGlue< P0, P1 > GridGlue
Definition: intersection.hh:339
unsigned int IndexType
Definition: gridglue.hh:164
GridGlue::Grid0View::IndexSet::IndexType Grid0IndexType
Definition: intersection.hh:75
std::vector< shared_ptr< Grid1LocalGeometry > > grid1localgeom_
Definition: intersection.hh:96
IntersectionData()
Default Constructor.
Definition: intersection.hh:82
Dune::FieldVector< ctype, coorddim > GlobalCoordinate
Definition: intersection.hh:361
This class is derived from BasicGeometry using tuned geometry traits.
Definition: simplexgeometry.hh:62
IndexType index_
index of this intersection after GridGlue interface
Definition: intersection.hh:87