Skip to content

Commit

Permalink
more constexpr
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Nov 13, 2023
1 parent ed7d63a commit e671a1c
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions EOS/helmholtz/actual_eos.H
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e671a1c

Please sign in to comment.