diff --git a/src/runner_doiact.h b/src/runner_doiact.h index 2dcebf3fa71bacc9a890fdc7a9ec1ee5794b4896..a68b807b59479c1a883f87c3336262f09b78ef32 100644 --- a/src/runner_doiact.h +++ b/src/runner_doiact.h @@ -923,28 +923,28 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj) { const struct entry *restrict sort_j = &cj->sort[sid * (cj->count + 1)]; #ifdef SWIFT_DEBUG_CHECKS - /* Check that the dx_max_sort values in the cell are indeed an upper - bound on particle movement. */ - /* TODO(pedro): disabling this check for now as the sorts are activated - based on dx_max_sort_old, and not dx_max_sort. - for (int pid = 0; pid < ci->count; pid++) { - const struct part *p = &ci->parts[sort_i[pid].i]; - const float d = p->x[0] * runner_shift[sid][0] + - p->x[1] * runner_shift[sid][1] + - p->x[2] * runner_shift[sid][2]; - if (fabsf(d - sort_i[pid].d) - ci->dx_max_sort > - 1.0e-6 * max(fabsf(d), ci->dx_max_sort)) - error("particle shift diff exceeds dx_max_sort."); - } - for (int pjd = 0; pjd < cj->count; pjd++) { - const struct part *p = &cj->parts[sort_j[pjd].i]; - const float d = p->x[0] * runner_shift[sid][0] + - p->x[1] * runner_shift[sid][1] + - p->x[2] * runner_shift[sid][2]; - if (fabsf(d - sort_j[pjd].d) - cj->dx_max_sort > - 1.0e-6 * max(fabsf(d), cj->dx_max_sort)) - error("particle shift diff exceeds dx_max_sort."); - } */ +/* Check that the dx_max_sort values in the cell are indeed an upper + bound on particle movement. */ +/* TODO(pedro): disabling this check for now as the sorts are activated + based on dx_max_sort_old, and not dx_max_sort. +for (int pid = 0; pid < ci->count; pid++) { + const struct part *p = &ci->parts[sort_i[pid].i]; + const float d = p->x[0] * runner_shift[sid][0] + + p->x[1] * runner_shift[sid][1] + + p->x[2] * runner_shift[sid][2]; + if (fabsf(d - sort_i[pid].d) - ci->dx_max_sort > + 1.0e-6 * max(fabsf(d), ci->dx_max_sort)) + error("particle shift diff exceeds dx_max_sort."); +} +for (int pjd = 0; pjd < cj->count; pjd++) { + const struct part *p = &cj->parts[sort_j[pjd].i]; + const float d = p->x[0] * runner_shift[sid][0] + + p->x[1] * runner_shift[sid][1] + + p->x[2] * runner_shift[sid][2]; + if (fabsf(d - sort_j[pjd].d) - cj->dx_max_sort > + 1.0e-6 * max(fabsf(d), cj->dx_max_sort)) + error("particle shift diff exceeds dx_max_sort."); +} */ #endif /* SWIFT_DEBUG_CHECKS */ /* Get some other useful values. */ @@ -1171,28 +1171,28 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj) { struct entry *restrict sort_j = &cj->sort[sid * (cj->count + 1)]; #ifdef SWIFT_DEBUG_CHECKS - /* Check that the dx_max_sort values in the cell are indeed an upper - bound on particle movement. */ - /* TODO(pedro): disabling this check for now as the sorts are activated - based on dx_max_sort_old, and not dx_max_sort. - for (int pid = 0; pid < ci->count; pid++) { - const struct part *p = &ci->parts[sort_i[pid].i]; - const float d = p->x[0] * runner_shift[sid][0] + - p->x[1] * runner_shift[sid][1] + - p->x[2] * runner_shift[sid][2]; - if (fabsf(d - sort_i[pid].d) - ci->dx_max_sort > - 1.0e-6 * max(fabsf(d), ci->dx_max_sort)) - error("particle shift diff exceeds dx_max_sort."); - } - for (int pjd = 0; pjd < cj->count; pjd++) { - const struct part *p = &cj->parts[sort_j[pjd].i]; - const float d = p->x[0] * runner_shift[sid][0] + - p->x[1] * runner_shift[sid][1] + - p->x[2] * runner_shift[sid][2]; - if (fabsf(d - sort_j[pjd].d) - cj->dx_max_sort > - 1.0e-6 * max(fabsf(d), cj->dx_max_sort)) - error("particle shift diff exceeds dx_max_sort."); - } */ +/* Check that the dx_max_sort values in the cell are indeed an upper + bound on particle movement. */ +/* TODO(pedro): disabling this check for now as the sorts are activated + based on dx_max_sort_old, and not dx_max_sort. +for (int pid = 0; pid < ci->count; pid++) { + const struct part *p = &ci->parts[sort_i[pid].i]; + const float d = p->x[0] * runner_shift[sid][0] + + p->x[1] * runner_shift[sid][1] + + p->x[2] * runner_shift[sid][2]; + if (fabsf(d - sort_i[pid].d) - ci->dx_max_sort > + 1.0e-6 * max(fabsf(d), ci->dx_max_sort)) + error("particle shift diff exceeds dx_max_sort."); +} +for (int pjd = 0; pjd < cj->count; pjd++) { + const struct part *p = &cj->parts[sort_j[pjd].i]; + const float d = p->x[0] * runner_shift[sid][0] + + p->x[1] * runner_shift[sid][1] + + p->x[2] * runner_shift[sid][2]; + if (fabsf(d - sort_j[pjd].d) - cj->dx_max_sort > + 1.0e-6 * max(fabsf(d), cj->dx_max_sort)) + error("particle shift diff exceeds dx_max_sort."); +} */ #endif /* SWIFT_DEBUG_CHECKS */ /* Get some other useful values. */