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

Make sure no 0 or negative ID is read in for DM particles

parent 1bde8a65
Branches
Tags
2 merge requests!136Master,!116Basic implementation of gparts
...@@ -489,7 +489,7 @@ void prepare_dm_gparts(struct gpart* gparts, int Ndm) { ...@@ -489,7 +489,7 @@ void prepare_dm_gparts(struct gpart* gparts, int Ndm) {
for (int i = 0; i < Ndm; ++i) { for (int i = 0; i < Ndm; ++i) {
/* 0 ir negative ids are not allowed */ /* 0 ir negative ids are not allowed */
if(gparts[i].id <= 0) error("0 or negative if for DM particle"); if(gparts[i].id <= 0) error("0 or negative ID for DM particle");
gparts[i].id = -gparts[i].id; gparts[i].id = -gparts[i].id;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment