Skip to content

Commit

Permalink
make sure the breakout EOS is used with a aux that is 1/mu defined (#…
Browse files Browse the repository at this point in the history
…1694)

now we check this in the eos_init and use the proper aux index when
accessing aux[]
  • Loading branch information
zingale authored Jan 6, 2025
1 parent c5099a8 commit 139905b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion EOS/breakout/actual_eos.H
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename I>
Expand Down Expand Up @@ -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) {

Expand Down

0 comments on commit 139905b

Please sign in to comment.