From d3065970cb8331155e3c51ad45b05b7990f3b3da Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Sun, 5 Jan 2025 12:29:10 -0500 Subject: [PATCH] make sure the breakout EOS is used with a aux that is 1/mu defined now we check this in the eos_init and use the proper aux index when accessing aux[] --- EOS/breakout/actual_eos.H | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/EOS/breakout/actual_eos.H b/EOS/breakout/actual_eos.H index ac0ba24bc..a4b511388 100644 --- a/EOS/breakout/actual_eos.H +++ b/EOS/breakout/actual_eos.H @@ -21,6 +21,10 @@ void actual_eos_init () gamma_const = 5.0_rt / 3.0_rt; } + // this EOS assumes that has a 1/mu entry -- make sure that is valid + if (aux_names_cxx[AuxZero::iinvmu] != "invmu") { + amrex::Error("invalid aux state for breakout EOS"); + } } template @@ -52,7 +56,7 @@ void actual_eos (I input, T& state) // Calculate mu. This is the only difference between // this EOS and gamma_law. - state.mu = 1.0_rt / state.aux[1]; + state.mu = 1.0_rt / state.aux[AuxZero::iinvmu]; switch (input) {