openmc.Complement¶
-
class
openmc.
Complement
(node)[source]¶ Complement of a region.
The Complement of an existing
openmc.Region
can be created by using the ~ operator as the following example demonstrates:>>> xl = openmc.XPlane(-10.0) >>> xr = openmc.XPlane(10.0) >>> yl = openmc.YPlane(-10.0) >>> yr = openmc.YPlane(10.0) >>> inside_box = +xl & -xr & +yl & -yr >>> outside_box = ~inside_box >>> type(outside_box) <class 'openmc.region.Complement'>
Parameters: node (openmc.Region) – Region to take the complement of
Variables: - node (openmc.Region) – Regions to take the complement of
- bounding_box (tuple of numpy.array) – Lower-left and upper-right coordinates of an axis-aligned bounding box
-
clone
(memo=None)[source]¶ Create a copy of this region - each of the surfaces in the complement’s node will be cloned and will have new unique IDs.
Parameters: memo (dict or None) – A nested dictionary of previously cloned objects. This parameter is used internally and should not be specified by the user. Returns: clone – The clone of this complement Return type: openmc.Complement
-
get_surfaces
(surfaces=None)[source]¶ Recursively find and return all the surfaces referenced by the node
Parameters: surfaces (collections.OrderedDict, optional) – Dictionary mapping surface IDs to openmc.Surface
instancesReturns: surfaces – Dictionary mapping surface IDs to openmc.Surface
instancesReturn type: collections.OrderedDict