Commit d87df577 authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

formatting.

parent 053c85dc
......@@ -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);
......
......@@ -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
}
......@@ -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",
......
......@@ -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 "
......
......@@ -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]);
}
......
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