version 3.11-dev
Loading...
Searching...
No Matches
common/typetraits/problem.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-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_TYPETRAITS_PROBLEM_HH
13#define DUMUX_TYPETRAITS_PROBLEM_HH
14
15#include <type_traits>
17
18namespace Dumux {
19
20// forward declare
21namespace Detail {
22template<class Problem, class DiscretizationMethod>
24
25template<class Problem>
27{
28private:
29 template<class P>
30 static auto deduce(int) -> std::decay_t<decltype(std::declval<const P&>().gridGeometry())>;
31
32 template<class P>
33 static auto deduce(long) -> std::decay_t<decltype(std::declval<const P&>().gridDiscretization())>;
34
35public:
36 using type = decltype(deduce<Problem>(0));
37};
38
39template<class Problem>
41} // end namespace Detail
42
47template<class Problem>
53
54} // end namespace Dumux
55
56#endif
The available discretization methods in Dumux.
Definition cvfelocalresidual.hh:25
typename ProblemGridGeometryHelper< Problem >::type ProblemGridGeometry
Definition common/typetraits/problem.hh:40
Definition adapt.hh:17
Definition common/typetraits/problem.hh:27
decltype(deduce< Problem >(0)) type
Definition common/typetraits/problem.hh:36
Definition common/typetraits/problem.hh:23
Type traits for problem classes.
Definition common/typetraits/problem.hh:49
Detail::ProblemGridGeometry< Problem > GridGeometry
Definition common/typetraits/problem.hh:50
typename Detail::template ProblemTraits< Problem, typename GridGeometry::DiscretizationMethod >::BoundaryTypes BoundaryTypes
Definition common/typetraits/problem.hh:51