[cig-commits] r17157 - short/3D/PyLith/branches/v1.5-stable/pylith/utils

brad at geodynamics.org brad at geodynamics.org
Mon Aug 30 17:33:18 PDT 2010


Author: brad
Date: 2010-08-30 17:33:18 -0700 (Mon, 30 Aug 2010)
New Revision: 17157

Modified:
   short/3D/PyLith/branches/v1.5-stable/pylith/utils/VTKDataReader.py
Log:
Added missing cell types.

Modified: short/3D/PyLith/branches/v1.5-stable/pylith/utils/VTKDataReader.py
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/pylith/utils/VTKDataReader.py	2010-08-31 00:33:04 UTC (rev 17156)
+++ short/3D/PyLith/branches/v1.5-stable/pylith/utils/VTKDataReader.py	2010-08-31 00:33:18 UTC (rev 17157)
@@ -81,14 +81,28 @@
     cellId = cellTypes[0]
     if numpy.sum(cellTypes-cellId) != 0:
       raise ValueError("Expecting cells to all be the same type.")
-    if cellId == 5: # tri3
-      ncorners = 3
-    elif cellId == 12: # tri3
-      ncorners = 8
+    if cellId == 1: # vertex
+      ncorners = 1
     elif cellId == 3: # line2
       ncorners = 2
+    elif cellId == 5: # tri3
+      ncorners = 3
     elif cellId == 9: # quad4
       ncorners = 4
+    elif cellId == 10: # tet4
+      ncorners = 4
+    elif cellId == 12: # hex8
+      ncorners = 8
+    elif cellId == 21: # line3
+      ncorners = 3
+    elif cellId == 22: # tri6
+      ncorners = 6
+    elif cellId == 22: # quad9
+      ncorners = 9
+    elif cellId == 24: # tet10
+      ncorners = 10
+    elif cellId == 29: # hex27
+      ncorners = 27
     elif cellId == 255: # unknown?
       ncorners = 1
     else:



More information about the CIG-COMMITS mailing list