openmc.Region¶
-
class
openmc.
Region
[source]¶ Region of space that can be assigned to a cell.
Region is an abstract base class that is inherited by
openmc.Halfspace
,openmc.Intersection
,openmc.Union
, andopenmc.Complement
. Each of those respective classes are typically not instantiated directly but rather are created through operators of the Surface and Region classes.-
static
from_expression
(expression, surfaces)[source]¶ Generate a region given an infix expression.
Parameters: - expression (str) – Boolean expression relating surface half-spaces. The possible operators are union ‘|’, intersection ‘ ‘, and complement ‘~’. For example, ‘(1 -2) | 3 ~(4 -5)’.
- surfaces (dict) – Dictionary whose keys are suface IDs that appear in the Boolean expression and whose values are Surface objects.
-
static