Skip to content

Commit 139905b

Browse files
authored
make sure the breakout EOS is used with a aux that is 1/mu defined (#1694)
now we check this in the eos_init and use the proper aux index when accessing aux[]
1 parent c5099a8 commit 139905b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

EOS/breakout/actual_eos.H

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ void actual_eos_init ()
2121
gamma_const = 5.0_rt / 3.0_rt;
2222
}
2323

24+
// this EOS assumes that has a 1/mu entry -- make sure that is valid
25+
if (aux_names_cxx[AuxZero::iinvmu] != "invmu") {
26+
amrex::Error("invalid aux state for breakout EOS");
27+
}
2428
}
2529

2630
template <typename I>
@@ -52,7 +56,7 @@ void actual_eos (I input, T& state)
5256

5357
// Calculate mu. This is the only difference between
5458
// this EOS and gamma_law.
55-
state.mu = 1.0_rt / state.aux[1];
59+
state.mu = 1.0_rt / state.aux[AuxZero::iinvmu];
5660

5761
switch (input) {
5862

0 commit comments

Comments
 (0)