[MOAB-dev] r5214 - MOAB/trunk/src/io

tautges at mcs.anl.gov tautges at mcs.anl.gov
Mon Nov 14 18:22:59 CST 2011


Author: tautges
Date: 2011-11-14 18:22:59 -0600 (Mon, 14 Nov 2011)
New Revision: 5214

Modified:
   MOAB/trunk/src/io/ReadNC.cpp
   MOAB/trunk/src/io/ReadNC.hpp
Log:
Commit some work in progress (on reading HOMME data).



Modified: MOAB/trunk/src/io/ReadNC.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.cpp	2011-11-14 20:43:03 UTC (rev 5213)
+++ MOAB/trunk/src/io/ReadNC.cpp	2011-11-15 00:22:59 UTC (rev 5214)
@@ -33,7 +33,7 @@
           iDim(-1), jDim(-1), kDim(-1), tDim(-1), numUnLim(-1), mCurrentMeshHandle(0),
           startVertex(0), startElem(0), mGlobalIdTag(0), 
           max_line_length(-1), max_str_length(-1), vertexOffset(0), dbgOut(stderr),
-          isParallel(false), partMethod(-1)
+          isParallel(false), partMethod(-1), ucdMesh(false)
 #ifdef USE_MPI
         , myPcomm(NULL)
 #endif
@@ -70,6 +70,8 @@
   dbgOut = stderr;
   mCurrentMeshHandle = 0;
   vertexOffset = 0; 
+  ucdMesh = false;
+  
 #ifdef USE_MPI
   myPcomm = NULL;
 #endif
@@ -147,16 +149,27 @@
 
     // Get bounds on ijk space
   rval = init_ijkt_vals(opts, scdi);
+
+  if (MB_SUCCESS != rval) {
+      // try reading ucd format (HOMME) data
+    rval = init_ucd_mesh(opts);
+    if (MB_SUCCESS == rval) {
+      ucdMesh = true;
+    }
+  }
   ERRORR(rval, "Trouble initializing ijk values.");
 
-    // Create structured mesh vertex/hex sequences
+    // Create mesh vertex/hex sequences
   Range hexes;
   if (nomesh && !novars) {
     rval = check_verts_hexes(tmp_set);
     ERRORR(rval, "Mesh characteristics didn't match from last read.\n");
   }
   else if (!nomesh) {
-    rval = create_verts_hexes(scdi, tmp_set, hexes);
+    if (ucdMesh) 
+      rval = create_ucd_verts_hexes(opts, tmp_set, hexes);
+    else
+      rval = create_verts_hexes(scdi, tmp_set, hexes);
     ERRORR(rval, "Trouble creating vertices.");
   }


More information about the moab-dev mailing list