Hello,
I have a question regarding 3D HDF5 output of staggered grid functions, e.g. the vector potential of IllinoisGRMHD.
So far, I have assumed that 3D HDF5 data will just contain the respective grid function where the values are left unchanged from those which are actually used during the evolution.
However, I have found some inconsistencies with this assumption in my prost-process calculations where it seems as if the 3D output data actually contains the respective grid function interpolated to the cell vertices.
For a staggered function like the vector potential this would change its value from the one actually used in the evolution.
So, my question is whether interpolation is used in Carpet for 3D HDF output in order to compute the GFs cell vertices?
Thanks in advance and a nice weekend,
Michail
Hello Michail,
So far, I have assumed that 3D HDF5 data will just contain the respective grid function where the values are left unchanged from those which are actually used during the evolution.
That is correct. The HDF5 are just a memory dump o what is in the simulation.
However, I have found some inconsistencies with this assumption in my prost-process calculations where it seems as if the 3D output data actually contains the respective grid function interpolated to the cell vertices.
This is not the case, no. A visualization tool (and maybe some analysis tools) may do that, but the data in the HDF5 files is just what existed in the simulation. Note that for staggered variables the *coordinates* are likely wrong since the coordinates grid functions are (usually) the vertex centered coordinates of the cell corners. There is also an "origin" attribute to each hdf5 dataset and that one is the coordinate of the cell corner of the first cell in the dataset *not* the edge centered data that is actually stored in the dataset.
For a staggered function like the vector potential this would change its value from the one actually used in the evolution.
Nope, not happening.
So, my question is whether interpolation is used in Carpet for 3D HDF output in order to compute the GFs cell vertices?
No, not done. Output is done here:
https://bitbucket.org/eschnett/carpet/src/master/CarpetIOHDF5/src/Output.cc#...
H5Dwrite(dataset, memdatatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
where "data" is just the raw data from memory:
https://bitbucket.org/eschnett/carpet/src/master/CarpetIOHDF5/src/Output.cc#...
void *data = cctkGH->data[request->vindex][request->timelevel];
So you can see it just passes the in memory array to HDF5.
Yours, Roland
users@lists.einsteintoolkit.org