Line | Branch | Exec | Source |
---|---|---|---|
1 | // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- | ||
2 | // vi: set et ts=4 sw=4 sts=4: | ||
3 | // | ||
4 | // SPDX-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder | ||
5 | // SPDX-License-Identifier: GPL-3.0-or-later | ||
6 | // | ||
7 | /*! | ||
8 | * \file | ||
9 | * \ingroup InputOutput | ||
10 | * \brief Grid properties related to periodicity | ||
11 | */ | ||
12 | |||
13 | #ifndef DUMUX_IO_GRID_PERIODIC_GRID_TRAITS_HH | ||
14 | #define DUMUX_IO_GRID_PERIODIC_GRID_TRAITS_HH | ||
15 | |||
16 | #include <type_traits> | ||
17 | #include <dune/common/std/type_traits.hh> | ||
18 | |||
19 | namespace Dumux { | ||
20 | |||
21 | template<typename Grid> | ||
22 | struct PeriodicGridTraits | ||
23 | { | ||
24 | struct SupportsPeriodicity : public std::false_type {}; | ||
25 | |||
26 |
6/10✓ Branch 1 taken 295 times.
✓ Branch 2 taken 18 times.
✓ Branch 5 taken 4 times.
✗ Branch 6 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
✓ Branch 4 taken 28 times.
✗ Branch 3 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
|
705 | PeriodicGridTraits(const Grid& grid) {}; |
27 | |||
28 | bool isPeriodic (const typename Grid::LeafIntersection& intersection) const | ||
29 | { | ||
30 | return false; | ||
31 | } | ||
32 | }; | ||
33 | |||
34 | template<class T> | ||
35 | class SupportsPeriodicity | ||
36 | { | ||
37 | template<class G> | ||
38 | using SP = typename G::SupportsPeriodicity; | ||
39 | public: | ||
40 | using type = typename Dune::Std::detected_or<std::false_type, SP, T>::type; | ||
41 | }; | ||
42 | |||
43 | template<class T> | ||
44 | static constexpr bool supportsPeriodicity() | ||
45 | { return typename SupportsPeriodicity<T>::type(); } | ||
46 | |||
47 | } // end namespace Dumux | ||
48 | |||
49 | #endif | ||
50 |