Dune Core Modules (2.4.1)

codimtable.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3
4#ifndef DUNE_GEOMETRY_GENERICGEOMETRY_CODIMTABLE_HH
5#define DUNE_GEOMETRY_GENERICGEOMETRY_CODIMTABLE_HH
6
10
11namespace Dune
12{
13
14 namespace GenericGeometry
15 {
16
17 template< template< int > class Element, int dim >
18 class CodimTable
19 {
20 friend class CodimTable< Element, dim+1 >;
21
22 typedef typename PushBackTuple<
23 typename CodimTable< Element, dim-1 >::ElementTuple,
24 Element< dim > >::type ElementTuple;
25
26 ElementTuple map_;
27
28 public:
29
30 template< int codim >
31 const Element< codim > &
32 operator[] ( const integral_constant< int, codim > codimVariable ) const
33 {
34 DUNE_UNUSED_PARAMETER(codimVariable);
35 return Dune::get<codim>(map_);
36 }
37
38 template< int codim >
39 Element< codim > &
40 operator[] ( const integral_constant< int, codim > codimVariable )
41 {
42 DUNE_UNUSED_PARAMETER(codimVariable);
43 return Dune::get<codim>(map_);
44 }
45 };
46
47
48 template< template< int > class Element>
49 class CodimTable< Element, -1 >
50 {
51 friend class CodimTable< Element, 0 >;
52 typedef typename Dune::tuple<> ElementTuple;
53 };
54
55 }
56
57}
58
59#endif // #ifndef DUNE_GEOMETRY_GENERICGEOMETRY_CODIMTABLE_HH
Dune namespace.
Definition: alignment.hh:10
Contains utility classes which can be used with tuples.
Traits for type conversions and type information.
Definition of the DUNE_UNUSED macro for the case that config.h is not available.
#define DUNE_UNUSED_PARAMETER(parm)
A macro to mark intentional unused function parameters with.
Definition: unused.hh:18
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 22, 23:33, 2024)