Hi, thank you for the great work on this project!
I was wondering if it’s possible to load the polarization data from a completed simulation and use it as the initial condition for a new simulation. I’d like to continue a simulation from where it left off, using the final polarization state as the starting point.
Is this currently supported in FerroX, and if so, could you please share how to do it?
Thanks in advance!
It's not currently supported - there could be two ways to do this but would require some code development.
One way would be to introduce checkpointing, which is a feature of many AMReX codes. We'd have to figure out exactly what state data and other variables need to be saved so a simulation could be restarted from a checkpoint file. This would work for sure given enough development, although certain features may be tricky to implement the logic for like the voltage stepping/switching (but certainly possible).
The second way, which I'm not sure would work, would be to read in a plotfile directly, however this doesn't contain other metadata or field variables that may be required to restart a simulation correctly.
There is a tutorial in amrex that demonstrates workflow for checkpoint/restart here:
https://github.com/AMReX-Codes/amrex-tutorials/tree/main/ExampleCodes/Basic/HeatEquation_Restart
To do this properly in FerroX would require more thought as to all the variables that need to be saved/loaded from the checkpoint.