Commit d4dc8462 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Allow 0 ids but not negative ids.

parent 7f4d2a8c
......@@ -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 */
......
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