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

Support Scatter/Gather operations #41

Closed
Joroks opened this issue Jun 19, 2024 · 3 comments
Closed

Support Scatter/Gather operations #41

Joroks opened this issue Jun 19, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Joroks
Copy link
Collaborator

Joroks commented Jun 19, 2024

currently only lammps_gather_atoms() is implemented.

however, I'd like to use

  • lammps_gather()
  • lammps_gather_subset()
  • lammps_scatter()
  • lammps_scatter_subset()

as well.

If I've understood the C-Library documentation (https://docs.lammps.org/Library_scatter.html#_CPPv420lammps_scatter_atomsPvPKciiPv) correctly,

  • lammps_gather_atoms()
  • lammps_gather_atoms_subset()
  • lammps_scatter_atoms()
  • lammps_scatter_atoms_subset()

do essentially the same thing but are more restrictive (i.e. don't work with fix or compute values). So I don't think it would be necessary to implement those?

@vchuravy
Copy link
Member

Happy to take a PR for these. I currently am short on time so I don't think I can implement it myself.

We currently don't have a high level interface to scatter:

The only use I see is

LAMMPS.API.lammps_scatter_atoms(lmp, "x", 1, 3, positions)

You could follow

function gather_atoms(lmp::LMP, name, T, count)
to add a Julian interface for these functions.

@vchuravy vchuravy added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Jun 19, 2024
@Joroks
Copy link
Collaborator Author

Joroks commented Jun 19, 2024

I'll get to work on it then.

This was referenced Jun 20, 2024
@vchuravy
Copy link
Member

Implemented in #43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants