@@ -54,7 +54,7 @@ void actual_eos (I input, T& state)
5454 // Get the mass of a nucleon from m_u.
5555 const amrex::Real m_nucleon = C::m_u;
5656
57- if constexpr (has_xn<T>::value ) {
57+ if constexpr (has_xn<T>) {
5858 if (eos_rp::eos_assume_neutral) {
5959 state.mu = state.abar ;
6060 } else {
@@ -86,7 +86,7 @@ void actual_eos (I input, T& state)
8686 // Solve for the temperature:
8787 // h = e + p/rho = (p/rho)*[1 + 1/(gamma-1)] = (p/rho)*gamma/(gamma-1)
8888
89- if constexpr (has_enthalpy<T>::value ) {
89+ if constexpr (has_enthalpy<T>) {
9090 state.T = (state.h * state.mu * m_nucleon / C::k_B)*(eos_rp::eos_gamma - 1.0 )/eos_rp::eos_gamma;
9191 }
9292
@@ -99,7 +99,7 @@ void actual_eos (I input, T& state)
9999 // Solve for the density:
100100 // p = rho k T / (mu m_nucleon)
101101
102- if constexpr (has_pressure<T>::value ) {
102+ if constexpr (has_pressure<T>) {
103103 state.rho = state.p * state.mu * m_nucleon / (C::k_B * state.T );
104104 }
105105
@@ -112,7 +112,7 @@ void actual_eos (I input, T& state)
112112 // Solve for the temperature:
113113 // p = rho k T / (mu m_nucleon)
114114
115- if constexpr (has_pressure<T>::value ) {
115+ if constexpr (has_pressure<T>) {
116116 state.T = state.p * state.mu * m_nucleon / (C::k_B * state.rho );
117117 }
118118
@@ -125,7 +125,7 @@ void actual_eos (I input, T& state)
125125 // Solve for the temperature
126126 // e = k T / [(mu m_nucleon)*(gamma-1)]
127127
128- if constexpr (has_energy<T>::value ) {
128+ if constexpr (has_energy<T>) {
129129 state.T = state.e * state.mu * m_nucleon * (eos_rp::eos_gamma - 1.0 ) / C::k_B;
130130 }
131131
@@ -139,7 +139,7 @@ void actual_eos (I input, T& state)
139139 // Invert Sackur-Tetrode eqn (below) using
140140 // rho = p mu m_nucleon / (k T)
141141
142- if constexpr (has_pressure<T>::value && has_entropy<T>::value ) {
142+ if constexpr (has_pressure<T> && has_entropy<T>) {
143143 state.T = std::pow (state.p , 2.0 /5.0 ) *
144144 std::pow (2.0 * M_PI * C::hbar * C::hbar / (state.mu * m_nucleon), 3.0 /5.0 ) *
145145 std::exp (2.0 * state.mu * m_nucleon * state.s / (5.0 * C::k_B) - 1.0 ) / C::k_B;
@@ -148,7 +148,7 @@ void actual_eos (I input, T& state)
148148 // Solve for the density
149149 // rho = p mu m_nucleon / (k T)
150150
151- if constexpr (has_pressure<T>::value ) {
151+ if constexpr (has_pressure<T>) {
152152 state.rho = state.p * state.mu * m_nucleon / (C::k_B * state.T );
153153 }
154154
@@ -160,7 +160,7 @@ void actual_eos (I input, T& state)
160160
161161 // Solve for temperature and density
162162
163- if constexpr (has_pressure<T>::value && has_enthalpy<T>::value ) {
163+ if constexpr (has_pressure<T> && has_enthalpy<T>) {
164164 state.rho = state.p / state.h * eos_rp::eos_gamma / (eos_rp::eos_gamma - 1.0 );
165165 state.T = state.p * state.mu * m_nucleon / (C::k_B * state.rho );
166166 }
@@ -199,21 +199,21 @@ void actual_eos (I input, T& state)
199199 // specific internal energy using the gamma-law EOS relation.
200200 amrex::Real pressure = state.rho * state.T * C::k_B / (state.mu * m_nucleon);
201201 amrex::Real energy = pressure / (eos_rp::eos_gamma - 1.0 ) * rhoinv;
202- if constexpr (has_pressure<T>::value ) {
202+ if constexpr (has_pressure<T>) {
203203 state.p = pressure;
204204 }
205- if constexpr (has_energy<T>::value ) {
205+ if constexpr (has_energy<T>) {
206206 state.e = energy;
207207 }
208208
209209 // enthalpy is h = e + p/rho
210- if constexpr (has_enthalpy<T>::value ) {
210+ if constexpr (has_enthalpy<T>) {
211211 state.h = energy + pressure * rhoinv;
212212 }
213213
214214 // entropy (per gram) of an ideal monoatomic gas (the Sackur-Tetrode equation)
215215 // NOTE: this expression is only valid for gamma = 5/3.
216- if constexpr (has_entropy<T>::value ) {
216+ if constexpr (has_entropy<T>) {
217217 const amrex::Real fac = 1.0 / std::pow (2.0 * M_PI * C::hbar * C::hbar, 1.5 );
218218
219219 state.s = (C::k_B / (state.mu * m_nucleon)) *
@@ -222,39 +222,39 @@ void actual_eos (I input, T& state)
222222 }
223223
224224 // Compute the thermodynamic derivatives and specific heats
225- if constexpr (has_pressure<T>::value ) {
225+ if constexpr (has_pressure<T>) {
226226 state.dpdT = state.p * Tinv;
227227 state.dpdr = state.p * rhoinv;
228228 }
229- if constexpr (has_energy<T>::value ) {
229+ if constexpr (has_energy<T>) {
230230 state.dedT = state.e * Tinv;
231231 state.dedr = 0.0 ;
232232 }
233- if constexpr (has_entropy<T>::value ) {
233+ if constexpr (has_entropy<T>) {
234234 state.dsdT = 1.5 * (C::k_B / (state.mu * m_nucleon)) * Tinv;
235235 state.dsdr = - (C::k_B / (state.mu * m_nucleon)) * rhoinv;
236236 }
237- if constexpr (has_enthalpy<T>::value ) {
237+ if constexpr (has_enthalpy<T>) {
238238 state.dhdT = state.dedT + state.dpdT * rhoinv;
239239 state.dhdr = 0.0 ;
240240 }
241241
242- if constexpr (has_xne_xnp<T>::value ) {
242+ if constexpr (has_xne_xnp<T>) {
243243 state.xne = 0.0 ;
244244 state.xnp = 0.0 ;
245245 }
246- if constexpr (has_eta<T>::value ) {
246+ if constexpr (has_eta<T>) {
247247 state.eta = 0.0 ;
248248 }
249- if constexpr (has_pele_ppos<T>::value ) {
249+ if constexpr (has_pele_ppos<T>) {
250250 state.pele = 0.0 ;
251251 state.ppos = 0.0 ;
252252 }
253253
254- if constexpr (has_energy<T>::value ) {
254+ if constexpr (has_energy<T>) {
255255 state.cv = state.dedT ;
256256
257- if constexpr (has_pressure<T>::value ) {
257+ if constexpr (has_pressure<T>) {
258258 state.cp = eos_rp::eos_gamma * state.cv ;
259259
260260 state.gam1 = eos_rp::eos_gamma;
@@ -264,31 +264,31 @@ void actual_eos (I input, T& state)
264264
265265 // sound speed
266266 state.cs = std::sqrt (eos_rp::eos_gamma * state.p * rhoinv);
267- if constexpr (has_G<T>::value ) {
267+ if constexpr (has_G<T>) {
268268 state.G = 0.5 * (1.0 + eos_rp::eos_gamma);
269269 }
270270 }
271271 }
272272
273- if constexpr (has_dpdA<T>::value ) {
273+ if constexpr (has_dpdA<T>) {
274274 state.dpdA = - state.p * (1.0 / state.abar );
275275 }
276- if constexpr (has_dedA<T>::value ) {
276+ if constexpr (has_dedA<T>) {
277277 state.dedA = - state.e * (1.0 / state.abar );
278278 }
279279
280280 if (eos_rp::eos_assume_neutral) {
281- if constexpr (has_dpdZ<T>::value ) {
281+ if constexpr (has_dpdZ<T>) {
282282 state.dpdZ = 0.0 ;
283283 }
284- if constexpr (has_dedZ<T>::value ) {
284+ if constexpr (has_dedZ<T>) {
285285 state.dedZ = 0.0 ;
286286 }
287287 } else {
288- if constexpr (has_dpdZ<T>::value ) {
288+ if constexpr (has_dpdZ<T>) {
289289 state.dpdZ = state.p * (1.0 / (1.0 + state.zbar ));
290290 }
291- if constexpr (has_dedZ<T>::value ) {
291+ if constexpr (has_dedZ<T>) {
292292 state.dedZ = state.e * (1.0 /(1.0 + state.zbar ));
293293 }
294294 }
0 commit comments