dune-grid-glue 2.9
Loading...
Searching...
No Matches
intersectionindexset.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
3#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
4#define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
5
8
9#ifndef ONLY_SIMPLEX_INTERSECTIONS
10// we currently support only one intersection type. If we want to support more,
11// we have to think about the semantics of our IndexSet
12#error Not Implemented
13#endif
14
15namespace Dune {
16 namespace GridGlue {
17
18 template<typename P0, typename P1>
20 {
21 friend class ::Dune::GridGlue::GridGlue<P0,P1>;
22 typedef ::Dune::GridGlue::GridGlue<P0,P1> GridGlue;
23
24 public:
25
29 typedef size_t SizeType;
30
33 template<int I, int O>
35 {
36 return i.i_->index_;
37 }
38
41 SizeType size () const
42 {
43 return glue_->size();
44 }
45
46 private:
47
50 glue_(g) {}
51
52 const GridGlue * glue_;
53 };
54
55 } // end namespace GridGlue
56} // end namespace Dune
57
58#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
Central component of the module implementing the coupling of two grids.
Model of the Intersection concept provided by GridGlue.
Definition gridglue.hh:37
sequential adapter to couple two grids at specified close together boundaries
Definition gridglue.hh:67
unsigned int IndexType
Definition gridglue.hh:147
size_t size() const
Definition gridglue.hh:393
IndexType index_
index of this intersection after GridGlue interface
Definition intersection.hh:112
The intersection of two entities of the two patches of a GridGlue.
Definition intersection.hh:261
Definition intersectionindexset.hh:20
SizeType size() const
Return total number of intersections.
Definition intersectionindexset.hh:41
GridGlue::IndexType IndexType
The type used for the indices.
Definition intersectionindexset.hh:27
IndexType index(const Intersection< P0, P1, I, O > &i) const
Map Dune::GridGlue::Intersection to index.
Definition intersectionindexset.hh:34
size_t SizeType
The type used for the size.
Definition intersectionindexset.hh:29