From 45e2808207921a225d7ea962910d0283590b53e4 Mon Sep 17 00:00:00 2001 From: Miriam Date: Fri, 7 Aug 2020 00:38:59 +0000 Subject: [PATCH] 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. --- openmc/mgxs/mgxs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index bd9ff91dc2..1552067e7c 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -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