From 308be3f1eac95143eec2f3f40c36adb6dfa351c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Delaporte-Mathurin?= <40028739+RemDelaporteMathurin@users.noreply.github.com> Date: Mon, 27 Feb 2023 16:23:45 -0500 Subject: [PATCH] Update openmc/mesh.py Co-authored-by: Ethan Peterson --- openmc/mesh.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/openmc/mesh.py b/openmc/mesh.py index a7c2eb1729..039f302e92 100644 --- a/openmc/mesh.py +++ b/openmc/mesh.py @@ -1334,14 +1334,10 @@ class CylindricalMesh(StructuredMesh): ) pts_cartesian = np.empty_like(pts_cylindrical) r, phi = pts_cylindrical[:, 0], pts_cylindrical[:, 1] - pts_cartesian[:, 0] = r * np.cos(phi) - pts_cartesian[:, 1] = r * np.sin(phi) - - # offset with origin - pts_cartesian[:, 0] += pts_cartesian[:, 0] - pts_cartesian[:, 1] += pts_cartesian[:, 1] - pts_cartesian[:, 2] += pts_cartesian[:, 2] - + pts_cartesian[:, 0] = r * np.cos(phi) + self.origin[0] + pts_cartesian[:, 1] = r * np.sin(phi) + self.origin[1] + pts_cartesian[:, 2] += self.origin[2] + return super().write_data_to_vtk( points=pts_cartesian, filename=filename,