Skip to content

Commit

Permalink
fix primitivefromconservative issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jyoo1042 committed Sep 26, 2023
1 parent fb1f216 commit b2e08ca
Showing 1 changed file with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,16 @@ bool PrimitiveFromConservative<OrderedListOfPrimitiveRecoverySchemes,
}
get(*lorentz_factor)[s] = primitive_data.value().lorentz_factor;
get(*pressure)[s] = primitive_data.value().pressure;
get(*specific_internal_energy)[s] =
if constexpr (ThermodynamicDim == 3) {
get(*specific_internal_energy)[s] =
primitive_data.value().specific_internal_energy;
get(*specific_enthalpy)[s] = primitive_data.value().rho_h_w_squared /
(primitive_data.value().rest_mass_density *
primitive_data.value().lorentz_factor *
primitive_data.value().lorentz_factor);
get(*specific_enthalpy)[s] = primitive_data.value().rho_h_w_squared /
(primitive_data.value().lorentz_factor *
primitive_data.value().lorentz_factor *
primitive_data.value().rest_mass_density);
}
}

} else {

Check failure on line 221 in src/Evolution/Systems/GrMhd/ValenciaDivClean/PrimitiveFromConservative.cpp

View workflow job for this annotation

GitHub Actions / Clang-tidy (Debug)

expected expression

Check failure on line 221 in src/Evolution/Systems/GrMhd/ValenciaDivClean/PrimitiveFromConservative.cpp

View workflow job for this annotation

GitHub Actions / Clang-tidy (Release)

expected expression
if constexpr (ErrorOnFailure) {
ERROR("All primitive inversion schemes failed at s = "
Expand Down Expand Up @@ -242,9 +246,21 @@ bool PrimitiveFromConservative<OrderedListOfPrimitiveRecoverySchemes,
if constexpr (ThermodynamicDim == 1) {

Check failure on line 246 in src/Evolution/Systems/GrMhd/ValenciaDivClean/PrimitiveFromConservative.cpp

View workflow job for this annotation

GitHub Actions / Clang-tidy (Debug)

expected unqualified-id

Check failure on line 246 in src/Evolution/Systems/GrMhd/ValenciaDivClean/PrimitiveFromConservative.cpp

View workflow job for this annotation

GitHub Actions / Clang-tidy (Release)

expected unqualified-id
*temperature =
equation_of_state.temperature_from_density(*rest_mass_density);
*specific_internal_energy =
equation_of_state.specific_internal_energy_from_density(
*rest_mass_density);
*specific_enthalpy = hydro::relativistic_specific_enthalpy(
*rest_mass_density, *specific_internal_energy, *pressure);

} else if constexpr (ThermodynamicDim == 2) {

Check failure on line 255 in src/Evolution/Systems/GrMhd/ValenciaDivClean/PrimitiveFromConservative.cpp

View workflow job for this annotation

GitHub Actions / Clang-tidy (Debug)

expected unqualified-id

Check failure on line 255 in src/Evolution/Systems/GrMhd/ValenciaDivClean/PrimitiveFromConservative.cpp

View workflow job for this annotation

GitHub Actions / Clang-tidy (Release)

expected unqualified-id
*temperature = equation_of_state.temperature_from_density_and_energy(
*rest_mass_density, *specific_internal_energy);
*specific_internal_energy =
equation_of_state.specific_internal_energy_from_density_and_pressure(
*rest_mass_density, *pressure);
*specific_enthalpy = hydro::relativistic_specific_enthalpy(
*rest_mass_density, *specific_internal_energy, *pressure);

} else if constexpr (ThermodynamicDim == 3) {

Check failure on line 264 in src/Evolution/Systems/GrMhd/ValenciaDivClean/PrimitiveFromConservative.cpp

View workflow job for this annotation

GitHub Actions / Clang-tidy (Debug)

expected unqualified-id

Check failure on line 264 in src/Evolution/Systems/GrMhd/ValenciaDivClean/PrimitiveFromConservative.cpp

View workflow job for this annotation

GitHub Actions / Clang-tidy (Release)

expected unqualified-id
*temperature = equation_of_state.temperature_from_density_and_energy(
*rest_mass_density, *specific_internal_energy, *electron_fraction);
Expand Down

0 comments on commit b2e08ca

Please sign in to comment.