mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
[skip ci] refactore upperright and lowerleft
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
5180ab3f8a
commit
94ef0c40ab
1 changed files with 4 additions and 15 deletions
|
|
@ -714,21 +714,10 @@ class RegularMesh(StructuredMesh):
|
|||
the VTK object
|
||||
"""
|
||||
|
||||
x_vals = np.linspace(
|
||||
self.lower_left[0],
|
||||
self.upper_right[0],
|
||||
num=self.dimension[0] + 1,
|
||||
)
|
||||
y_vals = np.linspace(
|
||||
self.lower_left[1],
|
||||
self.upper_right[1],
|
||||
num=self.dimension[1] + 1,
|
||||
)
|
||||
z_vals = np.linspace(
|
||||
self.lower_left[2],
|
||||
self.upper_right[2],
|
||||
num=self.dimension[2] + 1,
|
||||
)
|
||||
ll, ur = self.lower_left, self.upper_right
|
||||
x_vals = np.linspace(ll[0], ur[0], num=self.dimension[0] + 1)
|
||||
y_vals = np.linspace(ll[1], ur[1], num=self.dimension[1] + 1)
|
||||
z_vals = np.linspace(ll[2], ur[2], num=self.dimension[2] + 1)
|
||||
|
||||
# create points
|
||||
pts_cartesian = np.array([[x, y, z] for z in z_vals for y in y_vals for x in x_vals])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue