Hello,
I noticed that the ReadInterpolate Thorn only works with Carpet. Is it possible to get something like it for Pugh? What would be the differences?
-DG
On Oct 2, 2019, at 12:33 PM, Haas, Roland rhaas@illinois.edu wrote:
Hello DG,
Is it possible to restart a checkpointed run with a few parameters changed? For example, can you run a simulation with checkpoint, then restart it from the last checkpoint using different values of maximum and minimum grid range values (as well as different grid spacing) if you keep the number of grid points the same?
You can change with some parameters changed. The parameters are the ones that are marked as "STEERABLE=recover" or "STEERABLE=always" in their respective thorn's param.ccl files.
Unfortunately the grid range values and the spacing are not among those (since they would require that data is re-interpolated onto those).
There is a thorn ReadInterpolate that can do that. See https://github.com/rhaas80/ReadInterpolate.git (you can find a number of non-ET thorns of interest collected here: https://docs.einsteintoolkit.org/et-docs/Thorns_we_know_of).
Please see the test file https://github.com/rhaas80/ReadInterpolate/blob/master/ReadInterpolate/test/... for how to use it (it reads data that were written by the parfile tov_write.parfile).
Please note that you most likely will see small "jump" in your simulation since ReadInterpolate acts as an initial data reader so it will only (at least in the "master" version) set the current timelevel values but not past ones which can affect values in mesh refinement boundaries.
Yours, Roland
-- My email is as private as my paper mail. I therefore support encrypting and signing email messages. Get my PGP key from http://pgp.mit.edu . _______________________________________________ Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
Hello DG,
I noticed that the ReadInterpolate Thorn only works with Carpet. Is it possible to get something like it for Pugh? What would be the differences?
I have not tried it with PUGH. PUGH implements a subset of what Carpet offers and at the very basic level one could think of having only a single refinement level in Carpet. Ie one would have to return 0 for each call to Carpet_GetRefinementLevel. There are also uses of Carpet_GetTimeLevel which may not have an equivalent in PUGH (but would not be so bad to obtain). Some more changes are required b/c PUGH does not directly let one call initial data routines (which is what ReadInterpolate is) on past timelevels so, if one wants to read in all 3 timelevels from a checkpoint, one has to manually cycle through the 3 timelevels. The various BEGIN_XXX macros then become no-ops. These are the changes that come to mind right now, there may be others that I am not aware of at this point.
Please note that PUGH is hardly used anymore for production simulations since Carpet offers (in almost all cases) a strict superset of features to it. Your fastest option to get ReadInterpolate working may be to switch over to using Carpet.
Please also keep in mind that ReadInterpolate will only ever allow you to shrink the domain (since it cannot make up numbers if you increase the domain size).
If this is a one-off operation you may also be faster by writing a small set of python scripts to operate between two checkpoints: one written in the old grid setup (containing the data) and one written in the new setup (contains say just zeroes for the values) and use something like
https://docs.scipy.org/doc/scipy-0.18.0/reference/generated/scipy.interpolat...
for the interpolation.
The easiest way to get the coordinates is to ask for 3d output of the CartGrid3D variables x,y,z (which are not checkpointed so it needs to be regular output).
Yours, Roland
users@lists.einsteintoolkit.org