gridfunction.hh 772 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_CURVED_SURFACE_GRID_GRIDFUNCTION_HH
#define DUNE_CURVED_SURFACE_GRID_GRIDFUNCTION_HH

#include <type_traits>

namespace Dune
{
  namespace Impl
  {
    template< class GF, class = void >
    struct GridOf;

    template< class GF >
    struct GridOf<GF, std::void_t<typename GF::GridView>>
    {
      using type = typename GF::GridView::Grid;
    };

    template< class GF >
    struct GridOf<GF, std::void_t<typename GF::Grid>>
    {
      using type = typename GF::Grid;
    };

  } // end namespace Impl

  template< class GF >
  using GridOf_t = typename Impl::GridOf<GF>::type;

} // end namespace Dune

#endif // DUNE_CURVED_SURFACE_GRID_GRIDFUNCTION_HH