[skip ci] refactore upperright and lowerleft

Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Rémi Delaporte-Mathurin 2022-06-29 18:47:24 +02:00 committed by GitHub
parent 5180ab3f8a
commit 94ef0c40ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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])