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

[ENH] RAMSES: set max_level from parameter file #5060

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cphyc
Copy link
Member

@cphyc cphyc commented Nov 20, 2024

PR Summary

RAMSES contains a text file that describes some basic element of the AMR structure, including the maximum level of refinment. However, that level may not be reached. Up to this PR, we would read all AMR domain files to figure out to effective max level of refinment. This is however a costly operation for large simulations; this PR returns a more conservative number for the max level (the highest achievable by the sim) and is MUCH faster.

PR Checklist

  • New features are documented, with docstrings and narrative docs -> no new feature
  • Adds a test for any bugs fixed. Adds tests for new features. -> all existing tests should pass

This allows to, e.g. create a sphere object without ever reading most of the AMR file
@max_level.setter
def max_level(self, value):
self._max_level = value
return self.ds.max_level
Copy link
Member Author

Choose a reason for hiding this comment

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

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

Successfully merging this pull request may close these issues.

1 participant