Commit 7021a704 authored by Josh Borrow's avatar Josh Borrow
Browse files

Added debugging checks and removed everything from the convert quantities (we use energy anyway!)

parent f6f80792
......@@ -611,13 +611,7 @@ __attribute__((always_inline)) INLINE static void hydro_kick_extra(
*/
__attribute__((always_inline)) INLINE static void hydro_convert_quantities(
struct part *restrict p, struct xpart *restrict xp,
const struct cosmology *cosmo) {
/* Compute the sound speed */
const float soundspeed = hydro_get_comoving_soundspeed(p);
p->force.soundspeed = soundspeed;
}
const struct cosmology *cosmo) { }
/**
* @brief Initialises the particles for the first time
......@@ -643,6 +637,29 @@ __attribute__((always_inline)) INLINE static void hydro_first_init_part(
hydro_reset_acceleration(p);
hydro_init_part(p, NULL);
#ifdef SWIFT_DEBUG_CHECKS
if (p->id == 116589) {
printf("Ending hydro_first_init_part\n");
printf("P_bar=%.3e\n", p->pressure_bar);
}
if (p->u < -0.0001)
printf("Particle %lld has negative u=%.3e "
"(hydro_first_init_part)\n", p->id, p->u);
if (p->pressure_bar < -0.0001)
printf("Particle %lld has negative P_bar=%.3e "
"(hydro_first_init_part)\n", p->id, p->pressure_bar);
if (p->rho < -0.0001)
printf("Particle %lld has negative rho=%.3e "
"(hydro_first_init_part)\n", p->id, p->rho);
if (p->mass < -0.0001)
printf("Particle %lld has negative m=%.3e "
"(hydro_first_init_part)\n", p->id, p->mass);
#endif
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment