diff --git a/EOS/helmholtz/actual_eos.H b/EOS/helmholtz/actual_eos.H index 737dc87ec9..b1719d5672 100644 --- a/EOS/helmholtz/actual_eos.H +++ b/EOS/helmholtz/actual_eos.H @@ -477,9 +477,9 @@ void apply_ions (T& state) { using namespace helmholtz; - const Real pi = 3.1415926535897932384e0_rt; - const Real sioncon = (2.0e0_rt * pi * amu * kerg)/(h*h); - const Real kergavo = kerg * avo_eos; + constexpr Real pi = 3.1415926535897932384e0_rt; + constexpr Real sioncon = (2.0e0_rt * pi * amu * kerg)/(h*h); + constexpr Real kergavo = kerg * avo_eos; Real deni = 1.0e0_rt / state.rho; Real tempi = 1.0e0_rt / state.T; @@ -553,14 +553,14 @@ void apply_radiation (T& state) { using namespace helmholtz; - const Real clight = 2.99792458e10_rt; + constexpr Real clight = 2.99792458e10_rt; #ifdef RADIATION - const Real ssol = 0.0e0_rt; + constexpr Real ssol = 0.0e0_rt; #else - const Real ssol = 5.67051e-5_rt; + constexpr Real ssol = 5.67051e-5_rt; #endif - const Real asol = 4.0e0_rt * ssol / clight; - const Real asoli3 = asol/3.0e0_rt; + constexpr Real asol = 4.0e0_rt * ssol / clight; + constexpr Real asoli3 = asol/3.0e0_rt; Real deni = 1.0e0_rt / state.rho; Real tempi = 1.0e0_rt / state.T; @@ -638,19 +638,19 @@ void apply_coulomb_corrections (T& state) using namespace helmholtz; // Constants used for the Coulomb corrections - const Real a1 = -0.898004e0_rt; - const Real b1 = 0.96786e0_rt; - const Real c1 = 0.220703e0_rt; - const Real d1 = -0.86097e0_rt; - const Real e1 = 2.5269e0_rt; - const Real a2 = 0.29561e0_rt; - const Real b2 = 1.9885e0_rt; - const Real c2 = 0.288675e0_rt; - const Real qe = 4.8032042712e-10_rt; - const Real esqu = qe * qe; - const Real onethird = 1.0e0_rt/3.0e0_rt; - const Real forth = 4.0e0_rt/3.0e0_rt; - const Real pi = 3.1415926535897932384e0_rt; + constexpr Real a1 = -0.898004e0_rt; + constexpr Real b1 = 0.96786e0_rt; + constexpr Real c1 = 0.220703e0_rt; + constexpr Real d1 = -0.86097e0_rt; + constexpr Real e1 = 2.5269e0_rt; + constexpr Real a2 = 0.29561e0_rt; + constexpr Real b2 = 1.9885e0_rt; + constexpr Real c2 = 0.288675e0_rt; + constexpr Real qe = 4.8032042712e-10_rt; + constexpr Real esqu = qe * qe; + constexpr Real onethird = 1.0e0_rt/3.0e0_rt; + constexpr Real forth = 4.0e0_rt/3.0e0_rt; + constexpr Real pi = 3.1415926535897932384e0_rt; [[maybe_unused]] Real pcoul = 0.e0_rt; [[maybe_unused]] Real dpcouldd = 0.e0_rt;