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

Allow 0 ids but not negative ids.

parent 7f4d2a8c
Branches
Tags
1 merge request!632Add functions to permanently remove particles from a simulation
......@@ -634,9 +634,9 @@ void io_prepare_dm_gparts_mapper(void* restrict data, int Ndm, void* dummy) {
/* Let's give all these gparts a negative id */
for (int i = 0; i < Ndm; ++i) {
/* 0 or negative ids are not allowed */
if (gparts[i].id_or_neg_offset <= 0)
error("0 or negative ID for DM particle %i: ID=%lld", i,
/* Negative ids are not allowed */
if (gparts[i].id_or_neg_offset < 0)
error("Negative ID for DM particle %i: ID=%lld", i,
gparts[i].id_or_neg_offset);
/* Set gpart type */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment