LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Loading...
Searching...
No Matches
scalar_concept.h
1
10#ifndef INCGe384f4f7485d447c8d3f33406a0f5f7e
11#define INCGe384f4f7485d447c8d3f33406a0f5f7e
12
13#include <complex>
14#include <type_traits>
15
16namespace lf::base {
17
25template <class T, typename = void>
26struct IsScalar {
27 static constexpr bool value = false;
28};
29
33template <class T>
34struct IsScalar<T, std::enable_if_t<std::is_arithmetic_v<T>>> {
35 static constexpr bool value = true;
36};
37
42template <class T>
43struct IsScalar<std::complex<T>, std::enable_if_t<std::is_arithmetic_v<T>>> {
44 static constexpr bool value = true;
45};
46
56template <class T>
58
59} // namespace lf::base
60
61#endif // INCGe384f4f7485d447c8d3f33406a0f5f7e
Concept which is fulfilled if a type T is a scalar type, i.e. if it is a "field" in the mathematical ...
Contains basic functionality that is used by other parts of LehrFEM++.
Definition base.h:15
Base Traits class which can be used to determine if a type T is a scalar value.
static constexpr bool value