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

Particle property ranges, remove ParticleRanges from P3M #4737

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

jhossbach
Copy link
Contributor

@jhossbach jhossbach commented May 24, 2023

Partial fix for #4721, closes #4696

Description of changes:

  • Implements the ParticlePropertyRange struct containing static methods to transform a ParticleRange to a boost::iterator_range of properties of the particles, such as ForceRange or ParticleRange, which can then be used in range-based for-loops.

The refactoring of the P3M part is not finished yet, but I think this PR could also be extended to remove the ParticleRanges from the remaining Coulomb interactions.

@jhossbach jhossbach force-pushed the particle_property_iterators branch from 658feb0 to 6bb53e0 Compare August 10, 2023 11:19
@jhossbach
Copy link
Contributor Author

I have successfully changed all ParticleRange signatures of methods inside the long_range_kernel method. In order to make the whole p3m.cpp free of ParticleRanges one would need to remove both the signature of long_range_kernel itself and the AssignCharge struct. The latter would require touching some other files, e.g. elc.cpp. Is this still a part of this PR or should this be moved to a larger refactoring @RudolfWeeber ?

Copy link
Member

@jngrad jngrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, pending suggested changes.

src/core/ParticlePropertyIterator.hpp Outdated Show resolved Hide resolved
src/core/ParticlePropertyIterator.hpp Outdated Show resolved Hide resolved
src/core/ParticlePropertyIterator.hpp Outdated Show resolved Hide resolved
src/core/ParticlePropertyIterator.hpp Outdated Show resolved Hide resolved
src/core/ParticlePropertyIterator.hpp Outdated Show resolved Hide resolved
src/core/electrostatics/p3m.cpp Outdated Show resolved Hide resolved
src/core/electrostatics/p3m.cpp Outdated Show resolved Hide resolved
src/core/ParticlePropertyIterator.hpp Outdated Show resolved Hide resolved
src/core/ParticlePropertyIterator.hpp Outdated Show resolved Hide resolved
@jhossbach jhossbach force-pushed the particle_property_iterators branch from fb3c90b to b53fbc7 Compare September 12, 2023 15:44
@jhossbach jhossbach force-pushed the particle_property_iterators branch from b53fbc7 to d0d4964 Compare October 24, 2023 07:29
@jhossbach jhossbach requested a review from jngrad October 25, 2023 10:24
@jngrad jngrad force-pushed the particle_property_iterators branch from 20e9b2d to b220eeb Compare October 25, 2023 11:02
@jngrad jngrad self-assigned this Oct 25, 2023
@jngrad jngrad added Core automerge Merge with kodiak labels Oct 25, 2023
@kodiakhq kodiakhq bot merged commit c31f701 into espressomd:python Oct 25, 2023
5 checks passed
@jhossbach jhossbach deleted the particle_property_iterators branch November 24, 2023 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge with kodiak Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

particle property iterators
2 participants