-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Particle counter per type broken #3498
Comments
Was #3495. |
What mechanism do you have in mind? The current state tracking is of O(1) and avoids looping over all particles to determine the number of particles of a given type. This state tracking, therefore, is fast compared to looping over all particles and reading their type which is O(N). |
It has to be calculated once when the control transfers to the RE, then the changes done by the RE itself can be tracked without recounting. A linear term is no problem, considering that the RE e.g. also does linear searches for neighbor distances when inserting as well as energy calculations which are more expensive. Also I'm sure there are even faster methods to obtain an incorrect result :-) |
In addition, particles of type 0 created with |
The particle map is not cleared when the list of particles is cleared (#4645). |
There is a mechanism for tracking the number of particles per type in the head node particle data interface. This does so by tracking type changes thru the front end, but does not register type/particles changes from other places e.g. by collisions. This count is used in the reaction ensemble (and exposed to the user), and wrong counts can lead to wrong results. There are concrete plans to use RE and reactions/collision together, so this has to be fixed.
The preferred way to fix this by calculating the particles counts on demand in the reaction ensemble on the front end, where also all the global information is available. I think the state tracking to brittle, and generally not a good idea.
The text was updated successfully, but these errors were encountered: