diff --git a/examples/IsolatedGalaxy/IsolatedGalaxy_starformation/isolated_galaxy.yml b/examples/IsolatedGalaxy/IsolatedGalaxy_starformation/isolated_galaxy.yml index 1bf7689b995074e53109627d84a837980a95bcc7..e4bea67340450476cbc0bf6eb5621a9655724a5b 100644 --- a/examples/IsolatedGalaxy/IsolatedGalaxy_starformation/isolated_galaxy.yml +++ b/examples/IsolatedGalaxy/IsolatedGalaxy_starformation/isolated_galaxy.yml @@ -35,7 +35,7 @@ Statistics: # Parameters related to the initial conditions InitialConditions: - file_name: fid.hdf5 # The file to read + file_name: lowres8.hdf5 # The file to read periodic: 0 # Are we running with periodic ICs? stars_smoothing_length: 0.5 diff --git a/src/task.c b/src/task.c index 40887aa593b91dccbdc84f71db651a0e607273ca..34c636b48ed6ff3fefdf1e7847a67ca56ea79c89 100644 --- a/src/task.c +++ b/src/task.c @@ -283,7 +283,6 @@ float task_overlap(const struct task *restrict ta, if (tb->ci != NULL) size_union += tb->ci->hydro.count; if (tb->cj != NULL) size_union += tb->cj->hydro.count; - // MATTHIEU: This should not be necessary if (size_union == 0) return 0.f; /* Compute the intersection of the cell data. */ @@ -305,6 +304,8 @@ float task_overlap(const struct task *restrict ta, if (tb->ci != NULL) size_union += tb->ci->grav.count; if (tb->cj != NULL) size_union += tb->cj->grav.count; + if (size_union == 0) return 0.f; + /* Compute the intersection of the cell data. */ const size_t size_intersect = task_cell_overlap_gpart(ta->ci, tb->ci) + task_cell_overlap_gpart(ta->ci, tb->cj) +