Skip to content

Commit 208cf1a

Browse files
committed
Modernize has_variable trait usage in photoionization eos
1 parent c214c26 commit 208cf1a

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

EOS/photoionization/actual_eos.H

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void actual_eos (I input, T& state)
113113
// dens, energy, and xmass are inputs
114114
// Solve for the temperature
115115

116-
if constexpr (has_energy<T>::value) {
116+
if constexpr (has_energy<T>) {
117117
dens = state.rho;
118118

119119
// stop the integration if the internal energy < 0
@@ -142,7 +142,7 @@ void actual_eos (I input, T& state)
142142

143143
case eos_input_rp:
144144
// dens, pressure, and xmass are inputs
145-
if constexpr (has_pressure<T>::value) {
145+
if constexpr (has_pressure<T>) {
146146
dens = state.rho;
147147

148148
// stop the integration if the pressure < 0
@@ -194,28 +194,28 @@ void actual_eos (I input, T& state)
194194
state.T = temp;
195195
state.rho = dens;
196196

197-
if constexpr (has_energy<T>::value) {
197+
if constexpr (has_energy<T>) {
198198
state.e = eint;
199199
}
200200

201-
if constexpr (has_pressure<T>::value) {
201+
if constexpr (has_pressure<T>) {
202202
amrex::Real pressure = state.rho * eint / fi_over_2_avg;
203203
state.p = pressure;
204204

205205
state.dpdT = pressure / temp;
206206
state.dpdr = pressure / dens;
207207
state.cs = std::sqrt((1.0 + 1.0/fi_over_2_avg) * state.p /state.rho);
208-
if constexpr (has_G<T>::value) {
208+
if constexpr (has_G<T>) {
209209
state.G = 0.5 * (1.0 + (1.0 + 1.0/fi_over_2_avg));
210210
}
211211
}
212212

213213
amrex::Real dedT = sum_ni_fi_over_2 * C::k_B / rhotot;
214214
amrex::Real dedr = 0.0_rt;
215-
if constexpr (has_energy<T>::value) {
215+
if constexpr (has_energy<T>) {
216216
state.dedT = dedT;
217217
state.dedr = dedr;
218-
if constexpr (has_pressure<T>::value) {
218+
if constexpr (has_pressure<T>) {
219219
state.dpde = state.dpdT / state.dedT;
220220
}
221221
}

0 commit comments

Comments
 (0)