From 2525c2a3f89e9a8fd49ca4212e12d263289b2570 Mon Sep 17 00:00:00 2001 From: tjlaboss Date: Wed, 29 Mar 2017 20:05:26 -0400 Subject: [PATCH] Accounted for surfaces from a Complement(). --- openmc/region.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/openmc/region.py b/openmc/region.py index 012faca75f..ed1b727454 100644 --- a/openmc/region.py +++ b/openmc/region.py @@ -450,3 +450,23 @@ class Complement(Region): else: temp_region = ~self.node return temp_region.bounding_box + + def get_surfaces_from_region(self, surfaces = OrderedDict()): + """ + Recursively find all the surfaces referenced by the complement's node and return them + Overwrites method Region.get_surfaces_from_region() + + Parameters + ---------- + surfaces: collections.OrderedDict, optional + Dictionary mapping surface IDs to :class:`openmc.Surface` instances + + Returns + ------- + surfaces: collections.OrderedDict + Dictionary mapping surface IDs to :class:`openmc.Surface` instances + + """ + for region in self.node: + surfaces = region.get_surfaces_from_region(surfaces) + return surfaces