From e98526813691e527fff7d5df6a1641ae36c0cf4f Mon Sep 17 00:00:00 2001
From: Louis Gombert <louis.gombert@kitware.com>
Date: Mon, 27 Jan 2025 16:02:01 +0100
Subject: [PATCH] IOSS: Read all 2D vectors as 3D

3D vectors are much better handled by VTK and ParaView, especially for the glyph filter. Now, all 2D vector fields are read as 3D, with a null 3rd component. This behavior was already implemented in the legacy exodus reader.
---
 IO/IOSS/vtkIOSSUtilities.cxx | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/IO/IOSS/vtkIOSSUtilities.cxx b/IO/IOSS/vtkIOSSUtilities.cxx
index 71d9cfbe55c..f662a06ca69 100644
--- a/IO/IOSS/vtkIOSSUtilities.cxx
+++ b/IO/IOSS/vtkIOSSUtilities.cxx
@@ -302,10 +302,9 @@ vtkSmartPointer<vtkDataArray> GetData(const Ioss::GroupingEntity* entity,
   }
 
   // Check for Transient 2D data that should be 3D for WarpByVector/Glyphs
-  if (entity->type() == vtkioss_Ioss::NODEBLOCK &&
-    field.get_role() == vtkioss_Ioss::Field::RoleType::TRANSIENT && // Nodal / Elem Variables
-    entity->get_property("component_degree").get_int() == 2 &&      // dimension 2 mesh nodeblock
-    field.raw_storage()->component_count() == 2)                    // 2D Vector
+  bool isField2DTransientVector = field.get_role() == Ioss::Field::RoleType::TRANSIENT &&
+    field.raw_storage()->component_count() == 2;
+  if (isField2DTransientVector)
   {
     array = ChangeComponents(array, 3);
   }
-- 
GitLab