mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Merge pull request #2263 from eepeterson/redundant_surf_fix
Fix for finding redundant surfaces
This commit is contained in:
commit
1a91fc6fcb
3 changed files with 82 additions and 36 deletions
|
|
@ -339,12 +339,13 @@ def test_remove_redundant_surfaces():
|
|||
water = get_cyl_cell(r2, r3, z1, z2, m3)
|
||||
root = openmc.Universe(cells=[fuel, clad, water])
|
||||
geom = openmc.Geometry(root)
|
||||
|
||||
geom.merge_surfaces=True
|
||||
model = openmc.model.Model(geometry=geom,
|
||||
materials=openmc.Materials([m1, m2, m3]))
|
||||
|
||||
# There should be 6 redundant surfaces in this geometry
|
||||
n_redundant_surfs = len(geom.get_redundant_surfaces().keys())
|
||||
n_redundant_surfs = len(geom.remove_redundant_surfaces().keys())
|
||||
assert n_redundant_surfs == 6
|
||||
# Remove redundant surfaces
|
||||
geom.remove_redundant_surfaces()
|
||||
# There should be 0 remaining redundant surfaces
|
||||
n_redundant_surfs = len(geom.get_redundant_surfaces().keys())
|
||||
n_redundant_surfs = len(geom.remove_redundant_surfaces().keys())
|
||||
assert n_redundant_surfs == 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue