diff --git a/openmc/model/funcs.py b/openmc/model/funcs.py index 9999c383ff..188f1a273a 100644 --- a/openmc/model/funcs.py +++ b/openmc/model/funcs.py @@ -253,8 +253,8 @@ def hexagonal_prism(edge_length=1., orientation='y', origin=(0., 0.), x, y = origin if orientation == 'y': - right = XPlane(x + sqrt(3.)/2*l, boundary_type) - left = XPlane(x - sqrt(3.)/2*l, boundary_type) + right = XPlane(x + sqrt(3.)/2*l, boundary_type=boundary_type) + left = XPlane(x - sqrt(3.)/2*l, boundary_type=boundary_type) c = sqrt(3.)/3. # y = -x/sqrt(3) + a diff --git a/tests/regression_tests/asymmetric_lattice/test.py b/tests/regression_tests/asymmetric_lattice/test.py index 7ed0293ce9..2197a1e7e2 100644 --- a/tests/regression_tests/asymmetric_lattice/test.py +++ b/tests/regression_tests/asymmetric_lattice/test.py @@ -25,12 +25,12 @@ class AsymmetricLatticeTestHarness(PyAPITestHarness): [water, water, water]] # Create bounding surfaces - min_x = openmc.XPlane(-32.13, 'reflective') - max_x = openmc.XPlane(+32.13, 'reflective') - min_y = openmc.YPlane(-32.13, 'reflective') - max_y = openmc.YPlane(+32.13, 'reflective') - min_z = openmc.ZPlane(0, 'reflective') - max_z = openmc.ZPlane(+32.13, 'reflective') + min_x = openmc.XPlane(-32.13, boundary_type='reflective') + max_x = openmc.XPlane(+32.13, boundary_type='reflective') + min_y = openmc.YPlane(-32.13, boundary_type='reflective') + max_y = openmc.YPlane(+32.13, boundary_type='reflective') + min_z = openmc.ZPlane(0, boundary_type='reflective') + max_z = openmc.ZPlane(+32.13, boundary_type='reflective') # Define root universe root_univ = openmc.Universe(universe_id=0, name='root universe') diff --git a/tests/regression_tests/deplete/example_geometry.py b/tests/regression_tests/deplete/example_geometry.py index f79044558c..84134f58f8 100644 --- a/tests/regression_tests/deplete/example_geometry.py +++ b/tests/regression_tests/deplete/example_geometry.py @@ -298,12 +298,12 @@ def generate_geometry(n_rings, n_wedges): lattice.outer = all_water_u # Bound universe - x_low = openmc.XPlane(-pitch*n_pin/2, 'reflective') - x_high = openmc.XPlane(pitch*n_pin/2, 'reflective') - y_low = openmc.YPlane(-pitch*n_pin/2, 'reflective') - y_high = openmc.YPlane(pitch*n_pin/2, 'reflective') - z_low = openmc.ZPlane(-10, 'reflective') - z_high = openmc.ZPlane(10, 'reflective') + x_low = openmc.XPlane(-pitch*n_pin/2, boundary_type='reflective') + x_high = openmc.XPlane(pitch*n_pin/2, boundary_type='reflective') + y_low = openmc.YPlane(-pitch*n_pin/2, boundary_type='reflective') + y_high = openmc.YPlane(pitch*n_pin/2, boundary_type='reflective') + z_low = openmc.ZPlane(-10, boundary_type='reflective') + z_high = openmc.ZPlane(10, boundary_type='reflective') # Compute bounding box lower_left = [-pitch*n_pin/2, -pitch*n_pin/2, -10] diff --git a/tests/regression_tests/salphabeta/test.py b/tests/regression_tests/salphabeta/test.py index f487723dee..fd0486118f 100644 --- a/tests/regression_tests/salphabeta/test.py +++ b/tests/regression_tests/salphabeta/test.py @@ -44,11 +44,11 @@ def make_model(): model.materials += [m1, m2, m3, m4] # Geometry - x0 = openmc.XPlane(-10, 'vacuum') + x0 = openmc.XPlane(-10, boundary_type='vacuum') x1 = openmc.XPlane(-5) x2 = openmc.XPlane(0) x3 = openmc.XPlane(5) - x4 = openmc.XPlane(10, 'vacuum') + x4 = openmc.XPlane(10, boundary_type='vacuum') root_univ = openmc.Universe() diff --git a/tests/regression_tests/triso/test.py b/tests/regression_tests/triso/test.py index 7bef80ea87..c447156913 100644 --- a/tests/regression_tests/triso/test.py +++ b/tests/regression_tests/triso/test.py @@ -54,12 +54,12 @@ class TRISOTestHarness(PyAPITestHarness): inner_univ = openmc.Universe(cells=[c1, c2, c3, c4, c5]) # Define box to contain lattice and to pack TRISO particles in - min_x = openmc.XPlane(-0.5, 'reflective') - max_x = openmc.XPlane(0.5, 'reflective') - min_y = openmc.YPlane(-0.5, 'reflective') - max_y = openmc.YPlane(0.5, 'reflective') - min_z = openmc.ZPlane(-0.5, 'reflective') - max_z = openmc.ZPlane(0.5, 'reflective') + min_x = openmc.XPlane(-0.5, boundary_type='reflective') + max_x = openmc.XPlane(0.5, boundary_type='reflective') + min_y = openmc.YPlane(-0.5, boundary_type='reflective') + max_y = openmc.YPlane(0.5, boundary_type='reflective') + min_z = openmc.ZPlane(-0.5, boundary_type='reflective') + max_z = openmc.ZPlane(0.5, boundary_type='reflective') box_region = +min_x & -max_x & +min_y & -max_y & +min_z & -max_z box = openmc.Cell(region=box_region) diff --git a/tests/unit_tests/conftest.py b/tests/unit_tests/conftest.py index 926535a9c8..51d1b19a33 100644 --- a/tests/unit_tests/conftest.py +++ b/tests/unit_tests/conftest.py @@ -108,11 +108,11 @@ def mixed_lattice_model(uo2, water): [empty_univ, u] ] - xmin = openmc.XPlane(-d, 'periodic') - xmax = openmc.XPlane(d, 'periodic') + xmin = openmc.XPlane(-d, boundary_type='periodic') + xmax = openmc.XPlane(d, boundary_type='periodic') xmin.periodic_surface = xmax - ymin = openmc.YPlane(-d, 'periodic') - ymax = openmc.YPlane(d, 'periodic') + ymin = openmc.YPlane(-d, boundary_type='periodic') + ymax = openmc.YPlane(d, boundary_type='periodic') main_cell = openmc.Cell(fill=rect_lattice, region=+xmin & -xmax & +ymin & -ymax) diff --git a/tests/unit_tests/test_complex_cell_bb.py b/tests/unit_tests/test_complex_cell_bb.py index 8db20f05c1..ad6491cca9 100644 --- a/tests/unit_tests/test_complex_cell_bb.py +++ b/tests/unit_tests/test_complex_cell_bb.py @@ -27,20 +27,20 @@ def complex_cell(run_in_tmpdir, mpi_intracomm): model.materials = (u235, u238, zr90, n14) - s1 = openmc.XPlane(-10.0, 'vacuum') + s1 = openmc.XPlane(-10.0, boundary_type='vacuum') s2 = openmc.XPlane(-7.0) s3 = openmc.XPlane(-4.0) s4 = openmc.XPlane(4.0) s5 = openmc.XPlane(7.0) - s6 = openmc.XPlane(10.0, 'vacuum') + s6 = openmc.XPlane(10.0, boundary_type='vacuum') s7 = openmc.XPlane(0.0) - s11 = openmc.YPlane(-10.0, 'vacuum') + s11 = openmc.YPlane(-10.0, boundary_type='vacuum') s12 = openmc.YPlane(-7.0) s13 = openmc.YPlane(-4.0) s14 = openmc.YPlane(4.0) s15 = openmc.YPlane(7.0) - s16 = openmc.YPlane(10.0, 'vacuum') + s16 = openmc.YPlane(10.0, boundary_type='vacuum') s17 = openmc.YPlane(0.0) c1 = openmc.Cell(fill=u235) diff --git a/tests/unit_tests/test_surface.py b/tests/unit_tests/test_surface.py index b37dc8f310..e7d37c4e91 100644 --- a/tests/unit_tests/test_surface.py +++ b/tests/unit_tests/test_surface.py @@ -67,7 +67,7 @@ def test_plane_from_points(): def test_xplane(): - s = openmc.XPlane(3., 'reflective') + s = openmc.XPlane(3., boundary_type='reflective') assert s.x0 == 3. assert s.boundary_type == 'reflective' @@ -441,7 +441,7 @@ def test_cone(): assert_infinite_bb(s) # evaluate method - # cos^2(theta) * ((p - p1))**2 - (d @ (p - p1))^2 + # cos^2(theta) * ((p - p1))**2 - (d @ (p - p1))^2 # The argument r2 for cones is actually tan^2(theta) so that # cos^2(theta) = 1 / (1 + r2) #