From 9cfd7dee35f12115747bf34a9f43d47b6fbbe231 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 12 Mar 2019 11:58:58 -0500 Subject: [PATCH] Make sure Particle::Bank::particle member gets written in HDF5 --- openmc/capi/core.py | 3 ++- src/state_point.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/openmc/capi/core.py b/openmc/capi/core.py index 922877c8e4..ad4f77dfff 100644 --- a/openmc/capi/core.py +++ b/openmc/capi/core.py @@ -17,7 +17,8 @@ class _Bank(Structure): ('u', c_double*3), ('E', c_double), ('wgt', c_double), - ('delayed_group', c_int)] + ('delayed_group', c_int), + ('particle', c_int)] # Define input type for numpy arrays that will be passed into C++ functions diff --git a/src/state_point.cpp b/src/state_point.cpp index ab14734033..d657316f97 100644 --- a/src/state_point.cpp +++ b/src/state_point.cpp @@ -480,6 +480,7 @@ hid_t h5banktype() { H5Tinsert(banktype, "E", HOFFSET(Particle::Bank, E), H5T_NATIVE_DOUBLE); H5Tinsert(banktype, "wgt", HOFFSET(Particle::Bank, wgt), H5T_NATIVE_DOUBLE); H5Tinsert(banktype, "delayed_group", HOFFSET(Particle::Bank, delayed_group), H5T_NATIVE_INT); + H5Tinsert(banktype, "particle", HOFFSET(Particle::Bank, particle), H5T_NATIVE_INT); H5Tclose(postype); return banktype;