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

knepley at geodynamics.org knepley at geodynamics.org
Wed Sep 3 06:06:56 PDT 2008


Author: knepley
Date: 2008-09-03 06:06:56 -0700 (Wed, 03 Sep 2008)
New Revision: 12788

Modified:
   short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
   short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc
   short/3D/PyLith/trunk/libsrc/meshio/MeshIO.hh
   short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.cc
Log:
Fixed numbering of fault cells, do not build fault coordinates


Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc	2008-09-03 00:44:11 UTC (rev 12787)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc	2008-09-03 13:06:56 UTC (rev 12788)
@@ -75,7 +75,6 @@
     // Get group of vertices associated with fault
     const ALE::Obj<int_section_type>& groupField = 
       mesh->getIntSection(label());
-    Obj<ALE::Mesh> faultBd = NULL;
 
     CohesiveTopology::create(faultMesh, faultBd, mesh, groupField, id(), _useLagrangeConstraints());
   } else {

Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc	2008-09-03 00:44:11 UTC (rev 12787)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc	2008-09-03 13:06:56 UTC (rev 12788)
@@ -203,6 +203,7 @@
 				   const int_array& cells,
 				   const int numCells,
 				   const int numCorners,
+                   const int firstCell,
 				   const int_array& faceCells,
                    const int meshDim,
                    const Obj<Mesh>& fault,
@@ -237,16 +238,18 @@
                                                   true,
                                                   numCorners,
                                                   0,
-                                                  fault->getArrowSection("orientation"));
+                                                  fault->getArrowSection("orientation"),
+                                                  firstCell);
 
       // Add in cells
       for(int c = 0; c < numCells; ++c) {
-        s->addArrow(c, faceCells[c*2+0]);
-        s->addArrow(c, faceCells[c*2+1]);
+        s->addArrow(c+firstCell, faceCells[c*2+0]);
+        s->addArrow(c+firstCell, faceCells[c*2+1]);
       }
 
       Mesh::renumbering_type& renumbering = fault->getRenumbering();
       ALE::ISieveConverter::convertSieve(*s, *sieve, renumbering, false);
+      ALE::ISieveConverter::convertOrientation(*s, *sieve, renumbering, fault->getArrowSection("orientation").ptr());
 
       Obj<ALE::Mesh> tmpMesh = new ALE::Mesh(fault->comm(), dim, fault->debug());
       faultBd = ALE::Selection<ALE::Mesh>::boundary(tmpMesh);
@@ -283,7 +286,7 @@
     << " bytes" << std::endl << std::endl;
 #endif
 
-  ALE::SieveBuilder<Mesh>::buildCoordinates(fault, spaceDim, &coordinates[0]);
+  //ALE::SieveBuilder<Mesh>::buildCoordinates(fault, spaceDim, &coordinates[0]);
 } // _buildFaultMesh
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIO.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIO.hh	2008-09-03 00:44:11 UTC (rev 12787)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIO.hh	2008-09-03 13:06:56 UTC (rev 12788)
@@ -126,6 +126,7 @@
                   const int_array& cells,
                   const int numCells,
                   const int numCorners,
+                  const int firstCell,
                   const int_array& faceCells,
                   const int meshDim,
                   const Obj<Mesh>& fault,

Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.cc	2008-09-03 00:44:11 UTC (rev 12787)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIOLagrit.cc	2008-09-03 13:06:56 UTC (rev 12788)
@@ -172,7 +172,8 @@
 	faceCells[c*2+i] -= 1;
   }
 
-  _buildFaultMesh(fCoordinates, numFVertices, fSpaceDim, fCells, numFCells, numFCorners, faceCells, faultDim, fault, faultBd);
+  const int firstFaultCell = mesh->getSieve()->getBaseSize() + mesh->getSieve()->getCapSize();
+  _buildFaultMesh(fCoordinates, numFVertices, fSpaceDim, fCells, numFCells, numFCorners, firstFaultCell, faceCells, faultDim, fault, faultBd);
 }
 
 // ----------------------------------------------------------------------



More information about the cig-commits mailing list