Skip to content

Commit

Permalink
trying to fix table3d error
Browse files Browse the repository at this point in the history
  • Loading branch information
Piyush Sharda authored and Piyush Sharda committed Feb 4, 2024
1 parent d2f1377 commit 0dd17b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/TurbDataReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ auto read_dataset(hid_t &file_id, char const *dataset_name) -> amrex::Table3D<do
std::vector<hsize_t> dims(ndims);
H5Sget_simple_extent_dims(dspace, dims.data(), nullptr);

uint64_t data_size = 1;
size_t data_size = 1;
for (int idim = 0; idim < ndims; ++idim) {
data_size *= dims[idim];
}

// allocate array for dataset storage
std::unique_ptr<double[]> temp_data(new double[data_size]);
// std::unique_ptr<double[]> temp_data(new double[data_size]);
std::vector<double> temp_data(data_size);

// read dataset
herr_t status = H5Dread(dset_id, HDF5_R8, H5S_ALL, H5S_ALL, H5P_DEFAULT, temp_data);
Expand Down

0 comments on commit 0dd17b3

Please sign in to comment.