Skip to content

Commit

Permalink
Merge pull request #489 from pdziekan/record_aux_halo
Browse files Browse the repository at this point in the history
hdf5 halo: store in kji order
  • Loading branch information
pdziekan committed Feb 13, 2023
2 parents b6e6002 + 7e8f38e commit d9f0fe7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion libmpdata++/output/hdf5.hpp
Expand Up @@ -411,7 +411,15 @@ namespace libmpdataxx
space.selectHyperslab(H5S_SELECT_SET, shape_h.data(), offst_h.data());
sspace_mem_h.selectHyperslab(H5S_SELECT_SET, shape_h.data(), offst_mem_h.data());

aux.write(arr.data(), flttype_solver, sspace_mem_h, space, dxpl_id);
// in 3D convert from kij to kji storage order
if(parent_t::n_dims == 3)
{
typename solver_t::arr_t kji_arr(shape_h);
kji_arr = arr;
aux.write(kji_arr.data(), flttype_solver, sspace_mem_h, space, dxpl_id);
}
else
aux.write(arr.data(), flttype_solver, sspace_mem_h, space, dxpl_id);
}

void record_scalar_hlpr(const std::string &name, const std::string &group_name, typename solver_t::real_t data, H5::H5File hdf)
Expand Down

0 comments on commit d9f0fe7

Please sign in to comment.