[cig-commits] r6493 - in short/3D/PyLith/trunk: libsrc/meshio unittests/pytests/meshio/data

brad at geodynamics.org brad at geodynamics.org
Sat Mar 31 15:19:13 PDT 2007


Author: brad
Date: 2007-03-31 15:19:13 -0700 (Sat, 31 Mar 2007)
New Revision: 6493

Modified:
   short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.cc
   short/3D/PyLith/trunk/unittests/pytests/meshio/data/mesh2Din3D.txt
Log:
Switch to allowing multi-word group names. Updated MeshIOAscii python test.

Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.cc	2007-03-31 21:58:14 UTC (rev 6492)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIOAscii.cc	2007-03-31 22:19:13 UTC (rev 6493)
@@ -410,7 +410,10 @@
   while (filein.good() && token != "}") {
     if (0 == strcasecmp(token.c_str(), "name")) {
       filein.ignore(maxIgnore, '=');
-      filein >> name;
+      filein >> std::ws;
+      char buffer[maxIgnore];
+      filein.get(buffer, maxIgnore, '\n');
+      name = buffer;
     } else if (0 == strcasecmp(token.c_str(), "type")) {
       std::string typeName;
       filein.ignore(maxIgnore, '=');

Modified: short/3D/PyLith/trunk/unittests/pytests/meshio/data/mesh2Din3D.txt
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/meshio/data/mesh2Din3D.txt	2007-03-31 21:58:14 UTC (rev 6492)
+++ short/3D/PyLith/trunk/unittests/pytests/meshio/data/mesh2Din3D.txt	2007-03-31 22:19:13 UTC (rev 6493)
@@ -31,16 +31,19 @@
     }
   }
   group = {
+    name = group A
     type = vertices
-    name = group A
     count = 4
     indices = {
-      1  3  5  7
+      1
+      3
+      5
+      7
     }
   }
   group = {
+    name = group B
     type = cells
-    name = group B
     count = 1
     indices = {
       1



More information about the cig-commits mailing list