Skip to content
Snippets Groups Projects
Commit 3f49741e authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Moved the check of negative flags for hydro pairs to the debug code. That...

Moved the check of negative flags for hydro pairs to the debug code. That never happens in real life code.
parent ace60963
No related branches found
No related tags found
1 merge request!606Merged gravity M-M tasks
...@@ -1306,15 +1306,15 @@ void scheduler_reweight(struct scheduler *s, int verbose) { ...@@ -1306,15 +1306,15 @@ void scheduler_reweight(struct scheduler *s, int verbose) {
case task_type_sub_pair: case task_type_sub_pair:
if (t->ci->nodeID != nodeID || t->cj->nodeID != nodeID) { if (t->ci->nodeID != nodeID || t->cj->nodeID != nodeID) {
if (t->flags < 0) #ifdef SWIFT_DEBUG_CHECKS
cost = 3.f * (wscale * count_i) * count_j; if (t->flags < 0) error("Negative flag value!");
else #endif
cost = 3.f * (wscale * count_i) * count_j * sid_scale[t->flags]; cost = 3.f * (wscale * count_i) * count_j * sid_scale[t->flags];
} else { } else {
if (t->flags < 0) #ifdef SWIFT_DEBUG_CHECKS
cost = 2.f * (wscale * count_i) * count_j; if (t->flags < 0) error("Negative flag value!");
else #endif
cost = 2.f * (wscale * count_i) * count_j * sid_scale[t->flags]; cost = 2.f * (wscale * count_i) * count_j * sid_scale[t->flags];
} }
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment