@@ -1188,7 +1188,8 @@ class CylindricalMesh(StructuredMesh):
11881188 1-D array of mesh boundary points along the r-axis.
11891189 Requirement is r >= 0.
11901190 z_grid : numpy.ndarray
1191- 1-D array of mesh boundary points along the z-axis.
1191+ 1-D array of mesh boundary points along the z-axis relative to the
1192+ origin.
11921193 phi_grid : numpy.ndarray
11931194 1-D array of mesh boundary points along the phi-axis in radians.
11941195 The default value is [0, 2π], i.e. the full phi range.
@@ -1207,8 +1208,7 @@ class CylindricalMesh(StructuredMesh):
12071208 name : str
12081209 Name of the mesh
12091210 dimension : Iterable of int
1210- The number of mesh cells in each direction (r_grid,
1211- phi_grid, z_grid).
1211+ The number of mesh cells in each direction (r_grid, phi_grid, z_grid).
12121212 n_dimension : int
12131213 Number of mesh dimensions (always 3 for a CylindricalMesh).
12141214 r_grid : numpy.ndarray
@@ -1218,7 +1218,8 @@ class CylindricalMesh(StructuredMesh):
12181218 1-D array of mesh boundary points along the phi-axis in radians.
12191219 The default value is [0, 2π], i.e. the full phi range.
12201220 z_grid : numpy.ndarray
1221- 1-D array of mesh boundary points along the z-axis.
1221+ 1-D array of mesh boundary points along the z-axis relative to the
1222+ origin.
12221223 origin : numpy.ndarray
12231224 1-D array of length 3 the (x,y,z) origin of the mesh in
12241225 cartesian coordinates
@@ -1314,7 +1315,6 @@ def indices(self):
13141315 for p in range (1 , np + 1 )
13151316 for r in range (1 , nr + 1 ))
13161317
1317-
13181318 @property
13191319 def lower_left (self ):
13201320 return np .array ((
@@ -1413,7 +1413,6 @@ def from_domain(
14131413 (openmc .Cell , openmc .Region , openmc .Universe , openmc .Geometry ),
14141414 )
14151415
1416-
14171416 # loaded once to avoid reading h5m file repeatedly
14181417 cached_bb = domain .bounding_box
14191418 max_bounding_box_radius = max (
@@ -1439,8 +1438,14 @@ def from_domain(
14391438 cached_bb [1 ][2 ],
14401439 num = dimension [2 ]+ 1
14411440 )
1441+ origin = cached_bb .center
14421442 mesh = cls (
1443- r_grid = r_grid , z_grid = z_grid , phi_grid = phi_grid , mesh_id = mesh_id , name = name
1443+ r_grid = r_grid ,
1444+ z_grid = z_grid ,
1445+ phi_grid = phi_grid ,
1446+ mesh_id = mesh_id ,
1447+ name = name ,
1448+ origin = origin
14441449 )
14451450
14461451 return mesh
0 commit comments