Apply @shimwell suggestions from code review

Co-authored-by: Jonathan Shimwell <drshimwell@gmail.com>
This commit is contained in:
Paul Romano 2022-09-28 09:33:48 -05:00 committed by GitHub
parent dd7a25c570
commit e0be9de086
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,7 +110,8 @@ def test_rejection(run_in_tmpdir):
)
cell1 = openmc.Cell(fill=mat, region=-sph1)
cell2 = openmc.Cell(fill=mat, region=-sph2)
cell3 = openmc.Cell(region=+sph1 & +sph2 & -cube)
non_source_region = +sph1 & +sph2 & -cube
cell3 = openmc.Cell(region=non_source_region)
model = openmc.Model()
model.geometry = openmc.Geometry([cell1, cell2, cell3])
model.settings.particles = 100
@ -130,5 +131,6 @@ def test_rejection(run_in_tmpdir):
joint_region = cell1.region | cell2.region
for p in particles:
assert p.r in joint_region
assert p.r not in non_source_region
openmc.lib.finalize()