diff --git a/src/engine.c b/src/engine.c index fbadc99322c29241d80635353abf80972660c104..ad1673dfe71d143b1a66864a9f00ab6a6aeb9fff 100644 --- a/src/engine.c +++ b/src/engine.c @@ -1708,18 +1708,18 @@ void engine_init_particles(struct engine *e) { message("Initialising particles"); + engine_prepare(e); + /* Make sure all particles are ready to go */ /* i.e. clean-up any stupid state in the ICs */ space_map_cells_pre(s, 1, cell_init_parts, NULL); - engine_prepare(e); - engine_marktasks(e); - // printParticle(e->s->parts, 1000, e->s->nr_parts); - // printParticle(e->s->parts, 515050, e->s->nr_parts); + /* printParticle(e->s->parts, e->s->xparts, 1000, e->s->nr_parts); */ + /* printParticle(e->s->parts, e->s->xparts, 515050, e->s->nr_parts); */ - // message("\n0th DENSITY CALC\n"); + /* message("\n0th DENSITY CALC\n"); */ /* Now do a density calculation */ TIMER_TIC; @@ -1825,8 +1825,6 @@ if ( e->nodeID == 0 ) /* printParticle(e->s->parts, e->s->xparts, 1000, e->s->nr_parts); */ /* printParticle(e->s->parts, e->s->xparts, 515050, e->s->nr_parts); */ - // if(e->step == 2) exit(0); - /* message("\nACCELERATION AND KICK\n"); */ /* Re-distribute the particles amongst the nodes? */ diff --git a/src/hydro/Minimal/hydro.h b/src/hydro/Minimal/hydro.h index e7fb301a2e26d2e274bf4fa508383d72d88cda20..ba3b6071f0e81d4fbfb78dc411b0da6d020c6522 100644 --- a/src/hydro/Minimal/hydro.h +++ b/src/hydro/Minimal/hydro.h @@ -45,7 +45,7 @@ __attribute__((always_inline)) INLINE static float hydro_compute_timestep( * @param xp The extended particle data to act upon */ __attribute__((always_inline)) -INLINE static void hydro_first_init_part(struct part* p, struct xpart* xp) { + INLINE static void hydro_first_init_part(struct part* p, struct xpart* xp) { xp->u_full = p->u; } @@ -175,9 +175,8 @@ __attribute__((always_inline)) * @param dt The time-step for this kick * @param half_dt The half time-step for this kick */ -__attribute__((always_inline)) - INLINE static void hydro_kick_extra(struct part* p, struct xpart* xp, - float dt, float half_dt) { +__attribute__((always_inline)) INLINE static void hydro_kick_extra( + struct part* p, struct xpart* xp, float dt, float half_dt) { /* Kick in momentum space */ xp->u_full += p->u_dt * dt; diff --git a/src/hydro/Minimal/hydro_debug.h b/src/hydro/Minimal/hydro_debug.h index 5b1648e222c36dc142362f26ad5188a2af397192..b208d5b867779aaaa204d8783b75681156506fe7 100644 --- a/src/hydro/Minimal/hydro_debug.h +++ b/src/hydro/Minimal/hydro_debug.h @@ -21,11 +21,13 @@ __attribute__((always_inline)) INLINE static void hydro_debug_particle(struct part* p, struct xpart* xp) { printf( "x=[%.3e,%.3e,%.3e], " - "v=[%.3e,%.3e,%.3e],v_full=[%.3e,%.3e,%.3e] \n a=[%.3e,%.3e,%.3e],\n " - "h=%.3e, " + "v=[%.3e,%.3e,%.3e],v_full=[%.3e,%.3e,%.3e] \n a=[%.3e,%.3e,%.3e], " + "u_full=%.3e, u=%.3e, du/dt=%.3e v_sig=%.3e, P=%.3e\n" + "h=%.3e, dh/dt=%.3e " "wcount=%d, m=%.3e, dh_drho=%.3e, rho=%.3e, t_begin=%.3e, t_end=%.3e\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->h, (int)p->density.wcount, p->mass, p->rho_dh, p->rho, p->t_begin, + xp->u_full, p->u, p->u_dt, p->force.v_sig, p->force.pressure, p->h, + p->h_dt, (int)p->density.wcount, p->mass, p->rho_dh, p->rho, p->t_begin, p->t_end); }