openmc-dev / openmc

OpenMC Monte Carlo Code
https://docs.openmc.org
Other
699 stars 444 forks source link

Ensure that two surfaces with different boundary type are not considered redundant #2942

Closed paulromano closed 3 weeks ago

paulromano commented 3 weeks ago

Description

Right now, if you are exporting a model and ask it to remove redundant surfaces (Geometry.merge_surfaces = True), it compares the surface type and coefficients to determine whether two surfaces are considered equivalent. However, the boundary_type is not currently accounted for, which can cause problems if you have one surface with a boundary condition applied and another surface with no BC that is used on a lower universe level. This PR simply makes a change to account for the boundary_type when determining whether two surfaces are equivalent.

Checklist