diff --git a/openmc/mesh.py b/openmc/mesh.py index e0d8eb61b7..57fd8fb21d 100644 --- a/openmc/mesh.py +++ b/openmc/mesh.py @@ -1141,9 +1141,9 @@ class CylindricalMesh(StructuredMesh): def from_domain( cls, domain, - dimension=[100, 100, 100], + dimension=(100, 100, 100), mesh_id=None, - phi_grid=[0.0, 2*pi], + phi_grid=(0.0, 2*pi), name='' ): """Create mesh from an existing openmc cell, region, universe or @@ -1152,7 +1152,7 @@ class CylindricalMesh(StructuredMesh): Parameters ---------- - domain : {openmc.Cell, openmc.Region, openmc.Universe, openmc.Geometry} + domain : openmc.Cell or openmc.Region or openmc.Universe or openmc.Geometry The object passed in will be used as a template for this mesh. The bounding box of the property of the object passed will be used to set the r_grid, z_grid ranges. @@ -1163,7 +1163,7 @@ class CylindricalMesh(StructuredMesh): Unique identifier for the mesh phi_grid : numpy.ndarray 1-D array of mesh boundary points along the phi-axis in radians. - The default value is [0, 2π], i.e. the full phi range. + The default value is (0, 2π), i.e., the full phi range. name : str Name of the mesh diff --git a/tests/unit_tests/test_mesh_from_domain.py b/tests/unit_tests/test_mesh_from_domain.py index 64b9424b92..cbc32b8fa5 100644 --- a/tests/unit_tests/test_mesh_from_domain.py +++ b/tests/unit_tests/test_mesh_from_domain.py @@ -19,9 +19,9 @@ def test_reg_mesh_from_cell(): def test_cylindrical_mesh_from_cell(): """Tests a CylindricalMesh can be made from a Cell and the specified dimensions are propagated through. Cell is not centralized""" - cy_surface = openmc. openmc.ZCylinder(r=50) - z_surface_1 = openmc. openmc.ZPlane(z0=30) - z_surface_2 = openmc. openmc.ZPlane(z0=0) + cy_surface = openmc.ZCylinder(r=50) + z_surface_1 = openmc.ZPlane(z0=30) + z_surface_2 = openmc.ZPlane(z0=0) cell = openmc.Cell(region=-cy_surface & -z_surface_1 & +z_surface_2) mesh = openmc.CylindricalMesh.from_domain(cell, dimension=[2, 4, 3]) @@ -48,9 +48,9 @@ def test_reg_mesh_from_region(): def test_cylindrical_mesh_from_region(): """Tests a CylindricalMesh can be made from a Region and the specified dimensions are propagated through. Cell is centralized""" - cy_surface = openmc. openmc.ZCylinder(r=6) - z_surface_1 = openmc. openmc.ZPlane(z0=30) - z_surface_2 = openmc. openmc.ZPlane(z0=-30) + cy_surface = openmc.ZCylinder(r=6) + z_surface_1 = openmc.ZPlane(z0=30) + z_surface_2 = openmc.ZPlane(z0=-30) cell = openmc.Cell(region=-cy_surface & -z_surface_1 & +z_surface_2) mesh = openmc.CylindricalMesh.from_domain(cell, dimension=[6, 2, 3])