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

Add Custom+Partial Iteration for Particle Scatter and Gather Operations #327

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

aliemen
Copy link
Collaborator

@aliemen aliemen commented Dec 5, 2024

This pull request implements the following changes to resolve issue #326:

  1. Scatter Operation Enhancements:

    • Modified ParticleAttrib::scatter to accept a custom range policy and hashing array, like ippl::hash_type.
    • Added a check to ensure the custom policy matches the number of available elements.
    • Introduced the usage of mapped_idx instead of idx for particle scattering.
    • Overloaded the non-class scatter interface to preserve old functionality while allowing custom range policies.
  2. Gather:

    • Modified ParticleAttrib::gather to include a boolean parameter that determines whether to add to or overwrite the attribute's values.
    • Changed the non-class gather interface to maintain backward compatibility.

Testing:

  • Added a new test file test/particle/TestHashedScatter.cpp.
  • Modified the existing TestGather to validate the new functionality (use "+=" instead of "+").

closes #326

@aliemen aliemen self-assigned this Dec 5, 2024
@aliemen aliemen marked this pull request as ready for review December 5, 2024 10:03
@aliemen aliemen removed their assignment Dec 5, 2024
@matt-frey matt-frey requested review from aaadelmann and removed request for matt-frey December 9, 2024 14:12
@matt-frey matt-frey added the feature request Used to label a feature request in the issue tracker. label Dec 9, 2024
@matt-frey matt-frey self-requested a review December 9, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Used to label a feature request in the issue tracker.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change scatter/gather to allow custom/partial iteration over particles
2 participants