Skip to content
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

Check if AutoPasContainer::getNumberOfParticles() is still broken #229

Open
FG-TUM opened this issue Feb 25, 2022 · 0 comments
Open

Check if AutoPasContainer::getNumberOfParticles() is still broken #229

FG-TUM opened this issue Feb 25, 2022 · 0 comments
Labels

Comments

@FG-TUM
Copy link
Member

FG-TUM commented Feb 25, 2022

Describe the bug
The code for AutoPasContainer::getNumberOfParticles() manually counts molecules instead of using the counters of AutoPas. A ToDo there suggests that this is done due to a bug but it is unknown if this still applies. Needs some investigation!

Link to the code:

unsigned long AutoPasContainer::getNumberOfParticles(ParticleIterator::Type t /* = ParticleIterator::ONLY_INNER_AND_BOUNDARY */) {
unsigned long count = 0;
for (auto iter = iterator(t); iter.isValid(); ++iter) {
++count;
}
return count;
// return _autopasContainer.getNumberOfParticles(); // todo: this is currently buggy!, so we use iterators instead.
}

@FG-TUM FG-TUM added the AutoPas label Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant