- class openmc.Complement(node)¶
Complement of a region.
The Complement of an existing
openmc.Regioncan 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'>
node (openmc.Region) – Region to take the complement of
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
Create a copy of this region - each of the surfaces in the region’s nodes will be cloned and will have new unique IDs.
Recursively find and return all the surfaces referenced by the node
Recursively remove all redundant surfaces referenced by this region
New in version 0.12.
redundant_surfaces (dict) – Dictionary mapping redundant surface IDs to class:openmc.Surface instances that should replace them.
- rotate(rotation, pivot=(0.0, 0.0, 0.0), order='xyz', inplace=False, memo=None)¶
Rotate surface by angles provided or by applying matrix directly.
New in version 0.12.
rotation (3-tuple of float, or 3x3 iterable) – A 3-tuple of angles \((\phi, \theta, \psi)\) in degrees where the first element is the rotation about the x-axis in the fixed laboratory frame, the second element is the rotation about the y-axis in the fixed laboratory frame, and the third element is the rotation about the z-axis in the fixed laboratory frame. The rotations are active rotations. Additionally a 3x3 rotation matrix can be specified directly either as a nested iterable or array.
pivot (iterable of float, optional) – (x, y, z) coordinates for the point to rotate about. Defaults to (0., 0., 0.)
order (str, optional) – A string of ‘x’, ‘y’, and ‘z’ in some order specifying which rotation to perform first, second, and third. Defaults to ‘xyz’ which means, the rotation by angle \(\phi\) about x will be applied first, followed by \(\theta\) about y and then \(\psi\) about z. This corresponds to an x-y-z extrinsic rotation as well as a z-y’-x’’ intrinsic rotation using Tait-Bryan angles \((\phi, \theta, \psi)\).
inplace (boolean) – Whether or not to return a new instance of Surface or to modify the coefficients of this Surface in place. Defaults to False.
- Return type
- translate(vector, memo=None)¶
Translate region in given direction