Skip to content

Commit 74cbf07

Browse files
authored
fix extra work in initialization of the helmholtz table (#1924)
we were using a nested loop in the rho and T array init when they are actually independent
1 parent 6deec7f commit 74cbf07

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

EOS/helmholtz/actual_eos.H

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,10 +1315,11 @@ void actual_eos_init ()
13151315
for (int j = 0; j < jmax; ++j) {
13161316
amrex::Real tsav = tlo + j * tstp;
13171317
t[j] = std::pow(10.0e0_rt, tsav);
1318-
for (int i = 0; i < imax; ++i) {
1319-
amrex::Real dsav = dlo + i * dstp;
1320-
d[i] = std::pow(10.0e0_rt, dsav);
1321-
}
1318+
}
1319+
1320+
for (int i = 0; i < imax; ++i) {
1321+
amrex::Real dsav = dlo + i * dstp;
1322+
d[i] = std::pow(10.0e0_rt, dsav);
13221323
}
13231324

13241325
// it does not work on all machines (for GPUs) broadcast to other

0 commit comments

Comments
 (0)