From cb175981ce2e0f1ea0d7ce95fc0db31f85b982a2 Mon Sep 17 00:00:00 2001 From: Yeongdo Park Date: Mon, 25 Jan 2021 17:54:38 +0900 Subject: [PATCH] Read Velocity field. Removing debug messages. --- paraview-dns-data-reader.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/paraview-dns-data-reader.py b/paraview-dns-data-reader.py index edb809e..38f06d6 100644 --- a/paraview-dns-data-reader.py +++ b/paraview-dns-data-reader.py @@ -36,8 +36,6 @@ class PythonDnsDataReader(VTKPythonAlgorithmBase): executive = self.GetExecutive() outInfo = outInfoVec.GetInformationObject(0) - print("RequestInformation: ", self._filename) - filename = self._filename t, nx, ny, nz, U, V, W, Y0, Y1 = self._read_data(filename, True) @@ -57,8 +55,6 @@ class PythonDnsDataReader(VTKPythonAlgorithmBase): # Note, exceptions are totally fine! raise RuntimeError("No filename specified") - print(self._filename) - filename = self._filename t, nx, ny, nz, U, V, W, Y0, Y1 = self._read_data(filename) @@ -71,8 +67,10 @@ class PythonDnsDataReader(VTKPythonAlgorithmBase): assert y1.shape[0] == dims[0]*dims[1]*dims[2], "dimension mismatch" output.SetExtent(0, dims[0]-1, 0, dims[1]-1, 0, dims[2]-1) - output.PointData.append(y1, "scalars") - output.PointData.SetActiveScalars("scalars") + output.PointData.append(y1, "yr") + output.PointData.append(np.vstack((u,v,w)).T, "U") + + output.PointData.SetActiveScalars("yr") return 1