ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
constants.hpp
Go to the documentation of this file.
1#ifndef VIENNASHE_MATH_CONSTANTS_HPP
2#define VIENNASHE_MATH_CONSTANTS_HPP
3
4/* ============================================================================
5 Copyright (c) 2011-2022, Institute for Microelectronics,
6 Institute for Analysis and Scientific Computing,
7 TU Wien.
8
9 -----------------
10 ViennaSHE - The Vienna Spherical Harmonics Expansion Boltzmann Solver
11 -----------------
12
13 http://viennashe.sourceforge.net/
14
15 License: MIT (X11), see file LICENSE in the base directory
16=============================================================================== */
17
22namespace viennashe
23{
24 namespace math
25 {
27 namespace detail
28 {
30 template <bool dummy = true> //template argument in order to control linkage
31 struct constants
32 {
34 static const double pi;
35
37 static const double e;
38
39 };
40
41 template <bool b>
42 const double constants<b>::pi = 3.1415926535897932384626433832795; // 1
43
44 template <bool b>
45 const double constants<b>::e = 2.718281828459045235360287471352; // 1
46 }
47
50
51 } //namespace math
52} //namespace viennashe
53#endif
detail::constants constants
Convenience typedef for accessing mathematical constants, e.g. viennashe::math::constants::pi.
Definition: constants.hpp:49
The main ViennaSHE namespace. All functionality resides inside this namespace.
Definition: accessors.hpp:40
Implementation class holding basic math constants.
Definition: constants.hpp:32
static const double e
Euler's number.
Definition: constants.hpp:37
static const double pi
Pi.
Definition: constants.hpp:34