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

Writing functions of time to disk #6464

Open
nilsdeppe opened this issue Jan 29, 2025 · 0 comments
Open

Writing functions of time to disk #6464

nilsdeppe opened this issue Jan 29, 2025 · 0 comments
Assignees

Comments

@nilsdeppe
Copy link
Member

It would very helpful to have the functions of time be written to disk, including their updates. Currently we do some subtle writing of the FoTs into volume data. Specifically, the FoTs are read from the cache at write time, not when the event is called. Doing it in the event would pose the challenge of how do you select which FoTs to write, since because the cache may be mutated at any time, different elements may send different FoTs. Trying to select which FoTs to use would be very complicated...

The current proposal after talking with @knelli2 is:

  1. Add a H5 subfile that allows us to write FoTs to disk.
    • The subfile would contain groups for each FoT by name.
    • Each group holds subgroups indexing the FoT, e.g. 0.fot, 1.fot where it is guaranteed that 0.fot is valid for times before 1.fot. This is to support changing the implementation of an FoT in the middle of an evolution. We need this for BNS where we want to change from Quaternion to QuaternionSettleToConstant
    • Each #.fot subgroup holds a serialized initial state of the FoT called initial_state that is just the vector of chars.
    • Each #.fot subgroup holds a Updates.dat that has the entries for calls to the FoT's update function.
    • Each #.fot has an attribute that specifies the validity range of the FoT.
  2. Once we can write the FoTs, add that class interface can read back and create the functions of time. It's still not clear exactly what to return, maybe for each FoT some vector-like structure with validity ranges?
  3. Update all the python code to get FoTs from the reductions file instead of it being in the volume file.
  4. Remove writing the FoTs into the volume file.

This will also make it easier to read in FoTs for restarts, and will also make it easier to plot the FoT parameters over time to try and diagnose problems.

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

No branches or pull requests

2 participants