mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
renamed dounding_box to domain, review suggestion
This commit is contained in:
parent
1cfbd67659
commit
abc2c7cd7a
2 changed files with 13 additions and 13 deletions
|
|
@ -9,7 +9,7 @@ def test_mesh_from_cell():
|
|||
surface = openmc.Sphere(r=10, x0=2, y0=3, z0=5)
|
||||
cell = openmc.Cell(region=-surface)
|
||||
|
||||
mesh = openmc.RegularMesh.from_bounding_box(cell, dimension=[7, 11, 13])
|
||||
mesh = openmc.RegularMesh.from_domain(cell, dimension=[7, 11, 13])
|
||||
assert isinstance(mesh, openmc.RegularMesh)
|
||||
assert np.array_equal(mesh.dimension, (7, 11, 13))
|
||||
assert np.array_equal(mesh.lower_left, cell.bounding_box[0])
|
||||
|
|
@ -22,7 +22,7 @@ def test_mesh_from_region():
|
|||
surface = openmc.Sphere(r=1, x0=-5, y0=-3, z0=-2)
|
||||
region = -surface
|
||||
|
||||
mesh = openmc.RegularMesh.from_bounding_box(region)
|
||||
mesh = openmc.RegularMesh.from_domain(region)
|
||||
assert isinstance(mesh, openmc.RegularMesh)
|
||||
assert np.array_equal(mesh.dimension, (100, 100, 100)) # default values
|
||||
assert np.array_equal(mesh.lower_left, region.bounding_box[0])
|
||||
|
|
@ -36,7 +36,7 @@ def test_mesh_from_universe():
|
|||
cell = openmc.Cell(region=-surface)
|
||||
universe = openmc.Universe(cells=[cell])
|
||||
|
||||
mesh = openmc.RegularMesh.from_bounding_box(universe)
|
||||
mesh = openmc.RegularMesh.from_domain(universe)
|
||||
assert isinstance(mesh, openmc.RegularMesh)
|
||||
assert np.array_equal(mesh.dimension, (100, 100, 100)) # default values
|
||||
assert np.array_equal(mesh.lower_left, universe.bounding_box[0])
|
||||
|
|
@ -51,7 +51,7 @@ def test_mesh_from_geometry():
|
|||
universe = openmc.Universe(cells=[cell])
|
||||
geometry = openmc.Geometry(universe)
|
||||
|
||||
mesh = openmc.RegularMesh.from_bounding_box(geometry)
|
||||
mesh = openmc.RegularMesh.from_domain(geometry)
|
||||
assert isinstance(mesh, openmc.RegularMesh)
|
||||
assert np.array_equal(mesh.dimension, (100, 100, 100)) # default values
|
||||
assert np.array_equal(mesh.lower_left, geometry.bounding_box[0])
|
||||
|
|
@ -60,4 +60,4 @@ def test_mesh_from_geometry():
|
|||
|
||||
def test_error_from_unsupported_object():
|
||||
with pytest.raises(TypeError):
|
||||
openmc.RegularMesh.from_bounding_box("vacuum energy")
|
||||
openmc.RegularMesh.from_domain("vacuum energy")
|
||||
Loading…
Add table
Add a link
Reference in a new issue