dune-grid-glue  2.3.0
intersectionindexset.hh
Go to the documentation of this file.
1 #ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
2 #define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
3 
6 
7 #ifndef ONLY_SIMPLEX_INTERSECTIONS
8 // we currently support only one intersection type. If we want to support more,
9 // we have to think about the semantics of our IndexSet
10 #error Not Implemented
11 #endif
12 
13 namespace Dune {
14  namespace GridGlue {
15 
16  template<typename P0, typename P1>
17  class IntersectionIndexSet
18  {
19  friend class ::Dune::GridGlue::GridGlue<P0,P1>;
20  typedef ::Dune::GridGlue::GridGlue<P0,P1> GridGlue;
21 
22  public:
23 
25  typedef typename GridGlue::IndexType IndexType;
27  typedef size_t SizeType;
28 
31  template<int I, int O>
32  IndexType index (const Intersection<P0,P1,I,O> & i) const
33  {
34  return i.i_->index_;
35  }
36 
39  SizeType size () const
40  {
41  return glue_->size();
42  }
43 
44  private:
45 
47  IntersectionIndexSet(const GridGlue * g) :
48  glue_(g) {}
49 
50  const GridGlue * glue_;
51  };
52 
53  } // end namespace GridGlue
54 } // end namespace Dune
55 
56 #endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
size_t SizeType
The type used for the size.
Definition: intersectionindexset.hh:27
Model of the Intersection concept provided by GridGlue.
Definition: gridglue.hh:34
Central component of the module implementing the coupling of two grids.
GridGlue::IndexType IndexType
The type used for the indices.
Definition: intersectionindexset.hh:25
The intersection of two entities of the two patches of a GridGlue.
Definition: gridglue.hh:51
IndexType index(const Intersection< P0, P1, I, O > &i) const
Map Dune::GridGlue::Intersection to index.
Definition: intersectionindexset.hh:32
Definition: gridglue.hh:57
SizeType size() const
Return total number of intersections.
Definition: intersectionindexset.hh:39
size_t size() const
Definition: gridglue.hh:601
unsigned int IndexType
Definition: gridglue.hh:165
sequential adapter to couple two grids at specified close together boundaries
Definition: gridglue.hh:45