Is there an existing thorn that allows you to read in initial grid data from a file? I see EinsteinInitialData/IDFileADM, but that does not actually implement any reading.
Thanks again, Hal
Hello Hal,
Is there an existing thorn that allows you to read in initial grid data from a file? I see EinsteinInitialData/IDFileADM, but that does not actually implement any reading.
The file reader in thorn IOUtil will do that for you. See $CACTUS/repos/carpet/Carpet/CarpetIOHDF5/test/input_initial_data.par for an example.
Yours, Roland
On 6 Jan 2012, at 07:53, Roland Haas wrote:
Hello Hal,
Is there an existing thorn that allows you to read in initial grid data from a file? I see EinsteinInitialData/IDFileADM, but that does not actually implement any reading.
The file reader in thorn IOUtil will do that for you. See $CACTUS/repos/carpet/Carpet/CarpetIOHDF5/test/input_initial_data.par for an example.
However, as far as I understand it, this will only allow you to read in data on the same grid (or a subset) that was written out. It will not interpolate from a different grid structure.
IDFileADM is just a bit of book-keeping to interface the Carpet file-reader with the ADMBase "initial_data" parameters.
Hello Hal, Ian,
However, as far as I understand it, this will only allow you to read in data on the same grid (or a subset) that was written out. It will not interpolate from a different grid structure.
True the grid has to match at the time it is read in. You are free to regrid right after that of course (in preregrid of step 1), though I don't know if this will create the new grid before or after the first iteration has finished.
If you need to interpolate from a uniform grid you can use CCTK_InterpLocalUniform to do the interpolation for you. I am not aware of a pre-made thorn for this.
Yours, Roland
users@lists.einsteintoolkit.org