diff --git a/src/active.h b/src/active.h index 04175b43a1932a9098b12664342c2d4b63d1e3f4..8dfd063fda9189ff715107c599ef4851cc5a0387 100644 --- a/src/active.h +++ b/src/active.h @@ -44,7 +44,7 @@ __attribute__((always_inline)) INLINE static int cell_is_drifted( "Cell has been drifted too far forward in time! c->ti_old=%lld (t=%e) " "and e->ti_current=%lld (t=%e)", c->ti_old, c->ti_old * e->timeBase, e->ti_current, - e->ti_current * e->timeBase); + e->ti_current * e->timeBase); #endif return (c->ti_old == e->ti_current); @@ -66,7 +66,7 @@ __attribute__((always_inline)) INLINE static int cell_is_active( "cell in an impossible time-zone! c->ti_end_min=%lld (t=%e) and " "e->ti_current=%lld (t=%e)", c->ti_end_min, c->ti_end_min * e->timeBase, e->ti_current, - e->ti_current * e->timeBase); + e->ti_current * e->timeBase); #endif return (c->ti_end_min == e->ti_current); diff --git a/src/cell.c b/src/cell.c index 4b7c59527e09c2db8c5640ab0263eaa31d617f53..733bba3526493ac5bfdf5e46ca0a9443f824e38f 100644 --- a/src/cell.c +++ b/src/cell.c @@ -1140,19 +1140,18 @@ void cell_drift(struct cell *c, const struct engine *e) { void cell_check_timesteps(struct cell *c) { #ifdef SWIFT_DEBUG_CHECKS - if(c->ti_end_min == 0 && c->nr_tasks > 0) + if (c->ti_end_min == 0 && c->nr_tasks > 0) error("Cell without assigned time-step"); - - if(c->split) { - for(int k=0; k<8; ++k) - if(c->progeny[k] != NULL) cell_check_timesteps(c->progeny[k]); - } else { - if(c->nodeID == engine_rank) - for(int i=0; i<c->count; ++i) - if(c->parts[i].time_bin == 0) - error("Particle without assigned time-bin"); + if (c->split) { + for (int k = 0; k < 8; ++k) + if (c->progeny[k] != NULL) cell_check_timesteps(c->progeny[k]); + } else { + if (c->nodeID == engine_rank) + for (int i = 0; i < c->count; ++i) + if (c->parts[i].time_bin == 0) + error("Particle without assigned time-bin"); } #endif } diff --git a/src/runner.c b/src/runner.c index 7265c3a0a4078a83476b4f2060554bb446afa930..f39e39962de2a83e27a3344d75a6af3d97f91978 100644 --- a/src/runner.c +++ b/src/runner.c @@ -958,7 +958,7 @@ void runner_do_kick2(struct runner *r, struct cell *c, int timer) { get_integer_time_begin(ti_current, p->time_bin); #ifdef SWIFT_DEBUG_CHECKS - if (ti_begin + ti_step != ti_current) + if (ti_begin + ti_step != ti_current) error( "Particle in wrong time-bin, ti_begin=%lld, ti_step=%lld " "time_bin=%d ti_current=%lld", diff --git a/src/scheduler.c b/src/scheduler.c index 9ce2ce44276ec6a4495ffca35a69f93317a0e6d2..7650b4ffe391fd1d0374f218f36ffefc3c3e7f2d 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -1080,8 +1080,7 @@ void scheduler_start(struct scheduler *s) { struct cell *cj = t->cj; /* Don't check MPI stuff */ - if(t->type == task_type_send || t->type == task_type_recv) - continue; + if (t->type == task_type_send || t->type == task_type_recv) continue; if (cj == NULL) { /* self */ @@ -1108,9 +1107,9 @@ void scheduler_start(struct scheduler *s) { if (t->skip) { - /* Check that the pair is active if the local cell is active */ - if ((ci->ti_end_min == ti_current && ci->nodeID == engine_rank) - || ( cj->ti_end_min == ti_current && cj->nodeID == engine_rank) ) + /* Check that the pair is active if the local cell is active */ + if ((ci->ti_end_min == ti_current && ci->nodeID == engine_rank) || + (cj->ti_end_min == ti_current && cj->nodeID == engine_rank)) error( "Task (type='%s/%s') should not have been skipped " "ti_current=%lld " diff --git a/src/space.c b/src/space.c index c6e01f767b57e41be19f3dd2b8a4c747d608b3f5..8d5dc34dc7f0060953ca1a34cd5b60fc7f186cbd 100644 --- a/src/space.c +++ b/src/space.c @@ -2037,11 +2037,11 @@ void space_check_drift_point(struct space *s, integertime_t ti_current) { /** * @brief Checks that all particles and local cells have a non-zero time-step. - */ + */ void space_check_timesteps(struct space *s) { #ifdef SWIFT_DEBUG_CHECKS - for (int i=0; i<s->nr_cells; ++i) { + for (int i = 0; i < s->nr_cells; ++i) { cell_check_timesteps(&s->cells_top[i]); }