version 3.11-dev
Loading...
Searching...
No Matches
assemblytraits.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//
13#ifndef DUMUX_MULTIDOMAIN_ASSEMBLY_TRAITS_HH
14#define DUMUX_MULTIDOMAIN_ASSEMBLY_TRAITS_HH
15
16#include <type_traits>
17#include <utility>
18
19#include <dune/common/std/type_traits.hh>
20
21namespace Dumux {
22
23namespace Detail {
24
26template<class P>
27using SubProblemConstraintsDetector = decltype(std::declval<P>().constraints());
28
29template<class P>
30constexpr inline bool hasSubProblemGlobalConstraints()
31{ return Dune::Std::is_detected<SubProblemConstraintsDetector, P>::value; }
32
33} // end namespace Detail
34
41template<class CM>
42struct CouplingManagerSupportsMultithreadedAssembly : public std::false_type
43{};
44
45} // end namespace Dumux
46
47#endif
Definition cvfelocalresidual.hh:25
decltype(std::declval< P >().constraints()) SubProblemConstraintsDetector
helper struct detecting if sub-problem has a constraints() function
Definition assemblytraits.hh:27
constexpr bool hasSubProblemGlobalConstraints()
Definition assemblytraits.hh:30
Definition adapt.hh:17
Type trait that is specialized for coupling manager supporting multithreaded assembly.
Definition assemblytraits.hh:43