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

Sort particles when loading? #67

Closed
nvaytet opened this issue Feb 8, 2022 · 3 comments · Fixed by #87
Closed

Sort particles when loading? #67

nvaytet opened this issue Feb 8, 2022 · 3 comments · Fixed by #87

Comments

@nvaytet
Copy link
Collaborator

nvaytet commented Feb 8, 2022

Can we sort the particles when they are loaded?
Sort by type or id by default, but provide an option to choose a different key for sorting?

@nvaytet
Copy link
Collaborator Author

nvaytet commented Feb 16, 2022

@haugboel I think providing the option to sort via a different key in the load() command would be quite messy.
Would it be ok to sort by default according to family or tag, and then provide a .sort method on the Datagroup if you want to sort by something else after loading?

We could also make a config option, so that the default sorting key could be set inside the user's config file?

@nvaytet
Copy link
Collaborator Author

nvaytet commented Feb 16, 2022

On second thought, if we provide a generic sort mechanism on the Datagroup, if you sort the 'amr' group according to say position_x, then the hydro group will be out of sync with the 'amr' group.

Should we have a mechanism that links the amr and hydro groups, or should ensuring synchronization between groups be the user's responsibility?

The linking sounds complicated and brittle...

@haugboel
Copy link
Collaborator

haugboel commented Feb 16, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants