Skip to content

Commit

Permalink
Formating
Browse files Browse the repository at this point in the history
  • Loading branch information
HPC user committed Dec 13, 2023
1 parent 8bb9646 commit 6331e2f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,5 @@ add_subdirectory(src)
if (AthenaPK_ENABLE_TESTING)
include(CTest)
add_subdirectory(tst/regression)
endif()
endif()

6 changes: 0 additions & 6 deletions src/eos/adiabatic_glmmhd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ void AdiabaticGLMMHDEOS::ConservedToPrimitive(MeshData<Real> *md) const {
auto &prim = prim_pack(b);
// auto &nu = entropy_pack(b);

// Getting the global indexing

auto pmb = md->GetBlockData(b)->GetBlockPointer();
auto pm = pmb->pmy_mesh;
auto hydro_pkg = pmb->packages.Get("Hydro");

return this_on_device.ConsToPrim(cons, prim, nhydro, nscalars, k, j, i);
});
}
14 changes: 7 additions & 7 deletions src/eos/adiabatic_glmmhd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ class AdiabaticGLMMHDEOS : public EquationOfState {

// Let's apply floors explicitly, i.e., by default floor will be disabled (<=0)
// and the code will fail if a negative density is encountered.
// PARTHENON_REQUIRE(u_d > 0.0 || density_floor_ > 0.0,
// "Got negative density. Consider enabling first-order flux "
// "correction or setting a reasonable density floor.");
PARTHENON_REQUIRE(u_d > 0.0 || density_floor_ > 0.0,
"Got negative density. Consider enabling first-order flux "
"correction or setting a reasonable density floor.");

// apply density floor, without changing momentum or energy
u_d = (u_d > density_floor_) ? u_d : density_floor_;
Expand Down Expand Up @@ -134,10 +134,10 @@ class AdiabaticGLMMHDEOS : public EquationOfState {

// Let's apply floors explicitly, i.e., by default floor will be disabled (<=0)
// and the code will fail if a negative pressure is encountered.
// PARTHENON_REQUIRE(w_p > 0.0 || pressure_floor_ > 0.0 || e_floor_ > 0.0,
// "Got negative pressure. Consider enabling first-order flux "
// "correction or setting a reasonable pressure or temperature
// floor.");
PARTHENON_REQUIRE(
w_p > 0.0 || pressure_floor_ > 0.0 || e_floor_ > 0.0,
"Got negative pressure. Consider enabling first-order flux "
"correction or setting a reasonable pressure or temperature floor.");

// Pressure floor (if present) takes precedence over temperature floor
if ((pressure_floor_ > 0.0) && (w_p < pressure_floor_)) {
Expand Down

0 comments on commit 6331e2f

Please sign in to comment.