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

Get rid of the parts if we don't have any

parent 55720e1d
No related branches found
No related tags found
1 merge request!143Gravity particles
......@@ -344,6 +344,12 @@ int main(int argc, char *argv[]) {
for (size_t k = 0; k < Ngas; ++k) parts[k].gpart = NULL;
Ngpart = 0;
}
if (!with_hydro) {
free(parts);
parts = NULL;
for (size_t k = 0; k < Ngpart; ++k) if(gparts[k].id > 0) error("Linking problem");
Ngas = 0;
}
/* Get the total number of particles across all nodes. */
long long N_total[2] = {0, 0};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment