dune-grid-glue  2.7.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>
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
Dune
Definition: gridglue.hh:35
Dune::GridGlue::IntersectionIndexSet
Definition: gridglue.hh:52
Dune::GridGlue::IntersectionIndexSet::index
IndexType index(const Intersection< P0, P1, I, O > &i) const
Map Dune::GridGlue::Intersection to index.
Definition: intersectionindexset.hh:32
intersection.hh
Model of the Intersection concept provided by GridGlue.
gridglue.hh
Central component of the module implementing the coupling of two grids.
Dune::GridGlue::IntersectionIndexSet::IndexType
GridGlue::IndexType IndexType
The type used for the indices.
Definition: intersectionindexset.hh:25
Dune::GridGlue::Intersection
The intersection of two entities of the two patches of a GridGlue.
Definition: gridglue.hh:46
Dune::GridGlue::GridGlue
sequential adapter to couple two grids at specified close together boundaries
Definition: gridglue.hh:40
Dune::GridGlue::IntersectionIndexSet::SizeType
size_t SizeType
The type used for the size.
Definition: intersectionindexset.hh:27
Dune::GridGlue::IntersectionIndexSet::size
SizeType size() const
Return total number of intersections.
Definition: intersectionindexset.hh:39
Dune::GridGlue::GridGlue::size
size_t size() const
Definition: gridglue.hh:391
Dune::GridGlue::GridGlue::IndexType
unsigned int IndexType
Definition: gridglue.hh:145