Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
constants.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
48namespace shambase::constants {
49
50 // clang-format off
51 template<class T> constexpr T unity = 1;
52 template<class T> constexpr T zero = 0;
53 template<class T> constexpr T pi = 3.141592653589793116;
54 template<class T> constexpr T tau = 6.283185307179586232;
55 template<class T> constexpr T pi_square = 9.8696044010893579923;
56 template<class T> constexpr T pi2_sqrt = 2.5066282746310002416;
57 template<class T> constexpr T gamma_1_6 = 5.5663160017802360002;
58 template<class T> constexpr T gamma_1_5 = 4.590843711998803478;
59 template<class T> constexpr T gamma_1_4 = 3.6256099082219086505;
60 template<class T> constexpr T gamma_1_3 = 2.6789385347077478983;
61 template<class T> constexpr T gamma_2_5 = 2.2181595437576877572;
62 template<class T> constexpr T gamma_1_2 = 1.7724538509055158819;
63 template<class T> constexpr T gamma_3_5 = 1.4891922488128168656;
64 template<class T> constexpr T gamma_2_3 = 1.3541179394264004632;
65 template<class T> constexpr T gamma_3_4 = 1.225416702465177865;
66 template<class T> constexpr T gamma_4_5 = 1.1642297137253030392;
67 template<class T> constexpr T gamma_5_6 = 1.1287870299081257386;
68 template<class T> constexpr T gamma_1 = 1;
69 template<class T> constexpr T sqrt_2 = 1.4142135623730951455;
70 template<class T> constexpr T sqrt_pi = 1.7724538509055158819; // same as gamma_1_2
71 template<class T> constexpr T e = 2.7182818284590450908;
72 // clang-format on
73
74} // namespace shambase::constants