Skip to content

Commit

Permalink
hack
Browse files Browse the repository at this point in the history
  • Loading branch information
jyoo1042 committed Sep 20, 2023
1 parent 3380472 commit 752c677
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,20 @@ FishboneMoncriefDisk::variables(
const auto specific_enthalpy = get<hydro::Tags::SpecificEnthalpy<DataType>>(
variables(x, tmpl::list<hydro::Tags::SpecificEnthalpy<DataType>>{}, vars,
index));
auto rest_mass_density = make_with_value<Scalar<DataType>>(x, 0.0);
auto rest_mass_density = make_with_value<Scalar<DataType>>(x, 1e-15);
variables_impl(vars, [&rest_mass_density, &specific_enthalpy, this](
const size_t s, const double /*potential_at_s*/) {
get_element(get(rest_mass_density), s) =
get(equation_of_state_.rest_mass_density_from_enthalpy(
Scalar<double>{get_element(get(specific_enthalpy), s)}));
});
// if constexpr (std::is_same_v<DataType, DataVector>){
// get(rest_mass_density) = max(1.0e-15, get(rest_mass_density));
//} else {
// get(rest_mass_density) =
// max(DataVector{get(rest_mass_density).size(), 1.0e-15},
// get(rest_mass_density));
//}
return {std::move(rest_mass_density)};
}

Expand Down

0 comments on commit 752c677

Please sign in to comment.