Commit d5b7a976 authored by Josh Borrow's avatar Josh Borrow
Browse files

Added minor changes to remove debugging checks and to remove the extra hydro...

Added minor changes to remove debugging checks and to remove the extra hydro loop during initialisation
parent 322529eb
......@@ -635,37 +635,6 @@ __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
}
/**
......
......@@ -115,24 +115,6 @@ __attribute__((always_inline)) INLINE static void runner_iact_density(
pj->density.rot_v[0] += facj * curlvr[0];
pj->density.rot_v[1] += facj * curlvr[1];
pj->density.rot_v[2] += facj * curlvr[2];
#ifdef SWIFT_DEBUG_CHECKS
if (pi->u < -FLT_MIN)
error("Particle %lld has negative u=%.3e\n", pi->id, pi->u);
if (pj->u < -FLT_MIN)
error("Particle %lld has negative u=%.3e\n", pj->id, pj->u);
if (pi->pressure_bar < -FLT_MIN)
error("Particle %lld has negative P_bar=%.3e\n", pi->id, pi->pressure_bar);
if (pi->rho < -FLT_MIN)
error("Particle %lld has negative rho=%.3e\n", pi->id, pi->rho);
if (mj < -FLT_MIN) error("Particle %lld has negative m=%.3e\n", pj->id, mj);
if (wi < -FLT_MIN) error("Particle %lld has negative rho=%.3e\n", pi->id, wi);
#endif
}
/**
......@@ -193,21 +175,6 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_density(
pi->density.rot_v[0] += faci * curlvr[0];
pi->density.rot_v[1] += faci * curlvr[1];
pi->density.rot_v[2] += faci * curlvr[2];
#ifdef SWIFT_DEBUG_CHECKS
if (pi->u < -FLT_MIN)
error("Particle %lld has negative u=%.3e\n", pi->id, pi->u);
if (pi->pressure_bar < -FLT_MIN)
error("Particle %lld has negative P_bar=%.3e\n", pi->id, pi->pressure_bar);
if (pi->rho < -FLT_MIN)
error("Particle %lld has negative rho=%.3e\n", pi->id, pi->rho);
if (mj < -FLT_MIN) error("Particle %lld has negative m=%.3e\n", pj->id, mj);
if (wi < -FLT_MIN) error("Particle %lld has negative rho=%.3e\n", pi->id, wi);
#endif
}
/**
......
......@@ -53,7 +53,7 @@
#define hydro_need_extra_init_loop 1
#elif defined(HOPKINS_PU_SPH)
#include "./hydro/PressureEnergy/hydro_part.h"
#define hydro_need_extra_init_loop 1
#define hydro_need_extra_init_loop 0
#elif defined(DEFAULT_SPH)
#include "./hydro/Default/hydro_part.h"
#define hydro_need_extra_init_loop 0
......
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