Commit f384bd3f authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge the changes from Jacob's particle leaving the box debugging branch that...

Merge the changes from Jacob's particle leaving the box debugging branch that are unrelated to the fix itself.
parent 13f05c12
......@@ -55,9 +55,9 @@ INLINE static void set_Til_iron(struct Til_params *mat,
mat->b = 1.5f;
mat->A = 1.28e11f;
mat->B = 1.05e11f;
mat->u_0 = 9.5e9f;
mat->u_iv = 2.4e9f;
mat->u_cv = 8.67e9f;
mat->u_0 = 9.5e6f;
mat->u_iv = 2.4e6f;
mat->u_cv = 8.67e6f;
mat->alpha = 5.0f;
mat->beta = 5.0f;
mat->eta_min = 0.0f;
......@@ -72,9 +72,9 @@ INLINE static void set_Til_granite(struct Til_params *mat,
mat->b = 1.3f;
mat->A = 1.8e10f;
mat->B = 1.8e10f;
mat->u_0 = 1.6e10f;
mat->u_iv = 3.5e9f;
mat->u_cv = 1.8e10f;
mat->u_0 = 1.6e7f;
mat->u_iv = 3.5e6f;
mat->u_cv = 1.8e7f;
mat->alpha = 5.0f;
mat->beta = 5.0f;
mat->eta_min = 0.0f;
......@@ -89,9 +89,9 @@ INLINE static void set_Til_water(struct Til_params *mat,
mat->b = 0.15f;
mat->A = 2.18e9f;
mat->B = 1.325e10f;
mat->u_0 = 7.0e9f;
mat->u_iv = 4.19e8f;
mat->u_cv = 2.69e9f;
mat->u_0 = 7.0e6f;
mat->u_iv = 4.19e5f;
mat->u_cv = 2.69e6f;
mat->alpha = 10.0f;
mat->beta = 5.0f;
mat->eta_min = 0.925f;
......
......@@ -601,8 +601,8 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force(
/* Compute the "grad h" term */
const float rho_inv = 1.f / p->rho;
float rho_dh = p->density.rho_dh;
/* Ignore changing-kernel effects when h is h_max */
if (p->h == hydro_props->h_max) {
/* Ignore changing-kernel effects when h ~= h_max */
if (p->h > 0.9999f * hydro_props->h_max) {
rho_dh = 0.f;
}
const float grad_h_term =
......@@ -869,7 +869,9 @@ hydro_set_init_internal_energy(struct part *p, float u_init) {
__attribute__((always_inline)) INLINE static void hydro_remove_part(
const struct part *p, const struct xpart *xp) {
printf("Removed particle id=%lld \n", p->id);
printParticle_single(p, xp);
fflush(stdout);
}
#endif /* SWIFT_PLANETARY_HYDRO_H */
......@@ -42,7 +42,7 @@ __attribute__((always_inline)) INLINE static void hydro_debug_particle(
"v_full=[%.3g, %.3g, %.3g], a=[%.3g, %.3g, %.3g], \n "
"m=%.3g, u=%.3g, du/dt=%.3g, P=%.3g, c_s=%.3g, \n "
"v_sig=%.3g, h=%.3g, dh/dt=%.3g, wcount=%.3g, rho=%.3g, \n "
"dh_drho=%.3g, time_bin=%d, wakeup=%d mat_id=%d \n",
"dh_drho=%.3g, time_bin=%d, wakeup=%d, mat_id=%d \n",
p->x[0], p->x[1], p->x[2], p->v[0], p->v[1], p->v[2], xp->v_full[0],
xp->v_full[1], xp->v_full[2], p->a_hydro[0], p->a_hydro[1], p->a_hydro[2],
p->mass, p->u, p->u_dt, hydro_get_comoving_pressure(p),
......
......@@ -3947,7 +3947,7 @@ void space_synchronize_particle_positions_mapper(void *map_data, int nr_gparts,
else if (gp->type == swift_type_gas) {
/* Get it's gassy friend */
/* Get its gassy friend */
struct part *p = &s->parts[-gp->id_or_neg_offset];
struct xpart *xp = &s->xparts[-gp->id_or_neg_offset];
......@@ -3965,7 +3965,7 @@ void space_synchronize_particle_positions_mapper(void *map_data, int nr_gparts,
else if (gp->type == swift_type_stars) {
/* Get it's stellar friend */
/* Get its stellar friend */
struct spart *sp = &s->sparts[-gp->id_or_neg_offset];
/* Synchronize positions */
......@@ -3978,7 +3978,7 @@ void space_synchronize_particle_positions_mapper(void *map_data, int nr_gparts,
else if (gp->type == swift_type_black_hole) {
/* Get it's black hole friend */
/* Get its black hole friend */
struct bpart *bp = &s->bparts[-gp->id_or_neg_offset];
/* Synchronize positions */
......
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