[cig-commits] r12873 - in short/3D/PyLith/trunk/libsrc: faults meshio

knepley at geodynamics.org knepley at geodynamics.org
Fri Sep 12 17:22:06 PDT 2008


Author: knepley
Date: 2008-09-12 17:22:06 -0700 (Fri, 12 Sep 2008)
New Revision: 12873

Modified:
   short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
   short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.cc
Log:
Fixed fault input for new format


Modified: short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc	2008-09-12 20:14:20 UTC (rev 12872)
+++ short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc	2008-09-13 00:22:06 UTC (rev 12873)
@@ -556,7 +556,7 @@
     for(int i = 0; i < coneSize; ++i) faceSet.insert(faceCone[i]);
     selection::getOrientedFace(mesh, cell, &faceSet, numCorners, indices, &origVertices, &faceVertices);
     if (faceVertices.size() != coneSize) {
-      std::cout << "Invalid size for faceVertices " << faceVertices.size() << " should be " << coneSize << std::endl;
+      std::cout << "Invalid size for faceVertices " << faceVertices.size() << " of face " << face << "should be " << coneSize << std::endl;
       std::cout << "  firstCohesiveCell " << firstCohesiveCell << " newPoint " << newPoint << " numFaces " << faces->size() << std::endl;
       std::cout << "  faceSet:" << std::endl;
       for(std::set<Mesh::point_type>::const_iterator p_iter = faceSet.begin(); p_iter != faceSet.end(); ++p_iter) {
@@ -571,6 +571,14 @@
       for(int c = 0; c < coneSize2; ++c) {
         std::cout << "    " << cellCone[c] << std::endl;
       }
+      std::cout << "  fault cell support:" << std::endl;
+      ALE::ISieveVisitor::PointRetriever<sieve_type> sV(std::max(1, ifaultSieve->getMaxSupportSize()));
+      ifaultSieve->support(face, sV);
+      const int               supportSize2 = sV.getSize();
+      const Mesh::point_type *cellSupport  = sV.getPoints();
+      for(int s = 0; s < supportSize2; ++s) {
+        std::cout << "    " << cellSupport[s] << std::endl;
+      }
     }
     assert(faceVertices.size() == coneSize);
     faceSet.clear();

Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.cc	2008-09-12 20:14:20 UTC (rev 12872)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.cc	2008-09-13 00:22:06 UTC (rev 12873)
@@ -150,11 +150,12 @@
     // Section 9: <cell_id 1> <cell_data 1> ... <cell_data num_cdata> 
     faceCells.resize(numFCells*2);
     for(int c = 0; c < numFCells; ++c) {
-      int id, dummy;
+      int id, faultId;
 
       fin >> id;
       fin >> faceCells[c*2+0]; // Cell numbers in global mesh on either side of fault
       fin >> faceCells[c*2+1];
+      fin >> faultId;
     }
 
     // Determine the number of cells



More information about the cig-commits mailing list