Skip to content

Commit

Permalink
core: Track default-constructed particles
Browse files Browse the repository at this point in the history
When no user-defined type is available, explicitly assign type 0.
This is necessary for tracking particles ids in reaction methods.
  • Loading branch information
jngrad committed Oct 7, 2022
1 parent a8f166a commit 292bf32
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/script_interface/particle_data/ParticleHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,9 @@ void ParticleHandle::do_construct(VariantMap const &params) {
do_set_parameter(kv.first, kv.second);
}
}
if (params.count("type") == 0) {
do_set_parameter("type", 0);
}
}
}

Expand Down

0 comments on commit 292bf32

Please sign in to comment.