Exception for current in domain_to_filter

build_hdf5_store fails for current unless domain_to_filter is circumvented.
Because current is a 'mesh' domain, domain_to_filter would assign a mesh filter.
However, current uses a meshsurface filter instead, so domain_to_filter must allow for that exception.
This commit is contained in:
Miriam 2020-08-07 00:38:59 +00:00
parent 4e4c559616
commit 45e2808207

View file

@ -560,7 +560,10 @@ class MGXS:
domain_type = self.domain_type[4:-1]
else:
domain_type = self.domain_type
filter_type = _DOMAIN_TO_FILTER[domain_type]
if self._rxn_type == 'current':
filter_type = openmc.MeshSurfaceFilter
else:
filter_type = _DOMAIN_TO_FILTER[domain_type]
domain_filter = self.xs_tally.find_filter(filter_type)
return domain_filter.num_bins