UCL / TDMS

Time Domain Maxwell Solver
https://github-pages.ucl.ac.uk/TDMS
GNU General Public License v3.0
12 stars 4 forks source link

`.mat` store ints as doubles #327

Open willGraham01 opened 1 year ago

willGraham01 commented 1 year ago

.mat files save values as doubles by default, and thus the .mat inputs that we provide to TDMS have values stored as double when we are expecting to read them into std::vector<int> for example.

This causes segmentation faults when we attempt to read in data that we expect to be integer-valued, using the HDF5 C++ API.

There are several variables that we attempt to read in as ints. Creating a list of known places here which will be added to as more are found. Known variables that are affected:

We can circumnavigate this by introducing intermediary buffers in our read methods, but this is not ideal.