2.4.1. Introduction to Logical Volumes

A logical volume is a geometric selector. Its Inside() method determines whether a point lies inside the selected region. OpenSn can use logical volumes to assign mesh block or boundary IDs and to identify subregions for sources and post-processing.

The pyopensn.logvol module provides the following concrete logical volumes:

All of these derive from LogicalVolume. See the Python API reference for their constructor parameters and methods.

When a logical volume is passed to SetBlockIDFromLogicalVolume(), OpenSn selects a cell by testing its centroid. Boundary IDs can similarly be assigned with SetBoundaryIDFromLogicalVolume(). A logical volume that only intersects a cell, without containing its centroid, therefore does not select that cell.