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

New API #132

Merged
merged 26 commits into from
Jun 5, 2024
Merged

New API #132

merged 26 commits into from
Jun 5, 2024

Conversation

nvaytet
Copy link
Collaborator

@nvaytet nvaytet commented May 24, 2024

This PR makes fundamental changes to the API of Osyris.
It is the first step towards Version 3.0.

The changes were triggered by the wish to support simulation results other than Ramses.
Many things, especially around making map plots, were very Ramses-centered. We attempt to cleanly remove this restriction here.

The main difference is that Array and Datagroup no longer have a .parent attribute, which linked them to their parent container (Datagroup for Array, Dataset for Datagroup), This was actually only needed for making map plots, when making a hydro density map required to go and get the cell sizes and positions in a different (amr) data group. This makes many things conceptually simpler with how Array behaves. Datagroup is now much more like a simple python dict.

We have now grouped all variables that are inside the AMR structure into a single mesh group. We then still have part and sink groups.

Making maps now works by using a new .layer() method on the Datagroup which returns an object that contains everything needed to make the map (see docs for usage examples).

@nvaytet nvaytet requested a review from haugboel May 24, 2024 14:38
@nvaytet nvaytet added this to the Version 3 milestone May 24, 2024
@nvaytet nvaytet merged commit 780aea8 into main Jun 5, 2024
4 checks passed
@nvaytet nvaytet deleted the new-dataset-constructor branch June 5, 2024 12:41
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 this pull request may close these issues.

1 participant