[Users] 3D output of staggered grid functions
Roland Haas
rhaas at illinois.edu
Thu Oct 12 08:44:17 CDT 2023
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#lines-752
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#lines-634
void *data = cctkGH->data[request->vindex][request->timelevel];
So you can see it just passes the in memory array to HDF5.
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 .
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.einsteintoolkit.org/pipermail/users/attachments/20231012/c8e73cd2/attachment.sig>
More information about the Users
mailing list