pyopensn.logvol.BooleanLogicalVolume

class pyopensn.logvol.BooleanLogicalVolume

Boolean logical volume.

Wrapper of opensn::BooleanLogicalVolume.

Inside(self: pyopensn.logvol.LogicalVolume, point: pyopensn.math.Vector3) bool

Check if a point is inside or outside the logical volume.

__init__(self: pyopensn.logvol.BooleanLogicalVolume, **kwargs) None

Construct a boolean logical volume from a list of combinatorial logics. Each combinatorial logic are represented by a Python dictionary with two keys:

Parameters:

parts (List[Dict]) – List of dictionary of combinatorial logics.

Examples

>>> blv = BooleanLogicalVolume(
...     parts=[{ "op": True, "lv": volume1 }, { "op": False, "lv": volume2 }]
... )