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