version 3.9
periodic.hh
Go to the documentation of this file.
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-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_TYPETRAITS_PERIODIC_HH
13#define DUMUX_TYPETRAITS_PERIODIC_HH
14
15#include <dune/common/std/type_traits.hh>
16
17namespace Dumux::Detail {
18
20template<class GG>
21using GGPeriodicMapDetector = decltype(std::declval<GG>().periodicDofMap());
22
23template<class GG>
24constexpr inline bool hasPeriodicDofMap()
25{ return Dune::Std::is_detected<GGPeriodicMapDetector, GG>::value; }
26
27} // end namespace Dumux::Detail
28
29#endif
Distance implementation details.
Definition: cvfelocalresidual.hh:25
constexpr bool hasPeriodicDofMap()
Definition: periodic.hh:24
decltype(std::declval< GG >().periodicDofMap()) GGPeriodicMapDetector
helper struct detecting if a gridGeometry object has a periodicDofMap() function
Definition: periodic.hh:21