AMReX-Codes / amrex

AMReX: Software Framework for Block Structured AMR
https://amrex-codes.github.io/amrex
Other
503 stars 336 forks source link

HDF5: Correctly choose datatype of plotfile based on RD numBytes #4006

Closed arnav-singhal closed 6 days ago

arnav-singhal commented 1 week ago

Summary

If numBytes is 4, use H5T_NATIVE_FLOAT instead of H5T_NATIVE_DOUBLE. This fixes writing real values, as in ExaEpi.

Additional background

As far as I can tell, whichRD (and therefore whichRDBytes) does not change between levels, so I perform this check outside of the level loop, but if it is indeed possible for these values to change, I can move it inside.

Checklist

The proposed changes:

atmyers commented 6 days ago

Thanks!