Ensure boundary_type is used by keyword in several spots

This commit is contained in:
Paul Romano 2020-06-17 22:08:56 -05:00
parent 16d7ec0641
commit ca10c58c8a
3 changed files with 13 additions and 13 deletions

View file

@ -361,14 +361,14 @@ class RegularMesh(MeshBase):
n_dim = len(self.dimension)
# Build the cell which will contain the lattice
xplanes = [openmc.XPlane(self.lower_left[0], bc[0]),
openmc.XPlane(self.upper_right[0], bc[1])]
xplanes = [openmc.XPlane(self.lower_left[0], boundary_type=bc[0]),
openmc.XPlane(self.upper_right[0], boundary_type=bc[1])]
if n_dim == 1:
yplanes = [openmc.YPlane(-1e10, 'reflective'),
openmc.YPlane(1e10, 'reflective')]
yplanes = [openmc.YPlane(-1e10, boundary_type='reflective'),
openmc.YPlane(1e10, boundary_type='reflective')]
else:
yplanes = [openmc.YPlane(self.lower_left[1], bc[2]),
openmc.YPlane(self.upper_right[1], bc[3])]
yplanes = [openmc.YPlane(self.lower_left[1], boundary_type=bc[2]),
openmc.YPlane(self.upper_right[1], boundary_type=bc[3])]
if n_dim <= 2:
# Would prefer to have the z ranges be the max supported float, but
@ -378,11 +378,11 @@ class RegularMesh(MeshBase):
# inconsistency between what numpy uses as the max float and what
# Fortran expects for a real(8), so this avoids code complication
# and achieves the same goal.
zplanes = [openmc.ZPlane(-1e10, 'reflective'),
openmc.ZPlane(1e10, 'reflective')]
zplanes = [openmc.ZPlane(-1e10, boundary_type='reflective'),
openmc.ZPlane(1e10, boundary_type='reflective')]
else:
zplanes = [openmc.ZPlane(self.lower_left[2], bc[4]),
openmc.ZPlane(self.upper_right[2], bc[5])]
zplanes = [openmc.ZPlane(self.lower_left[2], boundary_type=bc[4]),
openmc.ZPlane(self.upper_right[2], boundary_type=bc[5])]
root_cell = openmc.Cell()
root_cell.region = ((+xplanes[0] & -xplanes[1]) &
(+yplanes[0] & -yplanes[1]) &

View file

@ -13,9 +13,9 @@ def model():
model.materials.append(mat)
cyl = openmc.XCylinder(r=1.0, boundary_type='vacuum')
x_plane_left = openmc.XPlane(-1.0, 'vacuum')
x_plane_left = openmc.XPlane(-1.0, boundary_type='vacuum')
x_plane_center = openmc.XPlane(1.0)
x_plane_right = openmc.XPlane(1.0e9, 'vacuum')
x_plane_right = openmc.XPlane(1.0e9, boundary_type='vacuum')
inner_cyl_left = openmc.Cell()
inner_cyl_right = openmc.Cell()

View file

@ -17,7 +17,7 @@ class ResonanceScatteringTestHarness(PyAPITestHarness):
mats_file.export_to_xml()
# Geometry
dumb_surface = openmc.XPlane(100, 'reflective')
dumb_surface = openmc.XPlane(100, boundary_type='reflective')
c1 = openmc.Cell(cell_id=1, fill=mat, region=-dumb_surface)
root_univ = openmc.Universe(universe_id=0, cells=[c1])
geometry = openmc.Geometry(root_univ)