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
...@@ -344,6 +344,12 @@ int main(int argc, char *argv[]) { ...@@ -344,6 +344,12 @@ int main(int argc, char *argv[]) {
for (size_t k = 0; k < Ngas; ++k) parts[k].gpart = NULL; for (size_t k = 0; k < Ngas; ++k) parts[k].gpart = NULL;
Ngpart = 0; 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. */ /* Get the total number of particles across all nodes. */
long long N_total[2] = {0, 0}; long long N_total[2] = {0, 0};
......
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