-
Notifications
You must be signed in to change notification settings - Fork 67
Description
Reason
When block restrictions are specified in a MeshTally, a copy of the mesh is created and passed to OpenMC for tallying. This results in substantial memory usage when the block restriction includes large subdomains of the mesh.
Design
Block restriction must be specified in the point locators used by OpenMC for tallying, along with the equivalent bin->element and element-> bin mapping data structures. This was merged into OpenMC in openmc-dev/openmc#3694. The Cardinal component of this implementation is quite simple - the std::set of blocks just needs to be passed to an openmc::AdaptiveLibMesh.
Impact
Large reduction in memory usage when providing block restrictions to a MeshTally. Not requiring a mesh copy also fixes a bug with on-the-fly element amalgamation that @magnoxemo found (extra element IDs were not being preserved during the copying process).