[cig-commits] r21485 - in short/3D/PyLith/trunk: libsrc/pylith/bc libsrc/pylith/faults libsrc/pylith/feassemble libsrc/pylith/materials libsrc/pylith/problems unittests/libtests/faults unittests/libtests/faults/data unittests/libtests/feassemble

knepley at geodynamics.org knepley at geodynamics.org
Sun Mar 10 13:35:51 PDT 2013


Author: knepley
Date: 2013-03-10 13:35:51 -0700 (Sun, 10 Mar 2013)
New Revision: 21485

Modified:
   short/3D/PyLith/trunk/libsrc/pylith/bc/AbsorbingDampers.cc
   short/3D/PyLith/trunk/libsrc/pylith/bc/Neumann.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/CohesiveTopology.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/CohesiveTopology.hh
   short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesive.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveDyn.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveTract.cc
   short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicit.cc
   short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicitLgDeform.cc
   short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicitTet4.cc
   short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicitTri3.cc
   short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityImplicit.cc
   short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityImplicitLgDeform.cc
   short/3D/PyLith/trunk/libsrc/pylith/feassemble/IntegratorElasticity.cc
   short/3D/PyLith/trunk/libsrc/pylith/feassemble/IntegratorElasticityLgDeform.cc
   short/3D/PyLith/trunk/libsrc/pylith/feassemble/Quadrature.cc
   short/3D/PyLith/trunk/libsrc/pylith/materials/ElasticMaterial.cc
   short/3D/PyLith/trunk/libsrc/pylith/materials/Material.cc
   short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestConstRateSlipFn.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestEqKinSrc.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestLiuCosSlipFn.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestStepSlipFn.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestTimeHistorySlipFn.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestTractPerturbation.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8Lagrange.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8b.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8c.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8d.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8e.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8f.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8g.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8h.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8i.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2Lagrange.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4Lagrange.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4b.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4c.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4d.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4e.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4f.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4g.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4h.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4Lagrange.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4b.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4c.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4d.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4f.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4g.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4h.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4i.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4j.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3Lagrange.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3b.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3c.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3d.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3e.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3f.cc
   short/3D/PyLith/trunk/unittests/libtests/feassemble/TestQuadrature.cc
Log:
Changed interface to CohesiveTopology::create() to take DMLabel, Changed DMPlexVecGetClosure() to take non-const argument

Modified: short/3D/PyLith/trunk/libsrc/pylith/bc/AbsorbingDampers.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/bc/AbsorbingDampers.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/bc/AbsorbingDampers.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -157,7 +157,7 @@
   PetscScalar* dampingConstsArray = dampingConsts.getLocalArray();
   for(PetscInt c = cStart; c < cEnd; ++c) {
     // Compute geometry information for current cell
-    const PetscScalar *coords;
+    PetscScalar *coords;
     PetscInt coordsSize;
     err = DMPlexVecGetClosure(subMesh, coordSection, coordVec, c, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for (PetscInt i=0; i < coordsSize; ++i) {
@@ -301,7 +301,7 @@
 #if defined(PRECOMPUTE_GEOMETRY)
 #error("Code for PRECOMPUTE_GEOMETRY not implemented.")
 #else
-    const PetscScalar *coordsArray;
+    PetscScalar *coordsArray;
     PetscInt coordsSize;
     err = DMPlexVecGetClosure(subMesh, coordSection, coordVec, c, &coordsSize, &coordsArray);CHECK_PETSC_ERROR(err);
     for (PetscInt i=0; i < coordsSize; ++i) {
@@ -320,7 +320,7 @@
     _resetCellVector();
 
     // Restrict input fields to cell
-    const PetscScalar *velArray = NULL;
+    PetscScalar *velArray = NULL;
     PetscInt velSize;
     err = DMPlexVecGetClosure(subMesh, velSubsection, velVec, c, &velSize, &velArray);CHECK_PETSC_ERROR(err);
     assert(velSize == numBasis*spaceDim);
@@ -453,7 +453,7 @@
 #if defined(PRECOMPUTE_GEOMETRY)
 #error("Code for PRECOMPUTE_GEOMETRY not implemented.")
 #else
-    const PetscScalar *coordsArray;
+    PetscScalar *coordsArray;
     PetscInt coordsSize;
     err = DMPlexVecGetClosure(subMesh, coordSection, coordVec, c, &coordsSize, &coordsArray);CHECK_PETSC_ERROR(err);
     for (PetscInt i=0; i < coordsSize; ++i) {
@@ -472,7 +472,7 @@
     _resetCellVector();
 
     // Restrict input fields to cell
-    const PetscScalar *velArray = NULL;
+    PetscScalar *velArray = NULL;
     PetscInt velSize;
     err = DMPlexVecGetClosure(subMesh, velSubsection, velVec, c, &velSize, &velArray);CHECK_PETSC_ERROR(err);
     assert(velSize == numBasis*spaceDim);
@@ -613,7 +613,7 @@
 #if defined(PRECOMPUTE_GEOMETRY)
 #error("Code for PRECOMPUTE_GEOMETRY not implemented")
 #else
-    const PetscScalar *coordsArray;
+    PetscScalar *coordsArray;
     PetscInt coordsSize;
     err = DMPlexVecGetClosure(subMesh, coordSection, coordVec, c, &coordsSize, &coordsArray);CHECK_PETSC_ERROR(err);
     for (PetscInt i = 0; i < coordsSize; ++i) {
@@ -763,7 +763,7 @@
 #if defined(PRECOMPUTE_GEOMETRY)
 #error("Code for PRECOMPUTE_GEOMETRY not implemented");
 #else
-    const PetscScalar *coordsArray;
+    PetscScalar *coordsArray;
     PetscInt coordsSize;
     err = DMPlexVecGetClosure(subMesh, coordSection, coordVec, c, &coordsSize, &coordsArray);CHECK_PETSC_ERROR(err);
     for (PetscInt i = 0; i < coordsSize; ++i) {

Modified: short/3D/PyLith/trunk/libsrc/pylith/bc/Neumann.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/bc/Neumann.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/bc/Neumann.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -130,7 +130,7 @@
 #if defined(PRECOMPUTE_GEOMETRY)
 #error("Code for PRECOMPUTE_GEOMETRY not implemented.")
 #else
-    const PetscScalar *coords;
+    PetscScalar *coords;
     PetscInt coordsSize;
     err = DMPlexVecGetClosure(subMesh, coordSection, coordVec, c, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for (PetscInt i=0; i < coordsSize; ++i) {
@@ -435,7 +435,7 @@
 #if defined(PRECOMPUTE_GEOMETRY)
 #error("Code for PRECOMPUTE_GEOMETRY not implemented.")
 #else
-    const PetscScalar *coords;
+    PetscScalar *coords;
     PetscInt coordsSize;
     err = DMPlexVecGetClosure(subMesh, coordSection, coordVec, c, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for (PetscInt i = 0; i < coordsSize; ++i) {
@@ -542,7 +542,7 @@
 #if defined(PRECOMPUTE_GEOMETRY)
 #error("Code for PRECOMPUTE_GEOMETRY not implemented.")
 #else
-    const PetscScalar *coords;
+    PetscScalar *coords;
     PetscInt coordsSize;
     err = DMPlexVecGetClosure(subMesh, coordSection, coordVec, c, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for (PetscInt i=0; i < coordsSize; ++i) {

Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/CohesiveTopology.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/CohesiveTopology.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/CohesiveTopology.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -202,7 +202,7 @@
 pylith::faults::CohesiveTopology::create(topology::Mesh* mesh,
                                          const topology::SubMesh& faultMesh,
                                          const ALE::Obj<SieveFlexMesh>& faultBoundary,
-                                         const ALE::Obj<topology::Mesh::IntSection>& groupField,
+                                         DMLabel groupField,
                                          const int materialId,
                                          int& firstFaultVertex,
                                          int& firstLagrangeVertex,
@@ -211,12 +211,14 @@
 { // create
   assert(0 != mesh);
   assert(!faultBoundary.isNull());
-  assert(!groupField.isNull());
+  assert(groupField);
 
   typedef ALE::SieveAlg<SieveFlexMesh> sieveAlg;
   typedef ALE::Selection<SieveFlexMesh> selection;
+  const char    *groupName;
   PetscErrorCode err;
 
+  err = DMLabelGetName(groupField, &groupName);CHECK_PETSC_ERROR(err);
   // Memory logging
   ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
   logger.stagePush("SerialFaultCreation");
@@ -283,13 +285,20 @@
   const ALE::Obj<SieveMesh::label_sequence>&         vertices       = sieveMesh->depthStratum(0);
   assert(!vertices.isNull());
 #ifdef USE_DMCOMPLEX_ON
-  PetscInt vStart, vEnd;
+  IS              fVertexIS;
+  const PetscInt *fVerticesDM;
+  PetscInt        numFaultVerticesDM, vStart, vEnd;
+
+  err = DMLabelGetStratumIS(groupField, 1, &fVertexIS);CHECK_PETSC_ERROR(err);
+  err = ISGetLocalSize(fVertexIS, &numFaultVerticesDM);CHECK_PETSC_ERROR(err);
+  err = ISGetIndices(fVertexIS, &fVerticesDM);CHECK_PETSC_ERROR(err);
   err = DMPlexGetDepthStratum(complexMesh, 0, &vStart, &vEnd);CHECK_PETSC_ERROR(err);
   assert(vertices->size() == vEnd - vStart);
 #endif
   const ALE::Obj<std::set<std::string> >& groupNames = sieveMesh->getIntSections();
   assert(!groupNames.isNull());
   const int numFaultVertices = fVertices->size();
+  assert(numFaultVertices == numFaultVerticesDM);
   std::map<point_type,point_type> vertexRenumber;
   std::map<point_type,point_type> vertexLagrangeRenumber;
   std::map<point_type,point_type> cellRenumber;
@@ -408,17 +417,48 @@
 #endif
 
   // Add fault vertices to groups and construct renumberings
-  for(SieveSubMesh::label_sequence::iterator v_iter = fVerticesBegin; v_iter != fVerticesEnd; ++v_iter, ++firstFaultVertex, ++firstFaultVertexDM) {
+  PetscInt    numLabels;
+  std::string skipA = "depth";
+  std::string skipB = "material-id";
+
+  err = DMPlexGetNumLabels(complexMesh, &numLabels);CHECK_PETSC_ERROR(err);
+  for (PetscInt fv = 0; fv < numFaultVerticesDM; ++fv, ++firstFaultVertexDM) {
+    const PetscInt v    = fVerticesDM[fv];
+    const PetscInt vnew = v+extraCells;
+
+    vertexRenumberDM[vnew] = firstFaultVertexDM;
+    err = DMPlexSetLabelValue(newMesh, groupName, firstFaultVertexDM, 1);CHECK_PETSC_ERROR(err);
+    if (constraintCell) {
+      vertexLagrangeRenumberDM[vnew] = firstLagrangeVertexDM;
+      err = DMPlexSetLabelValue(newMesh, groupName, firstLagrangeVertexDM, 1);CHECK_PETSC_ERROR(err);
+      ++firstLagrangeVertexDM;
+    } // if
+
+    // Add shadow vertices to other groups, don't add constraint
+    // vertices (if they exist) because we don't want BC, etc to act
+    // on constraint vertices
+    for (PetscInt l = 0; l < numLabels; ++l) {
+      const char *name;
+      PetscInt    value;
+
+      err = DMPlexGetLabelName(complexMesh, l, &name);CHECK_PETSC_ERROR(err);
+      if (std::string(name) == skipA) continue;
+      if (std::string(name) == skipB) continue;
+
+      err = DMPlexGetLabelValue(newMesh, name, vnew, &value);CHECK_PETSC_ERROR(err);
+      if (value != -1) {
+        err = DMPlexSetLabelValue(newMesh, name, vertexRenumberDM[vnew], value);CHECK_PETSC_ERROR(err);
+      }
+    }
+  } // for
+  for (SieveSubMesh::label_sequence::iterator v_iter = fVerticesBegin; v_iter != fVerticesEnd; ++v_iter, ++firstFaultVertex) {
     vertexRenumber[*v_iter] = firstFaultVertex;
-    vertexRenumberDM[*v_iter+faultVertexOffsetDM] = firstFaultVertexDM;
     if (debug) std::cout << "Duplicating " << *v_iter << " to "	<< vertexRenumber[*v_iter] << std::endl;
 
     logger.stagePop();
     logger.stagePush("SerialFaultStratification");
     // Add shadow and constraint vertices (if they exist) to group
     // associated with fault
-    groupField->addPoint(firstFaultVertex, 1);
-    err = DMPlexSetLabelValue(newMesh, groupField->getName().c_str(), firstFaultVertexDM, 1);CHECK_PETSC_ERROR(err);
 #if defined(FAST_STRATIFY)
     // OPTIMIZATION
     sieveMesh->setHeight(firstFaultVertex, 1);
@@ -426,16 +466,12 @@
 #endif
     if (constraintCell) {
       vertexLagrangeRenumber[*v_iter] = firstLagrangeVertex;
-      vertexLagrangeRenumberDM[*v_iter+faultVertexOffsetDM] = firstLagrangeVertexDM;
-      groupField->addPoint(firstLagrangeVertex, 1);
-      err = DMPlexSetLabelValue(newMesh, groupField->getName().c_str(), firstLagrangeVertexDM, 1);CHECK_PETSC_ERROR(err);
 #if defined(FAST_STRATIFY)
       // OPTIMIZATION
       sieveMesh->setHeight(firstLagrangeVertex, 1);
       sieveMesh->setDepth(firstLagrangeVertex, 0);
 #endif
       ++firstLagrangeVertex;
-      ++firstLagrangeVertexDM;
     } // if
     logger.stagePop();
     logger.stagePush("SerialFaultCreation");
@@ -449,14 +485,6 @@
       assert(!group.isNull());
       if (group->getFiberDimension(*v_iter))
         group->addPoint(firstFaultVertex, 1);
-
-      PetscInt vertexDM = *v_iter+faultVertexOffsetDM;
-      PetscInt value;
-      //assert(extraCells == faultVertexOffsetDM);
-      err = DMPlexGetLabelValue(complexMesh, (*name).c_str(), vertexDM, &value);CHECK_PETSC_ERROR(err);
-      if (value != -1) {
-        err = DMPlexSetLabelValue(newMesh, (*name).c_str(), vertexRenumberDM[vertexDM], value);CHECK_PETSC_ERROR(err);
-      }
     } // for
   } // for
   logger.stagePop();
@@ -479,6 +507,7 @@
   TopologyOps::PointSet replaceCells;
   TopologyOps::PointSet noReplaceCells;
   TopologyOps::PointSet replaceVertices;
+  TopologyOps::PointSet replaceVerticesDM;
   ALE::ISieveVisitor::PointRetriever<SieveMesh::sieve_type> sV2(std::max(1, ifaultSieve->getMaxSupportSize()));
   ALE::ISieveVisitor::NConeRetriever<SieveMesh::sieve_type> cV2(*ifaultSieve, (size_t) pow(std::max(1, ifaultSieve->getMaxConeSize()), faultSieveMesh->depth()));
   std::set<SieveFlexMesh::point_type> faceSet;
@@ -592,6 +621,7 @@
     noReplaceCells.insert(otherCell);
     replaceCells.insert(cell);
     replaceVertices.insert(faceCone, &faceCone[coneSize]);
+    replaceVerticesDM.insert(faceConeDM, &faceConeDM[coneSize]);
     cellRenumber[cell]   = firstFaultCell;
     cellRenumberDM[cell] = firstFaultCellDM;
     // Adding cohesive cell (not interpolated)
@@ -605,13 +635,13 @@
     for (int c = 0; c < coneSize; ++c) {
       if (debug) std::cout << "    shadow vertex " << vertexRenumber[faceCone[c]] << std::endl;
       sieve->addArrow(vertexRenumber[faceCone[c]], firstFaultCell, true);
-      cohesiveCone[newv++] = vertexRenumberDM[faceConeDM[c]];
+      cohesiveCone[newv++] = vertexRenumberDM[faceConeDM[c] + extraCells];
     } // for
     if (constraintCell) {
       for (int c = 0; c < coneSize; ++c) {
         if (debug) std::cout << "    Lagrange vertex " << vertexLagrangeRenumber[faceCone[c]] << std::endl;
         sieve->addArrow(vertexLagrangeRenumber[faceCone[c]], firstFaultCell, true);
-        cohesiveCone[newv++] = vertexLagrangeRenumberDM[faceConeDM[c]];
+        cohesiveCone[newv++] = vertexLagrangeRenumberDM[faceConeDM[c] + extraCells];
       } // for
     } // if
 #ifdef USE_DMCOMPLEX_ON
@@ -672,6 +702,7 @@
     sV.clear();
   }
 #ifdef USE_DMCOMPLEX_ON
+  TopologyOps::PointSet::const_iterator rVerticesDMEnd = replaceVerticesDM.end();
   for(PetscInt cell = cStart; cell < cEnd; ++cell) {
     const PetscInt *cone;
     PetscInt        coneSize;
@@ -682,9 +713,9 @@
       for(PetscInt c = 0; c < coneSize; ++c) {
         PetscBool replaced = PETSC_FALSE;
 
-        for(TopologyOps::PointSet::const_iterator v_iter = replaceVertices.begin(); v_iter != rVerticesEnd; ++v_iter) {
+        for(TopologyOps::PointSet::const_iterator v_iter = replaceVerticesDM.begin(); v_iter != rVerticesDMEnd; ++v_iter) {
           if (cone[c] == *v_iter) {
-            cohesiveCone[c] = vertexRenumberDM[cone[c]];
+            cohesiveCone[c] = vertexRenumberDM[cone[c] + extraCells];
             replaced        = PETSC_TRUE;
             break;
           }
@@ -852,7 +883,6 @@
   PetscScalar *coords, *newCoords;
   PetscInt     coordSize;
  
-#ifdef USE_DMCOMPLEX_ON
   err = DMPlexGetCoordinateSection(complexMesh, &coordSection);CHECK_PETSC_ERROR(err);
   err = DMPlexGetCoordinateSection(newMesh,     &newCoordSection);CHECK_PETSC_ERROR(err);
   err = DMGetCoordinatesLocal(complexMesh, &coordinatesVec);CHECK_PETSC_ERROR(err);
@@ -862,21 +892,23 @@
     err = PetscSectionGetDof(coordSection, v, &dof);CHECK_PETSC_ERROR(err);
     err = PetscSectionSetDof(newCoordSection, v+extraCells, dof);CHECK_PETSC_ERROR(err);
   }
-#endif
 
   if (debug) coordinates->view("Coordinates without shadow vertices");
+  for (PetscInt fv = 0; fv < numFaultVerticesDM; ++fv) {
+    PetscInt v    = fVerticesDM[fv];
+    PetscInt vnew = v+extraCells;
+    PetscInt dof;
+
+    err = PetscSectionGetDof(coordSection, v, &dof);CHECK_PETSC_ERROR(err);
+    err = PetscSectionSetDof(newCoordSection, vertexRenumberDM[vnew], dof);CHECK_PETSC_ERROR(err);
+    if (constraintCell) {err = PetscSectionSetDof(newCoordSection, vertexLagrangeRenumberDM[vnew], dof);CHECK_PETSC_ERROR(err);}
+  } // for
   for (SieveSubMesh::label_sequence::iterator v_iter = fVertices2Begin; v_iter != fVertices2End; ++v_iter) {
     coordinates->addPoint(vertexRenumber[*v_iter], coordinates->getFiberDimension(*v_iter));
     if (constraintCell) coordinates->addPoint(vertexLagrangeRenumber[*v_iter], coordinates->getFiberDimension(*v_iter));
-#ifdef USE_DMCOMPLEX_ON
-    PetscInt dof, v = *v_iter;
-    err = PetscSectionGetDof(coordSection, v, &dof);CHECK_PETSC_ERROR(err);
-    err = PetscSectionSetDof(newCoordSection, vertexRenumberDM[v+faultVertexOffsetDM], dof);CHECK_PETSC_ERROR(err);
-    if (constraintCell) {err = PetscSectionSetDof(newCoordSection, vertexLagrangeRenumberDM[v+faultVertexOffsetDM], dof);CHECK_PETSC_ERROR(err);}
-#endif
   } // for
   sieveMesh->reallocate(coordinates);
-#ifdef USE_DMCOMPLEX_ON
+
   err = PetscSectionSetUp(newCoordSection);CHECK_PETSC_ERROR(err);
   err = PetscSectionGetStorageSize(newCoordSection, &coordSize);CHECK_PETSC_ERROR(err);
   err = VecCreate(mesh->comm(), &newCoordinatesVec);CHECK_PETSC_ERROR(err);
@@ -886,15 +918,16 @@
   err = VecGetArray(newCoordinatesVec, &newCoords);CHECK_PETSC_ERROR(err);
 
   for(PetscInt v = vStart; v < vEnd; ++v) {
+    PetscInt vnew = v+extraCells;
     PetscInt dof, off, newoff, d;
+
     err = PetscSectionGetDof(coordSection, v, &dof);CHECK_PETSC_ERROR(err);
     err = PetscSectionGetOffset(coordSection, v, &off);CHECK_PETSC_ERROR(err);
-    err = PetscSectionGetOffset(newCoordSection, v+extraCells, &newoff);CHECK_PETSC_ERROR(err);
+    err = PetscSectionGetOffset(newCoordSection, vnew, &newoff);CHECK_PETSC_ERROR(err);
     for(PetscInt d = 0; d < dof; ++d) {
       newCoords[newoff+d] = coords[off+d];
     }
   }
-#endif
   SieveSubMesh::label_sequence::const_iterator fVertices2EndNew = fVertices2->end();
   for (SieveSubMesh::label_sequence::iterator v_iter = fVertices2Begin; v_iter != fVertices2EndNew; ++v_iter) {
     assert(coordinates->getFiberDimension(*v_iter) == coordinates->getFiberDimension(vertexRenumber[*v_iter]));
@@ -903,22 +936,24 @@
       assert(coordinates->getFiberDimension(*v_iter) == coordinates->getFiberDimension(vertexLagrangeRenumber[*v_iter]));
       coordinates->updatePoint(vertexLagrangeRenumber[*v_iter], coordinates->restrictPoint(*v_iter));
     } // if
+  } // for
+  for (PetscInt fv = 0; fv < numFaultVerticesDM; ++fv) {
+    PetscInt v    = fVerticesDM[fv];
+    PetscInt vnew = v+extraCells;
+    PetscInt dof, off, newoff, d;
 
-#ifdef USE_DMCOMPLEX_ON
-    PetscInt v = *v_iter, dof, off, newoff, d;
     err = PetscSectionGetDof(coordSection, v, &dof);CHECK_PETSC_ERROR(err);
     err = PetscSectionGetOffset(coordSection, v, &off);CHECK_PETSC_ERROR(err);
-    err = PetscSectionGetOffset(newCoordSection, vertexRenumberDM[v+faultVertexOffsetDM], &newoff);CHECK_PETSC_ERROR(err);
+    err = PetscSectionGetOffset(newCoordSection, vertexRenumberDM[vnew], &newoff);CHECK_PETSC_ERROR(err);
     for(PetscInt d = 0; d < dof; ++d) {
       newCoords[newoff+d] = coords[off+d];
     }
     if (constraintCell) {
-      err = PetscSectionGetOffset(newCoordSection, vertexLagrangeRenumberDM[v+faultVertexOffsetDM], &newoff);CHECK_PETSC_ERROR(err);
+      err = PetscSectionGetOffset(newCoordSection, vertexLagrangeRenumberDM[vnew], &newoff);CHECK_PETSC_ERROR(err);
       for(PetscInt d = 0; d < dof; ++d) {
         newCoords[newoff+d] = coords[off+d];
       }
     } // if
-#endif
   } // for
   err = VecRestoreArray(coordinatesVec, &coords);CHECK_PETSC_ERROR(err);
   err = VecRestoreArray(newCoordinatesVec, &newCoords);CHECK_PETSC_ERROR(err);
@@ -926,6 +961,8 @@
   err = VecDestroy(&newCoordinatesVec);CHECK_PETSC_ERROR(err);
   if (debug) coordinates->view("Coordinates with shadow vertices");
 
+  err = ISRestoreIndices(fVertexIS, &fVerticesDM);CHECK_PETSC_ERROR(err);
+  err = ISDestroy(&fVertexIS);CHECK_PETSC_ERROR(err);
   logger.stagePop();
 
   mesh->setDMMesh(newMesh);

Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/CohesiveTopology.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/CohesiveTopology.hh	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/CohesiveTopology.hh	2013-03-10 20:35:51 UTC (rev 21485)
@@ -76,7 +76,7 @@
   void create(topology::Mesh* mesh,
 	      const topology::SubMesh& faultMesh,
               const ALE::Obj<SieveFlexMesh>& faultBoundary,
-              const ALE::Obj<topology::Mesh::IntSection>& groupField,
+              DMLabel groupField,
               const int materialId,
               int& firstFaultVertex,
               int& firstLagrangeVertex,

Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesive.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesive.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesive.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -69,24 +69,24 @@
 int
 pylith::faults::FaultCohesive::numVerticesNoMesh(const topology::Mesh& mesh) const
 { // numVerticesNoMesh
-  int nvertices = 0;
+  PetscInt nvertices = 0;
 
-  assert(false); // :TODO: Update this for DM mesh
   if (!_useFaultMesh) {
     // Get group of vertices associated with fault
-    const ALE::Obj<topology::Mesh::SieveMesh>& sieveMesh = mesh.sieveMesh();
-    assert(!sieveMesh.isNull());
-    if (!sieveMesh->hasIntSection(label())) {
+    DM             dmMesh = mesh.dmMesh();
+    PetscBool      has;
+    PetscErrorCode err;
+
+    assert(dmMesh);
+    assert(std::string("") != label());
+    err = DMPlexHasLabel(dmMesh, label(), &has);CHECK_PETSC_ERROR(err);
+    if (!has) {
       std::ostringstream msg;
       msg << "Mesh missing group of vertices '" << label()
           << "' for fault interface condition.";
       throw std::runtime_error(msg.str());
     } // if  
-
-    assert(std::string("") != label());
-    const ALE::Obj<topology::Mesh::IntSection>& groupField = 
-      mesh.sieveMesh()->getIntSection(label());
-    nvertices = groupField->size();
+    err = DMPlexGetStratumSize(dmMesh, label(), 1, &nvertices);CHECK_PETSC_ERROR(err);
   } else {
     assert(3 == mesh.dimension());
     nvertices = -1;
@@ -130,10 +130,7 @@
       CohesiveTopology::createFault(&faultMesh, faultBoundary, *mesh, groupField, 
                                     flipFault);
       
-      const ALE::Obj<topology::Mesh::IntSection>& oldGroupField = 
-        mesh->sieveMesh()->getIntSection(label());
-      assert(!oldGroupField.isNull());
-      CohesiveTopology::create(mesh, faultMesh, faultBoundary, oldGroupField, id(), 
+      CohesiveTopology::create(mesh, faultMesh, faultBoundary, groupField, id(), 
                                *firstFaultVertex, *firstLagrangeVertex, *firstFaultCell, useLagrangeConstraints());
       
     } else {

Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveDyn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveDyn.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveDyn.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -2087,7 +2087,7 @@
   // Loop over cells
   for(PetscInt c = cStart; c < cEnd; ++c) {
     // Compute geometry
-    const PetscScalar *coords = NULL;
+    PetscScalar *coords = NULL;
     PetscInt coordsSize;
     err = DMPlexVecGetClosure(faultDMMesh, coordSection, coordVec, c, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
@@ -2095,7 +2095,7 @@
     err = DMPlexVecRestoreClosure(faultDMMesh, coordSection, coordVec, c, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
 
     // Restrict input fields to cell
-    const PetscScalar *dLagrangeArray = NULL;
+    PetscScalar *dLagrangeArray = NULL;
     PetscInt dLagrangeSize;
     err = DMPlexVecGetClosure(faultDMMesh, dLagrangeSection, dLagrangeVec, c, &dLagrangeSize, &dLagrangeArray);CHECK_PETSC_ERROR(err);
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -1412,11 +1412,11 @@
 
   err = VecGetArray(orientationVec, &orientationArray);CHECK_PETSC_ERROR(err);
   for(PetscInt c = cStart; c < cEnd; ++c) {
-    PetscInt          *closure = PETSC_NULL;
-    PetscInt           closureSize, q = 0;
-    const PetscScalar *coords = PETSC_NULL;
-    PetscInt           coordsSize;
-    scalar_array       coordinatesCell(numBasis * spaceDim);
+    PetscInt    *closure = PETSC_NULL;
+    PetscInt     closureSize, q = 0;
+    PetscScalar *coords = PETSC_NULL;
+    PetscInt     coordsSize;
+    scalar_array coordinatesCell(numBasis * spaceDim);
 
     // Get orientations at fault cell's vertices.
     err = DMPlexVecGetClosure(faultDMMesh, coordSection, coordVec, c, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
@@ -1692,8 +1692,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     _quadrature->retrieveGeometry(c);
 #else
-    const PetscScalar *coords = PETSC_NULL;
-    PetscInt           coordsSize;
+    PetscScalar *coords = PETSC_NULL;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(faultDMMesh, coordSection, coordVec, c, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     _quadrature->computeGeometry(coordinatesCell, c);

Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveTract.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveTract.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveTract.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -245,8 +245,8 @@
   // Loop over cells in fault mesh and compute orientations.
   err = VecGetArray(orientationVec, &orientationArray);CHECK_PETSC_ERROR(err);
   for(PetscInt c = cStart; c < cEnd; ++c) {
-    const PetscScalar *coords = PETSC_NULL;
-    PetscInt           coordsSize;
+    PetscScalar *coords = PETSC_NULL;
+    PetscInt     coordsSize;
 
     err = DMPlexVecGetClosure(faultDMMesh, coordSection, coordVec, c, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
@@ -373,8 +373,8 @@
     // Loop over cells in boundary mesh and perform queries.
     err = VecGetArray(tractionVec, &tractionArray);CHECK_PETSC_ERROR(err);
     for (PetscInt c = cStart; c < cEnd; ++c) {
-      const PetscScalar *coords = PETSC_NULL;
-      PetscInt           coordsSize;
+      PetscScalar *coords = PETSC_NULL;
+      PetscInt     coordsSize;
 
       err = DMPlexVecGetClosure(faultDMMesh, coordSection, coordVec, c, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
       for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}

Modified: short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicit.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicit.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -248,8 +248,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     _quadrature->retrieveGeometry(cell);
 #else
-    const PetscScalar *coords;
-    PetscInt           coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     _quadrature->computeGeometry(coordinatesCell, cell);
@@ -272,8 +272,8 @@
     _resetCellVector();
 
     // Restrict input fields to cell
-    const PetscScalar *accArray, *velArray, *dispTArray;
-    PetscInt           accSize,   velSize,   dispTSize;
+    PetscScalar *accArray, *velArray, *dispTArray;
+    PetscInt     accSize,   velSize,   dispTSize;
     err = DMPlexVecGetClosure(dmMesh, accSection,   accVec,   cell, &accSize,   &accArray);CHECK_PETSC_ERROR(err);
     err = DMPlexVecGetClosure(dmMesh, velSection,   velVec,   cell, &velSize,   &velArray);CHECK_PETSC_ERROR(err);
     err = DMPlexVecGetClosure(dmMesh, dispTSection, dispTVec, cell, &dispTSize, &dispTArray);CHECK_PETSC_ERROR(err);
@@ -475,8 +475,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     _quadrature->retrieveGeometry(cell);
 #else
-    const PetscScalar *coords;
-    PetscInt           coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     _quadrature->computeGeometry(coordinatesCell, cell);

Modified: short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicitLgDeform.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicitLgDeform.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicitLgDeform.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -240,8 +240,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     _quadrature->retrieveGeometry(cell);
 #else
-    const PetscScalar *coords;
-    PetscInt           coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     _quadrature->computeGeometry(coordinatesCell, cell);
@@ -255,8 +255,8 @@
     _resetCellVector();
 
     // Restrict input fields to cell
-    const PetscScalar *accArray, *velArray, *dispTArray;
-    PetscInt           accSize,   velSize,   dispTSize;
+    PetscScalar *accArray, *velArray, *dispTArray;
+    PetscInt     accSize,   velSize,   dispTSize;
     err = DMPlexVecGetClosure(dmMesh, accSection,   accVec,   cell, &accSize,   &accArray);CHECK_PETSC_ERROR(err);
     err = DMPlexVecGetClosure(dmMesh, velSection,   velVec,   cell, &velSize,   &velArray);CHECK_PETSC_ERROR(err);
     assert(velSize   == accSize);
@@ -431,8 +431,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     _quadrature->retrieveGeometry(cell);
 #else
-    const PetscScalar *coords;
-    PetscInt           coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     _quadrature->computeGeometry(coordinatesCell, cell);

Modified: short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicitTet4.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicitTet4.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicitTet4.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -232,8 +232,8 @@
 #endif
 
     // Restrict input fields to cell
-    const PetscScalar *accArray, *velArray, *dispTArray;
-    PetscInt           accSize,   velSize,   dispTSize;
+    PetscScalar *accArray, *velArray, *dispTArray;
+    PetscInt     accSize,   velSize,   dispTSize;
     err = DMPlexVecGetClosure(dmMesh, accSection,   accVec,   cell, &accSize,   &accArray);CHECK_PETSC_ERROR(err);
     err = DMPlexVecGetClosure(dmMesh, velSection,   velVec,   cell, &velSize,   &velArray);CHECK_PETSC_ERROR(err);
     err = DMPlexVecGetClosure(dmMesh, dispTSection, dispTVec, cell, &dispTSize, &dispTArray);CHECK_PETSC_ERROR(err);
@@ -246,8 +246,8 @@
 #endif
 
     // Compute geometry information for current cell
-    const PetscScalar *coords;
-    PetscInt           coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     const PylithScalar volume = _volume(coordinatesCell);
@@ -519,8 +519,8 @@
 #if defined(DETAILED_EVENT_LOGGING)
     _logger->eventBegin(geometryEvent);
 #endif
-    const PetscScalar *coords;
-    PetscInt           coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     const PylithScalar volume = _volume(coordinatesCell);

Modified: short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicitTri3.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicitTri3.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicitTri3.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -231,8 +231,8 @@
 #endif
 
     // Restrict input fields to cell
-    const PetscScalar *accArray, *velArray, *dispTArray;
-    PetscInt           accSize,   velSize,   dispTSize;
+    PetscScalar *accArray, *velArray, *dispTArray;
+    PetscInt     accSize,   velSize,   dispTSize;
     err = DMPlexVecGetClosure(dmMesh, accSection,   accVec,   cell, &accSize,   &accArray);CHECK_PETSC_ERROR(err);
     err = DMPlexVecGetClosure(dmMesh, velSection,   velVec,   cell, &velSize,   &velArray);CHECK_PETSC_ERROR(err);
     err = DMPlexVecGetClosure(dmMesh, dispTSection, dispTVec, cell, &dispTSize, &dispTArray);CHECK_PETSC_ERROR(err);
@@ -245,8 +245,8 @@
 #endif
 
     // Compute geometry information for current cell
-    const PetscScalar *coords;
-    PetscInt           coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     const PylithScalar area = _area(coordinatesCell);
@@ -468,8 +468,8 @@
 #if defined(DETAILED_EVENT_LOGGING)
     _logger->eventBegin(geometryEvent);
 #endif
-    const PetscScalar *coords;
-    PetscInt           coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     const PylithScalar area = _area(coordinatesCell);

Modified: short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityImplicit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityImplicit.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityImplicit.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -209,8 +209,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     _quadrature->retrieveGeometry(cell);
 #else
-    const PetscScalar *coords;
-    PetscInt           coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     _quadrature->computeGeometry(coordinatesCell, cell);
@@ -224,8 +224,8 @@
     _resetCellVector();
 
     // Restrict input fields to cell
-    const PetscScalar *dispTArray, *dispTIncrArray;
-    PetscInt           dispTSize,   dispTIncrSize;
+    PetscScalar *dispTArray, *dispTIncrArray;
+    PetscInt     dispTSize,   dispTIncrSize;
     err = DMPlexVecGetClosure(dmMesh, dispTSection, dispTVec, cell, &dispTSize, &dispTArray);CHECK_PETSC_ERROR(err);
     err = DMPlexVecGetClosure(dmMesh, dispTIncrSection, dispTIncrVec, cell, &dispTIncrSize, &dispTIncrArray);CHECK_PETSC_ERROR(err);
     assert(dispTSize == dispTIncrSize);
@@ -404,8 +404,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     _quadrature->retrieveGeometry(cell);
 #else
-    const PetscScalar *coords;
-    PetscInt           coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     _quadrature->computeGeometry(coordinatesCell, cell);
@@ -419,8 +419,8 @@
     _resetCellMatrix();
 
     // Restrict input fields to cell
-    const PetscScalar *dispTArray, *dispTIncrArray;
-    PetscInt           dispTSize,   dispTIncrSize;
+    PetscScalar *dispTArray, *dispTIncrArray;
+    PetscInt     dispTSize,   dispTIncrSize;
     err = DMPlexVecGetClosure(dmMesh, dispTSection, dispTVec, cell, &dispTSize, &dispTArray);CHECK_PETSC_ERROR(err);
     err = DMPlexVecGetClosure(dmMesh, dispTIncrSection, dispTIncrVec, cell, &dispTIncrSize, &dispTIncrArray);CHECK_PETSC_ERROR(err);
     assert(dispTSize == dispTIncrSize);

Modified: short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityImplicitLgDeform.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityImplicitLgDeform.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityImplicitLgDeform.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -208,8 +208,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     _quadrature->retrieveGeometry(cell);
 #else
-    const PetscScalar *coords;
-    PetscInt           coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     _quadrature->computeGeometry(coordinatesCell, cell);
@@ -223,8 +223,8 @@
     _resetCellVector();
 
     // Restrict input fields to cell
-    const PetscScalar *dispTArray, *dispTIncrArray;
-    PetscInt           dispTSize,   dispTIncrSize;
+    PetscScalar *dispTArray, *dispTIncrArray;
+    PetscInt     dispTSize,   dispTIncrSize;
     err = DMPlexVecGetClosure(dmMesh, dispTSection, dispTVec, cell, &dispTSize, &dispTArray);CHECK_PETSC_ERROR(err);
     err = DMPlexVecGetClosure(dmMesh, dispTIncrSection, dispTIncrVec, cell, &dispTIncrSize, &dispTIncrArray);CHECK_PETSC_ERROR(err);
     assert(dispTSize == dispTIncrSize);
@@ -416,8 +416,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     _quadrature->retrieveGeometry(cell);
 #else
-    const PetscScalar *coords;
-    PetscInt           coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     _quadrature->computeGeometry(coordinatesCell, cell);
@@ -431,8 +431,8 @@
     _resetCellMatrix();
 
     // Restrict input fields to cell
-    const PetscScalar *dispTArray, *dispTIncrArray;
-    PetscInt           dispTSize,   dispTIncrSize;
+    PetscScalar *dispTArray, *dispTIncrArray;
+    PetscInt     dispTSize,   dispTIncrSize;
     err = DMPlexVecGetClosure(dmMesh, dispTSection, dispTVec, cell, &dispTSize, &dispTArray);CHECK_PETSC_ERROR(err);
     err = DMPlexVecGetClosure(dmMesh, dispTIncrSection, dispTIncrVec, cell, &dispTIncrSize, &dispTIncrArray);CHECK_PETSC_ERROR(err);
     assert(dispTSize == dispTIncrSize);

Modified: short/3D/PyLith/trunk/libsrc/pylith/feassemble/IntegratorElasticity.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/feassemble/IntegratorElasticity.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/feassemble/IntegratorElasticity.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -215,8 +215,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     _quadrature->retrieveGeometry(cell);
 #else
-    const PetscScalar *coords;
-    PetscInt           coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     _quadrature->computeGeometry(coordinatesCell, cell);
@@ -227,8 +227,8 @@
     _material->retrievePropsAndVars(cell);
 
     // Restrict input fields to cell
-    const PetscScalar *dispTArray;
-    PetscInt           dispTSize;
+    PetscScalar *dispTArray;
+    PetscInt     dispTSize;
     err = DMPlexVecGetClosure(dmMesh, dispTSection, dispTVec, cell, &dispTSize, &dispTArray);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < dispTSize; ++i) {dispTCell[i] = dispTArray[i];}
     err = DMPlexVecRestoreClosure(dmMesh, dispTSection, dispTVec, cell, &dispTSize, &dispTArray);CHECK_PETSC_ERROR(err);
@@ -581,8 +581,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     _quadrature->retrieveGeometry(*c_iter);
 #else
-    const PetscScalar *coords;
-    PetscInt           coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     _quadrature->computeGeometry(coordinatesCell, cell);
@@ -590,8 +590,8 @@
 #endif
 
     // Restrict input fields to cell
-    const PetscScalar *dispTArray;
-    PetscInt           dispTSize;
+    PetscScalar *dispTArray;
+    PetscInt     dispTSize;
     err = DMPlexVecGetClosure(dmMesh, dispTSection, dispTVec, cell, &dispTSize, &dispTArray);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < dispTSize; ++i) {dispTCell[i] = dispTArray[i];}
     err = DMPlexVecRestoreClosure(dmMesh, dispTSection, dispTVec, cell, &dispTSize, &dispTArray);CHECK_PETSC_ERROR(err);
@@ -654,9 +654,9 @@
 
   // Loop over cells
   for(PetscInt c = 0; c < numCells; ++c) {
-    const PetscInt     cell = cells[c];
-    PetscInt           fieldSize;
-    const PetscScalar *fieldArray;
+    const PetscInt cell = cells[c];
+    PetscInt       fieldSize;
+    PetscScalar   *fieldArray;
 
     err = DMPlexVecGetClosure(dmMesh, fieldSection, fieldVec, cell, &fieldSize, &fieldArray);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < fieldSize; ++i) {strainCell[i] = fieldArray[i];}

Modified: short/3D/PyLith/trunk/libsrc/pylith/feassemble/IntegratorElasticityLgDeform.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/feassemble/IntegratorElasticityLgDeform.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/feassemble/IntegratorElasticityLgDeform.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -137,8 +137,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     _quadrature->retrieveGeometry(cell);
 #else
-    const PetscScalar *coords = PETSC_NULL;
-    PetscInt           coordsSize;
+    PetscScalar *coords = PETSC_NULL;
+    PetscInt     coordsSize;
 
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
@@ -147,8 +147,8 @@
 #endif
 
     // Restrict input fields to cell
-    const PetscScalar *disp = PETSC_NULL;
-    PetscInt           dispSize;
+    PetscScalar *disp = PETSC_NULL;
+    PetscInt     dispSize;
 
     err = DMPlexVecGetClosure(dmMesh, dispSection, dispVec, cell, &dispSize, &disp);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < dispSize; ++i) {dispCell[i] = disp[i];}
@@ -249,8 +249,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     _quadrature->retrieveGeometry(*c_iter);
 #else
-    const PetscScalar *coords = PETSC_NULL;
-    PetscInt           coordsSize;
+    PetscScalar *coords = PETSC_NULL;
+    PetscInt     coordsSize;
 
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
@@ -259,8 +259,8 @@
 #endif
 
     // Restrict input fields to cell
-    const PetscScalar *disp = PETSC_NULL;
-    PetscInt           dispSize;
+    PetscScalar *disp = PETSC_NULL;
+    PetscInt     dispSize;
 
     err = DMPlexVecGetClosure(dmMesh, dispSection, dispVec, cell, &dispSize, &disp);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < dispSize; ++i) {dispCell[i] = disp[i];}

Modified: short/3D/PyLith/trunk/libsrc/pylith/feassemble/Quadrature.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/feassemble/Quadrature.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/feassemble/Quadrature.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -367,8 +367,8 @@
   err = VecGetArray(jacobianDetVec, &jacobianDetArray);CHECK_PETSC_ERROR(err);
   err = VecGetArray(basisDerivVec, &basisDerivArray);CHECK_PETSC_ERROR(err);
   for (PetscInt c = cStart; c < cEnd; ++c) {
-    const PetscScalar *coords = PETSC_NULL;
-    PetscInt           coordsSize;
+    PetscScalar *coords = PETSC_NULL;
+    PetscInt     coordsSize;
 
     err = DMPlexVecGetClosure(dm, coordSection, coordVec, c, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/ElasticMaterial.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/ElasticMaterial.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/ElasticMaterial.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -451,8 +451,8 @@
   for (PetscInt c = 0; c < numCells; ++c) {
     const PetscInt cell = cells[c];
     retrievePropsAndVars(cell);
-    const PetscScalar *coords = NULL;
-    PetscInt coordsSize;
+    PetscScalar *coords = NULL;
+    PetscInt     coordsSize;
 
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
@@ -694,8 +694,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     quadrature->retrieveGeometry(*c_iter);
 #else
-    const PetscScalar *coords;
-    PetscInt coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     quadrature->computeGeometry(coordinatesCell, cell);
@@ -847,8 +847,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     quadrature->retrieveGeometry(*c_iter);
 #else
-    const PetscScalar *coords;
-    PetscInt coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     quadrature->computeGeometry(coordinatesCell, cell);

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/Material.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/Material.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/Material.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -215,8 +215,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     quadrature->retrieveGeometry(cell);
 #else
-    const PetscScalar *coords;
-    PetscInt           coordsSize;
+    PetscScalar *coords;
+    PetscInt     coordsSize;
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, cell, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}
     quadrature->computeGeometry(coordinatesCell, cell);

Modified: short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -321,8 +321,8 @@
 	
         err = VecSet(solutionVec, 0.0);CHECK_PETSC_ERROR(err);
         for(PetscInt v = vStart; v < vEnd; ++v) {
-          PetscScalar values[3] = {0.0, 0.0, 0.0};
-          const PetscScalar *coords;
+          PetscScalar  values[3] = {0.0, 0.0, 0.0};
+          PetscScalar *coords;
 
           err = DMPlexVecGetClosure(dmMesh, coordinateSection, coordinateVec, v, PETSC_NULL, &coords);CHECK_PETSC_ERROR(err);
           for(int i = 0; i < dim; ++i) {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -362,7 +362,7 @@
   CohesiveTopology::createFault(faultMesh, faultBoundary,
                                 *mesh, groupField);
   CohesiveTopology::create(mesh, *faultMesh, faultBoundary, 
-                           sieveMesh->getIntSection(faultLabel),
+                           groupField,
                            faultId,
                            firstFaultVertex, firstLagrangeVertex, firstFaultCell,
                            useLagrangeConstraints);
@@ -479,7 +479,7 @@
   CohesiveTopology::createFault(&faultMesh, faultBoundary,
                                 mesh, groupField);
   CohesiveTopology::create(&mesh, faultMesh, faultBoundary, 
-                           sieveMesh->getIntSection(data.faultLabel),
+                           groupField,
                            data.faultId,
                            firstFaultVertex, firstLagrangeVertex, firstFaultCell,
                            useLagrangeConstraints);

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestConstRateSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestConstRateSlipFn.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestConstRateSlipFn.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -293,7 +293,7 @@
   CohesiveTopology::createFault(faultMesh, faultBoundary,
                                 *mesh, groupField);
   CohesiveTopology::create(mesh, *faultMesh, faultBoundary, 
-                           sieveMesh->getIntSection(faultLabel),
+                           groupField,
                            faultId,
                            firstFaultVertex, firstLagrangeVertex, firstFaultCell,
                            useLagrangeConstraints);
@@ -404,7 +404,7 @@
   CohesiveTopology::createFault(&faultMesh, faultBoundary,
                                 mesh, groupField);
   CohesiveTopology::create(&mesh, faultMesh, faultBoundary, 
-                           sieveMesh->getIntSection(data.faultLabel),
+                           groupField,
                            data.faultId,
                            firstFaultVertex, firstLagrangeVertex, firstFaultCell,
                            useLagrangeConstraints);

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestEqKinSrc.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestEqKinSrc.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestEqKinSrc.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -199,7 +199,7 @@
   CohesiveTopology::createFault(faultMesh, faultBoundary,
                                 *mesh, groupField);
   CohesiveTopology::create(mesh, *faultMesh, faultBoundary, 
-                           sieveMesh->getIntSection(faultLabel),
+                           groupField,
                            faultId,
                            firstFaultVertex, firstLagrangeVertex, firstFaultCell,
                            useLagrangeConstraints);

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -497,6 +497,7 @@
 { // _testAdjustTopology
   topology::Mesh mesh;
   meshio::MeshIOAscii iohandler;
+  PetscErrorCode err;
   iohandler.filename(data.filename);
   iohandler.debug(false);
   iohandler.interpolate(false);
@@ -510,11 +511,14 @@
   mesh.nondimensionalize(normalizer);
   
   CPPUNIT_ASSERT(0 != fault);
-  int firstFaultVertex    = 0;
-  int firstLagrangeVertex = mesh.sieveMesh()->getIntSection("fault")->size();
-  int firstFaultCell      = mesh.sieveMesh()->getIntSection("fault")->size();
+  DM       dmMesh = mesh.dmMesh();
+  PetscInt firstFaultVertex = 0;
+  PetscInt firstLagrangeVertex, firstFaultCell;
+
+  err = DMPlexGetStratumSize(dmMesh, "fault", 1, &firstLagrangeVertex);CHECK_PETSC_ERROR(err);
+  firstFaultCell = firstLagrangeVertex;
   if (dynamic_cast<FaultCohesive*>(fault)->useLagrangeConstraints()) {
-    firstFaultCell += mesh.sieveMesh()->getIntSection("fault")->size();
+    firstFaultCell += firstLagrangeVertex;
   }
   fault->id(1);
   fault->label("fault");
@@ -524,109 +528,100 @@
   CPPUNIT_ASSERT_EQUAL(data.cellDim, mesh.dimension());
 
   // Check vertices
-  const ALE::Obj<SieveMesh>& sieveMesh = mesh.sieveMesh();
-  CPPUNIT_ASSERT(!sieveMesh.isNull());
-  const ALE::Obj<SieveMesh::label_sequence>& vertices = 
-    sieveMesh->depthStratum(0);
-  CPPUNIT_ASSERT(!vertices.isNull());
-  const ALE::Obj<topology::Mesh::RealSection>& coordsSection =
-    sieveMesh->getRealSection("coordinates");
-  CPPUNIT_ASSERT(!coordsSection.isNull());
-  const int numVertices = vertices->size();
+  PetscSection coordSection;
+  Vec          coordinates;
+  PetscScalar *coords;
+  PetscInt     vStart, vEnd;
+
+  dmMesh = mesh.dmMesh();
+  err = DMPlexGetDepthStratum(dmMesh, 0, &vStart, &vEnd);CHECK_PETSC_ERROR(err);
+  err = DMPlexGetCoordinateSection(dmMesh, &coordSection);CHECK_PETSC_ERROR(err);
+  err = DMGetCoordinatesLocal(dmMesh, &coordinates);CHECK_PETSC_ERROR(err);
+  const PetscInt numVertices = vEnd-vStart;
+  const PetscInt spaceDim    = data.spaceDim;
   CPPUNIT_ASSERT_EQUAL(data.numVertices, numVertices);
-  CPPUNIT_ASSERT_EQUAL(data.spaceDim, 
-		       coordsSection->getFiberDimension(*vertices->begin()));
-  int i = 0;
-  const int spaceDim = data.spaceDim;
-  for (SieveMesh::label_sequence::iterator v_iter = 
-	vertices->begin();
-      v_iter != vertices->end();
-      ++v_iter) {
-    const PylithScalar* vertexCoords = coordsSection->restrictPoint(*v_iter);
+  err = VecGetArray(coordinates, &coords);CHECK_PETSC_ERROR(err);
+  for (PetscInt v = vStart, i = 0; v < vEnd; ++v) {
     const PylithScalar tolerance = 1.0e-06;
-    for (int iDim=0; iDim < spaceDim; ++iDim)
+    PetscInt           dof, off;
+
+    err = PetscSectionGetDof(coordSection, v, &dof);CHECK_PETSC_ERROR(err);
+    err = PetscSectionGetOffset(coordSection, v, &off);CHECK_PETSC_ERROR(err);
+    CPPUNIT_ASSERT_EQUAL(spaceDim, dof);
+    for (PetscInt d = 0; d < spaceDim; ++d, ++i)
       if (data.vertices[i] < 1.0)
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(data.vertices[i++], vertexCoords[iDim],
-				   tolerance);
+        CPPUNIT_ASSERT_DOUBLES_EQUAL(data.vertices[i], coords[off+d], tolerance);
       else
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vertexCoords[iDim]/data.vertices[i++],
-				   tolerance);
+        CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, coords[off+d]/data.vertices[i], tolerance);
   } // for
+  err = VecRestoreArray(coordinates, &coords);CHECK_PETSC_ERROR(err);
 
   //mesh.view("MESH");
 
   // check cells
-  const ALE::Obj<SieveMesh::sieve_type>& sieve = sieveMesh->getSieve();
-  CPPUNIT_ASSERT(!sieve.isNull());
-  const ALE::Obj<SieveMesh::label_sequence>& cells = sieveMesh->heightStratum(0);
-  CPPUNIT_ASSERT(!cells.isNull());
+  PetscInt cStart, cEnd;
 
-  const int numCells = cells->size();
+  err = DMPlexGetHeightStratum(dmMesh, 0, &cStart, &cEnd);CHECK_PETSC_ERROR(err);
+  const PetscInt numCells = cEnd-cStart;
   CPPUNIT_ASSERT_EQUAL(data.numCells, numCells);
+  for (PetscInt c = cStart, cell = 0, i = 0; c < cEnd; ++c, ++cell) {
+    const PetscInt *cone;
+    PetscInt        coneSize;
 
-  ALE::ISieveVisitor::PointRetriever<SieveMesh::sieve_type> pV(sieve->getMaxConeSize());
-  int iCell = 0;
-  i = 0;
-  for(SieveMesh::label_sequence::iterator c_iter = cells->begin();
-      c_iter != cells->end();
-      ++c_iter) {
-    const int numCorners = sieveMesh->getNumCellCorners(*c_iter);
-    CPPUNIT_ASSERT_EQUAL(data.numCorners[iCell++], numCorners);
-    sieve->cone(*c_iter, pV);
-    const SieveMesh::point_type *cone = pV.getPoints();
-    for(int p = 0; p < pV.getSize(); ++p, ++i) {
+    err = DMPlexGetConeSize(dmMesh, c, &coneSize);CHECK_PETSC_ERROR(err);
+    err = DMPlexGetCone(dmMesh, c, &cone);CHECK_PETSC_ERROR(err);
+    CPPUNIT_ASSERT_EQUAL(data.numCorners[cell], coneSize);
+    for (PetscInt p = 0; p < coneSize; ++p, ++i) {
       CPPUNIT_ASSERT_EQUAL(data.cells[i], cone[p]);
     }
-    pV.clear();
   } // for
 
   // check materials
-  const ALE::Obj<SieveMesh::label_type>& labelMaterials = 
-    sieveMesh->getLabel("material-id");
-  CPPUNIT_ASSERT(!labelMaterials.isNull());
-  const int idDefault = -999;
-  const int size = numCells;
-  int_array materialIds(size);
-  i = 0;
-  for (SieveMesh::label_sequence::iterator c_iter = cells->begin();
-      c_iter != cells->end();
-      ++c_iter)
-    materialIds[i++] = sieveMesh->getValue(labelMaterials, *c_iter, idDefault);
-  
-  for (int iCell=0; iCell < numCells; ++iCell)
-    CPPUNIT_ASSERT_EQUAL(data.materialIds[iCell], materialIds[iCell]);
+  DMLabel labelMaterials;
 
+  err = DMPlexGetLabel(dmMesh, "material-id", &labelMaterials);CHECK_PETSC_ERROR(err);
+  CPPUNIT_ASSERT(labelMaterials);
+  const PetscInt idDefault = -999;
+  for (PetscInt c = cStart, cell = 0; c < cEnd; ++c, ++cell) {
+    PetscInt value;
+
+    err = DMLabelGetValue(labelMaterials, c, &value);CHECK_PETSC_ERROR(err);
+    if (value == -1) value = idDefault;
+    CPPUNIT_ASSERT_EQUAL(data.materialIds[cell], value);
+  }  
+
   // Check groups
-  const ALE::Obj<std::set<std::string> >& groupNames = 
-    sieveMesh->getIntSections();
-  CPPUNIT_ASSERT(!groupNames.isNull());
-  int iGroup = 0;
-  int index = 0;
-  for (std::set<std::string>::const_iterator name=groupNames->begin();
-       name != groupNames->end();
-       ++name, ++iGroup) {
-    const ALE::Obj<topology::Mesh::IntSection>& groupField =
-      sieveMesh->getIntSection(*name);
-    CPPUNIT_ASSERT(!groupField.isNull());
-    const topology::Mesh::IntSection::chart_type& chart = groupField->getChart();
-    SieveMesh::point_type firstPoint;
-    for (topology::Mesh::IntSection::chart_type::const_iterator c_iter = chart.begin(); c_iter != chart.end(); ++c_iter) {
-      if (groupField->getFiberDimension(*c_iter)) {firstPoint = *c_iter; break;}
-    }
-    std::string groupType = 
-      (sieveMesh->height(firstPoint) == 0) ? "cell" : "vertex";
-    const int numPoints = groupField->size();
-    int_array points(numPoints);
-    int i = 0;
-    for (topology::Mesh::IntSection::chart_type::const_iterator c_iter = chart.begin(); c_iter != chart.end(); ++c_iter) {
-      if (groupField->getFiberDimension(*c_iter)) points[i++] = *c_iter;
-    }
+  PetscInt numLabels;
 
-    CPPUNIT_ASSERT_EQUAL(std::string(data.groupNames[iGroup]), *name);
-    CPPUNIT_ASSERT_EQUAL(std::string(data.groupTypes[iGroup]), groupType);
-    CPPUNIT_ASSERT_EQUAL(data.groupSizes[iGroup], numPoints);
-    for (int i=0; i < numPoints; ++i)
-      CPPUNIT_ASSERT_EQUAL(data.groups[index++], points[i]);
+  err = DMPlexGetNumLabels(dmMesh, &numLabels);CHECK_PETSC_ERROR(err);
+  for (PetscInt l = 0, i = 0, index = 0; l < numLabels; ++l) {
+    DMLabel         label;
+    IS              is;
+    const PetscInt *points;
+    PetscInt        numPoints, depth;
+    const char     *name;
+    std::string     skipA = "depth";
+    std::string     skipB = "material-id";
+
+    err = DMPlexGetLabelName(dmMesh, l, &name);CHECK_PETSC_ERROR(err);
+    if (std::string(name) == skipA) continue;
+    if (std::string(name) == skipB) continue;
+    err = DMPlexGetLabel(dmMesh, name, &label);CHECK_PETSC_ERROR(err);
+    CPPUNIT_ASSERT(label);
+    err = DMLabelGetStratumIS(label, 1, &is);CHECK_PETSC_ERROR(err);
+    err = ISGetLocalSize(is, &numPoints);CHECK_PETSC_ERROR(err);
+    err = ISGetIndices(is, &points);CHECK_PETSC_ERROR(err);
+    err = DMPlexGetLabelValue(dmMesh, "depth", points[0], &depth);CHECK_PETSC_ERROR(err);
+    std::string groupType = depth ? "cell" : "vertex";
+
+    CPPUNIT_ASSERT_EQUAL(std::string(data.groupNames[i]), std::string(name));
+    CPPUNIT_ASSERT_EQUAL(std::string(data.groupTypes[i]), groupType);
+    CPPUNIT_ASSERT_EQUAL(data.groupSizes[i], numPoints);
+    for (PetscInt p = 0; p < numPoints; ++p, ++index)
+      CPPUNIT_ASSERT_EQUAL(data.groups[index], points[p]);
+    err = ISRestoreIndices(is, &points);CHECK_PETSC_ERROR(err);
+    err = ISDestroy(&is);CHECK_PETSC_ERROR(err);
+    ++i;
   } // for
 } // _testAdjustTopology
 
@@ -641,6 +636,7 @@
 { // _testAdjustTopology
   topology::Mesh mesh;
   meshio::MeshIOAscii iohandler;
+  PetscErrorCode err;
   iohandler.filename(data.filename);
   iohandler.debug(false);
   iohandler.interpolate(false);
@@ -648,14 +644,19 @@
 
   CPPUNIT_ASSERT(0 != faultA);
   CPPUNIT_ASSERT(0 != faultB);
-  int firstFaultVertex    = 0;
-  int firstLagrangeVertex = mesh.sieveMesh()->getIntSection("faultA")->size() + mesh.sieveMesh()->getIntSection("faultB")->size();
-  int firstFaultCell      = mesh.sieveMesh()->getIntSection("faultA")->size() + mesh.sieveMesh()->getIntSection("faultB")->size();
+  DM       dmMesh = mesh.dmMesh();
+  PetscInt firstFaultVertex = 0;
+  PetscInt sizeA, sizeB;
+
+  err = DMPlexGetStratumSize(dmMesh, "faultA", 1, &sizeA);CHECK_PETSC_ERROR(err);
+  err = DMPlexGetStratumSize(dmMesh, "faultB", 1, &sizeB);CHECK_PETSC_ERROR(err);
+  PetscInt firstLagrangeVertex = sizeA + sizeB;
+  PetscInt firstFaultCell      = sizeA + sizeB;
   if (dynamic_cast<FaultCohesive*>(faultA)->useLagrangeConstraints()) {
-    firstFaultCell += mesh.sieveMesh()->getIntSection("faultA")->size();
+    firstFaultCell += sizeA;
   }
   if (dynamic_cast<FaultCohesive*>(faultB)->useLagrangeConstraints()) {
-    firstFaultCell += mesh.sieveMesh()->getIntSection("faultB")->size();
+    firstFaultCell += sizeB;
   }
 
   faultA->id(1);
@@ -670,109 +671,98 @@
   CPPUNIT_ASSERT_EQUAL(data.cellDim, mesh.dimension());
 
   // Check vertices
-  const ALE::Obj<SieveMesh>& sieveMesh = mesh.sieveMesh();
-  CPPUNIT_ASSERT(!sieveMesh.isNull());
-  const ALE::Obj<SieveMesh::label_sequence>& vertices =
-    sieveMesh->depthStratum(0);
-  CPPUNIT_ASSERT(!vertices.isNull());
-  const ALE::Obj<topology::Mesh::RealSection>& coordsSection =
-    sieveMesh->getRealSection("coordinates");
-  CPPUNIT_ASSERT(!coordsSection.isNull());
-  const int numVertices = vertices->size();
+  PetscSection coordSection;
+  Vec          coordinates;
+  PetscScalar *coords;
+  PetscInt     vStart, vEnd;
+
+  dmMesh = mesh.dmMesh();
+  err = DMPlexGetDepthStratum(dmMesh, 0, &vStart, &vEnd);CHECK_PETSC_ERROR(err);
+  err = DMPlexGetCoordinateSection(dmMesh, &coordSection);CHECK_PETSC_ERROR(err);
+  err = DMGetCoordinatesLocal(dmMesh, &coordinates);CHECK_PETSC_ERROR(err);
+  const PetscInt numVertices = vEnd-vStart;
+  const PetscInt spaceDim    = data.spaceDim;
   CPPUNIT_ASSERT_EQUAL(data.numVertices, numVertices);
-  CPPUNIT_ASSERT_EQUAL(data.spaceDim, 
-		       coordsSection->getFiberDimension(*vertices->begin()));
-  int i = 0;
-  const int spaceDim = data.spaceDim;
-  for(SieveMesh::label_sequence::iterator v_iter = 
-	vertices->begin();
-      v_iter != vertices->end();
-      ++v_iter) {
-    const PylithScalar* coordsVertex = coordsSection->restrictPoint(*v_iter);
-    CPPUNIT_ASSERT(0 != coordsVertex);
+  err = VecGetArray(coordinates, &coords);CHECK_PETSC_ERROR(err);
+  for (PetscInt v = vStart, i = 0; v < vEnd; ++v) {
     const PylithScalar tolerance = 1.0e-06;
-    for (int iDim=0; iDim < spaceDim; ++iDim)
+    PetscInt           dof, off;
+
+    err = PetscSectionGetDof(coordSection, v, &dof);CHECK_PETSC_ERROR(err);
+    err = PetscSectionGetOffset(coordSection, v, &off);CHECK_PETSC_ERROR(err);
+    CPPUNIT_ASSERT_EQUAL(spaceDim, dof);
+    for (PetscInt d = 0; d < spaceDim; ++d, ++i)
       if (data.vertices[i] < 1.0)
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(data.vertices[i++], coordsVertex[iDim],
-				   tolerance);
+        CPPUNIT_ASSERT_DOUBLES_EQUAL(data.vertices[i], coords[off+d], tolerance);
       else
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, coordsVertex[iDim]/data.vertices[i++],
-				   tolerance);
+        CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, coords[off+d]/data.vertices[i], tolerance);
   } // for
+  err = VecRestoreArray(coordinates, &coords);CHECK_PETSC_ERROR(err);
 
   // check cells
-  const ALE::Obj<SieveMesh::sieve_type>& sieve = sieveMesh->getSieve();
-  CPPUNIT_ASSERT(!sieve.isNull());
-  const ALE::Obj<SieveMesh::label_sequence>& cells = sieveMesh->heightStratum(0);
-  CPPUNIT_ASSERT(!cells.isNull());
+  PetscInt cStart, cEnd;
 
-  const int numCells = cells->size();
+  err = DMPlexGetHeightStratum(dmMesh, 0, &cStart, &cEnd);CHECK_PETSC_ERROR(err);
+  const PetscInt numCells = cEnd-cStart;
   CPPUNIT_ASSERT_EQUAL(data.numCells, numCells);
+  for (PetscInt c = cStart, cell = 0, i = 0; c < cEnd; ++c, ++cell) {
+    const PetscInt *cone;
+    PetscInt        coneSize;
 
-  ALE::ISieveVisitor::PointRetriever<SieveMesh::sieve_type> pV(sieve->getMaxConeSize());
-  int iCell = 0;
-  i = 0;
-  //sieveMesh->view(data.filename);
-  for(SieveMesh::label_sequence::iterator c_iter = cells->begin();
-      c_iter != cells->end();
-      ++c_iter) {
-    const int numCorners = sieveMesh->getNumCellCorners(*c_iter);
-    CPPUNIT_ASSERT_EQUAL(data.numCorners[iCell++], numCorners);
-    sieve->cone(*c_iter, pV);
-    const SieveMesh::point_type *cone = pV.getPoints();
-    for(int p = 0; p < pV.getSize(); ++p, ++i) {
+    err = DMPlexGetConeSize(dmMesh, c, &coneSize);CHECK_PETSC_ERROR(err);
+    err = DMPlexGetCone(dmMesh, c, &cone);CHECK_PETSC_ERROR(err);
+    CPPUNIT_ASSERT_EQUAL(data.numCorners[cell], coneSize);
+    for (PetscInt p = 0; p < coneSize; ++p, ++i) {
       CPPUNIT_ASSERT_EQUAL(data.cells[i], cone[p]);
     }
-    pV.clear();
   } // for
 
   // check materials
-  const ALE::Obj<SieveMesh::label_type>& labelMaterials = 
-    sieveMesh->getLabel("material-id");
-  CPPUNIT_ASSERT(!labelMaterials.isNull());
-  const int idDefault = -999;
-  const int size = numCells;
-  int_array materialIds(size);
-  i = 0;
-  for(SieveMesh::label_sequence::iterator c_iter = cells->begin();
-      c_iter != cells->end();
-      ++c_iter)
-    materialIds[i++] = sieveMesh->getValue(labelMaterials, *c_iter, idDefault);
-  
-  for (int iCell=0; iCell < numCells; ++iCell)
-    CPPUNIT_ASSERT_EQUAL(data.materialIds[iCell], materialIds[iCell]);
+  DMLabel labelMaterials;
 
+  err = DMPlexGetLabel(dmMesh, "material-id", &labelMaterials);CHECK_PETSC_ERROR(err);
+  CPPUNIT_ASSERT(labelMaterials);
+  const PetscInt idDefault = -999;
+  for (PetscInt c = cStart, cell = 0; c < cEnd; ++c, ++cell) {
+    PetscInt value;
+
+    err = DMLabelGetValue(labelMaterials, c, &value);CHECK_PETSC_ERROR(err);
+    if (value == -1) value = idDefault;
+    CPPUNIT_ASSERT_EQUAL(data.materialIds[cell], value);
+  }  
+
   // Check groups
-  const ALE::Obj<std::set<std::string> >& groupNames = 
-    sieveMesh->getIntSections();
-  CPPUNIT_ASSERT(!groupNames.isNull());
-  int iGroup = 0;
-  int index = 0;
-  for (std::set<std::string>::const_iterator name=groupNames->begin();
-       name != groupNames->end();
-       ++name, ++iGroup) {
-    const ALE::Obj<topology::Mesh::IntSection>& groupField = 
-      sieveMesh->getIntSection(*name);
-    CPPUNIT_ASSERT(!groupField.isNull());
-    const topology::Mesh::IntSection::chart_type& chart = groupField->getChart();
-    SieveMesh::point_type firstPoint;
-    for(topology::Mesh::IntSection::chart_type::const_iterator c_iter = chart.begin(); c_iter != chart.end(); ++c_iter) {
-      if (groupField->getFiberDimension(*c_iter)) {firstPoint = *c_iter; break;}
-    }
-    std::string groupType = 
-      (sieveMesh->height(firstPoint) == 0) ? "cell" : "vertex";
-    const int numPoints = groupField->size();
-    int_array points(numPoints);
-    int i = 0;
-    for(topology::Mesh::IntSection::chart_type::const_iterator c_iter = chart.begin(); c_iter != chart.end(); ++c_iter) {
-      if (groupField->getFiberDimension(*c_iter)) points[i++] = *c_iter;
-    }
+  PetscInt numLabels;
 
-    CPPUNIT_ASSERT_EQUAL(std::string(data.groupNames[iGroup]), *name);
-    CPPUNIT_ASSERT_EQUAL(std::string(data.groupTypes[iGroup]), groupType);
-    CPPUNIT_ASSERT_EQUAL(data.groupSizes[iGroup], numPoints);
-    for (int i=0; i < numPoints; ++i)
-      CPPUNIT_ASSERT_EQUAL(data.groups[index++], points[i]);
+  err = DMPlexGetNumLabels(dmMesh, &numLabels);CHECK_PETSC_ERROR(err);
+  for (PetscInt l = 0, i = 0, index = 0; l < numLabels; ++l) {
+    DMLabel         label;
+    IS              is;
+    const PetscInt *points;
+    PetscInt        numPoints, depth;
+    const char     *name;
+    std::string     skipA = "depth";
+    std::string     skipB = "material-id";
+
+    err = DMPlexGetLabelName(dmMesh, l, &name);CHECK_PETSC_ERROR(err);
+    if (std::string(name) == skipA) continue;
+    if (std::string(name) == skipB) continue;
+    err = DMPlexGetLabel(dmMesh, name, &label);CHECK_PETSC_ERROR(err);
+    CPPUNIT_ASSERT(label);
+    err = DMLabelGetStratumIS(label, 1, &is);CHECK_PETSC_ERROR(err);
+    err = ISGetLocalSize(is, &numPoints);CHECK_PETSC_ERROR(err);
+    err = ISGetIndices(is, &points);CHECK_PETSC_ERROR(err);
+    err = DMPlexGetLabelValue(dmMesh, "depth", points[0], &depth);CHECK_PETSC_ERROR(err);
+    std::string groupType = depth ? "cell" : "vertex";
+
+    CPPUNIT_ASSERT_EQUAL(std::string(data.groupNames[i]), std::string(name));
+    CPPUNIT_ASSERT_EQUAL(std::string(data.groupTypes[i]), groupType);
+    CPPUNIT_ASSERT_EQUAL(data.groupSizes[i], numPoints);
+    for (PetscInt p = 0; p < numPoints; ++p, ++index)
+      CPPUNIT_ASSERT_EQUAL(data.groups[index], points[p]);
+    err = ISRestoreIndices(is, &points);CHECK_PETSC_ERROR(err);
+    err = ISDestroy(&is);CHECK_PETSC_ERROR(err);
+    ++i;
   } // for
 } // _testAdjustTopology
 

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestLiuCosSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestLiuCosSlipFn.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestLiuCosSlipFn.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -357,7 +357,7 @@
   CohesiveTopology::createFault(faultMesh, faultBoundary,
                                 *mesh, groupField);
   CohesiveTopology::create(mesh, *faultMesh, faultBoundary, 
-                           sieveMesh->getIntSection(faultLabel),
+                           groupField,
                            faultId, firstFaultVertex, firstLagrangeVertex,
 			   firstFaultCell, useLagrangeConstraints);
   // Need to copy coordinates from mesh to fault mesh since we are not
@@ -473,7 +473,7 @@
   CohesiveTopology::createFault(&faultMesh, faultBoundary,
                                 mesh, groupField);
   CohesiveTopology::create(&mesh, faultMesh, faultBoundary, 
-                           sieveMesh->getIntSection(data.faultLabel),
+                           groupField,
                            data.faultId, firstFaultVertex, firstLagrangeVertex,
 			   firstFaultCell, useLagrangeConstraints);
   // Need to copy coordinates from mesh to fault mesh since we are not

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestStepSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestStepSlipFn.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestStepSlipFn.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -289,7 +289,7 @@
   CohesiveTopology::createFault(faultMesh, faultBoundary,
                                 *mesh, groupField);
   CohesiveTopology::create(mesh, *faultMesh, faultBoundary, 
-                           sieveMesh->getIntSection(faultLabel),
+                           groupField,
                            faultId,
                            firstFaultVertex, firstLagrangeVertex, firstFaultCell,
                            useLagrangeConstraints);
@@ -399,7 +399,7 @@
   CohesiveTopology::createFault(&faultMesh, faultBoundary,
                                 mesh, groupField);
   CohesiveTopology::create(&mesh, faultMesh, faultBoundary, 
-                           sieveMesh->getIntSection(data.faultLabel),
+                           groupField,
                            data.faultId,
                            firstFaultVertex, firstLagrangeVertex, firstFaultCell,
                            useLagrangeConstraints);

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestTimeHistorySlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestTimeHistorySlipFn.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestTimeHistorySlipFn.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -319,7 +319,7 @@
   CohesiveTopology::createFault(faultMesh, faultBoundary,
                                 *mesh, groupField);
   CohesiveTopology::create(mesh, *faultMesh, faultBoundary, 
-                           sieveMesh->getIntSection(faultLabel),
+                           groupField,
                            faultId, firstFaultVertex, firstLagrangeVertex, 
 			   firstFaultCell, useLagrangeConstraints);
   // Need to copy coordinates from mesh to fault mesh since we are not
@@ -433,7 +433,7 @@
   CohesiveTopology::createFault(&faultMesh, faultBoundary,
                                 mesh, groupField);
   CohesiveTopology::create(&mesh, faultMesh, faultBoundary, 
-                           sieveMesh->getIntSection(data.faultLabel),
+                           groupField,
                            data.faultId, firstFaultVertex, firstLagrangeVertex,
 			   firstFaultCell, useLagrangeConstraints);
   // Need to copy coordinates from mesh to fault mesh since we are not

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestTractPerturbation.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestTractPerturbation.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestTractPerturbation.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -370,7 +370,7 @@
   CohesiveTopology::createFault(faultMesh, faultBoundary,
                                 *mesh, groupField);
   CohesiveTopology::create(mesh, *faultMesh, faultBoundary, 
-                           sieveMesh->getIntSection(faultLabel),
+                           groupField,
                            faultId,
                            firstFaultVertex, firstLagrangeVertex, firstFaultCell,
                            useLagrangeConstraints);

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -26,9 +26,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,16 and vertices are 4-15.
+ * Cells are 0-1,2 and vertices are 3-18.
  *
- *       2,3,4,5 -------- 14,15,16,17 -- 6,7,8,9 -------- 10,11,12,13
+ *       3,4,5,6 -------- 15,16,17,18 -- 7,8,9,10 -------- 11,12,13,14
  *
  *                        ^^^^^^^^^^^^^^^^^^^^^^ Cohesive element
  *
@@ -70,9 +70,9 @@
 };
 
 const int pylith::faults::CohesiveDataHex8::_cells[] = {
-  2,  3,  5,  4, 14, 15, 17, 16,
-  6,  7,  9,  8, 10, 11, 13, 12,
-  8,  9,  7,  6, 16, 17, 15, 14,
+  3,  4,  6,  5, 15, 16, 18, 17,
+  7,  8, 10,  9, 11, 12, 14, 13,
+  9, 10,  8,  7, 17, 18, 16, 15,
 };
 
 const int pylith::faults::CohesiveDataHex8::_materialIds[] = {
@@ -86,12 +86,12 @@
   { 8, 8 };
 
 const int pylith::faults::CohesiveDataHex8::_groups[] = {
-  6, 7, 8, 9, 14, 15, 16, 17,
-  4, 5, 8, 9, 12, 13, 16, 17
+  5, 6, 9, 10, 13, 14, 17, 18,
+  7, 8, 9, 10, 15, 16, 17, 18
 };
 
 const char* pylith::faults::CohesiveDataHex8::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataHex8::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8Lagrange.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8Lagrange.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8Lagrange.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -26,10 +26,10 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,16 and vertices are 4-15.
+ * Cells are 0-1,2 and vertices are 3-18,19-22.
  *
- *       2,3,4,5 -------- 6,7,8,9 -- 14,15,16,17 -------- 10,11,12,13
- *                                    18,19,20,21
+ *       3,4,5,6 -------- 7,8,9,10 -- 15,16,17,18 -------- 11,12,13,14
+ *                                    19,20,21,22
  *                        ^^^^^^^^^^^^^^^^^^^^^^ Cohesive element
  *
  */
@@ -74,9 +74,9 @@
 };
 
 const int pylith::faults::CohesiveDataHex8Lagrange::_cells[] = {
-  2,  3,  5,  4, 14, 15, 17, 16,
-  6,  7,  9,  8, 10, 11, 13, 12,
-  8,  9,  7,  6, 16, 17, 15, 14, 20, 21, 19, 18
+  3,  4,  6,  5, 15, 16, 18, 17,
+  7,  8, 10,  9, 11, 12, 14, 13,
+  9, 10,  8,  7, 17, 18, 16, 15, 21, 22, 20, 19
 };
 
 const int pylith::faults::CohesiveDataHex8Lagrange::_materialIds[] = {
@@ -87,15 +87,15 @@
 const int pylith::faults::CohesiveDataHex8Lagrange::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataHex8Lagrange::_groupSizes[] = 
-  { 12, 8 };
+  { 8, 12 };
 
 const int pylith::faults::CohesiveDataHex8Lagrange::_groups[] = {
-  6, 7, 8, 9, 14, 15, 16, 17, 18, 19, 20, 21,
-  4, 5, 8, 9, 12, 13, 16, 17
+  5, 6, 9, 10, 13, 14, 17, 18,
+  7, 8, 9, 10, 15, 16, 17, 18, 19, 20, 21, 22
 };
 
 const char* pylith::faults::CohesiveDataHex8Lagrange::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataHex8Lagrange::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8b.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8b.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8b.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -26,9 +26,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,16 and vertices are 4-15.
+ * Cells are 0-1,2 and vertices are 3-18.
  *
- *       2,3,4,5 -------- 6,7,8,9 -- 14,15,16,17 -------- 10,11,12,13
+ *       3,4,5,6 -------- 7,8,9,10 -- 15,16,17,18 -------- 11,12,13,14
  *
  *                        ^^^^^^^^^^^^^^^^^^^^^^ Cohesive element
  *
@@ -70,9 +70,9 @@
 };
 
 const int pylith::faults::CohesiveDataHex8b::_cells[] = {
-  2, 14, 15,  3,  4, 16, 17,  5,
-  6, 10, 11,  7,  8, 12, 13,  9,
-  7,  6, 8, 9, 15, 14, 16, 17,
+  3, 15, 16,  4,  5, 17, 18,  6,
+  7, 11, 12,  8,  9, 13, 14, 10,
+  8,  7,  9, 10, 16, 15, 17, 18,
 };
 
 const int pylith::faults::CohesiveDataHex8b::_materialIds[] = {
@@ -86,12 +86,12 @@
   { 8, 8 };
 
 const int pylith::faults::CohesiveDataHex8b::_groups[] = {
-  6, 7, 8, 9, 14, 15, 16, 17,
-  4, 5, 8, 9, 12, 13, 16, 17
+  5, 6, 9, 10, 13, 14, 17, 18,
+  7, 8, 9, 10, 15, 16, 17, 18
 };
 
 const char* pylith::faults::CohesiveDataHex8b::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataHex8b::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8c.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8c.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8c.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -26,9 +26,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,16 and vertices are 4-15.
+ * Cells are 0-1,2 and vertices are 3-18.
  *
- *       2,3,4,5 -------- 6,7,8,9 -- 14,15,16,17 -------- 10,11,12,13
+ *       3,4,5,6 -------- 7,8,9,10 -- 15,16,17,18 -------- 11,12,13,14
  *
  *                        ^^^^^^^^^^^^^^^^^^^^^^ Cohesive element
  *
@@ -70,9 +70,9 @@
 };
 
 const int pylith::faults::CohesiveDataHex8c::_cells[] = {
-  6,  8,  9,  7,  2,  4,  5,  3,
- 10, 12, 13, 11, 14, 16, 17, 15,
-  7,  9,  8,  6, 15, 17, 16, 14,
+  7,  9, 10,  8,  3,  5,  6,  4,
+ 11, 13, 14, 12, 15, 17, 18, 16,
+  8, 10,  9,  7, 16, 18, 17, 15,
 };
 
 const int pylith::faults::CohesiveDataHex8c::_materialIds[] = {
@@ -86,12 +86,12 @@
   { 8, 8 };
 
 const int pylith::faults::CohesiveDataHex8c::_groups[] = {
-  6, 7, 8, 9, 14, 15, 16, 17,
-  4, 5, 8, 9, 12, 13, 16, 17
+  5, 6, 9, 10, 13, 14, 17, 18,
+  7, 8, 9, 10, 15, 16, 17, 18
 };
 
 const char* pylith::faults::CohesiveDataHex8c::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataHex8c::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8d.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8d.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8d.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -26,9 +26,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,16 and vertices are 4-15.
+ * Cells are 0-1,2 and vertices are 3-18.
  *
- *       2,3,4,5 -------- 6,7,8,9 -- 14,15,16,17 -------- 10,11,12,13
+ *       3,4,5,6 -------- 7,8,9,10 -- 15,16,17,18 -------- 11,12,13,14
  *
  *                        ^^^^^^^^^^^^^^^^^^^^^^ Cohesive element
  *
@@ -70,9 +70,9 @@
 };
 
 const int pylith::faults::CohesiveDataHex8d::_cells[] = {
-  4,  8,  6,  2,  5,  9,  7,  3,
- 16, 12, 10, 14, 17, 13, 11, 15,
-  8, 6,  7,  9,  16, 14, 15, 17,
+  5,  9,  7,  3,  6, 10,  8,  4,
+ 17, 13, 11, 15, 18, 14, 12, 16,
+  9,  7,  8, 10, 17, 15, 16, 18,
 };
 
 const int pylith::faults::CohesiveDataHex8d::_materialIds[] = {
@@ -86,12 +86,12 @@
   { 8, 8 };
 
 const int pylith::faults::CohesiveDataHex8d::_groups[] = {
-  6, 7, 8, 9, 14, 15, 16, 17,
-  4, 5, 8, 9, 12, 13, 16, 17
+  5, 6, 9, 10, 13, 14, 17, 18,
+  7, 8, 9, 10, 15, 16, 17, 18
 };
 
 const char* pylith::faults::CohesiveDataHex8d::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataHex8d::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8e.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8e.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8e.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -26,9 +26,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,16 and vertices are 4-15.
+ * Cells are 0-1,2 and vertices are 3-18.
  *
- *       2,3,4,5 -------- 6,7,8,9 -- 14,15,16,17 -------- 10,11,12,13
+ *       3,4,5,6 -------- 7,8,9,10 -- 15,16,17,18 -------- 11,12,13,14
  *
  *                        ^^^^^^^^^^^^^^^^^^^^^^ Cohesive element
  *
@@ -70,9 +70,9 @@
 };
 
 const int pylith::faults::CohesiveDataHex8e::_cells[] = {
-  5,  9,  8,  4,  3,  7,  6,  2,
- 17, 13, 12, 16, 15, 11, 10, 14,
-  9, 8,  6,  7,  17, 16, 14, 15,
+  6, 10,  9,  5,  4,  8,  7,  3,
+ 18, 14, 13, 17, 16, 12, 11, 15,
+ 10,  9,  7,  8, 18, 17, 15, 16,
 };
 
 const int pylith::faults::CohesiveDataHex8e::_materialIds[] = {
@@ -86,12 +86,12 @@
   { 8, 8 };
 
 const int pylith::faults::CohesiveDataHex8e::_groups[] = {
-  6, 7, 8, 9, 14, 15, 16, 17,
-  4, 5, 8, 9, 12, 13, 16, 17
+  5, 6, 9, 10, 13, 14, 17, 18,
+  7, 8, 9, 10, 15, 16, 17, 18
 };
 
 const char* pylith::faults::CohesiveDataHex8e::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataHex8e::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8f.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8f.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8f.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -26,9 +26,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,16 and vertices are 4-15.
+ * Cells are 0-1,2 and vertices are 3-18.
  *
- *       2,3,4,5 -------- 6,7,8,9 -- 14,15,16,17 -------- 10,11,12,13
+ *       3,4,5,6 -------- 7,8,9,10 -- 15,16,17,18 -------- 11,12,13,14
  *
  *                        ^^^^^^^^^^^^^^^^^^^^^^ Cohesive element
  *
@@ -70,9 +70,9 @@
 };
 
 const int pylith::faults::CohesiveDataHex8f::_cells[] = {
-  3, 15, 17,  5,  2, 14, 16,  4,
-  7, 11, 13,  9,  6, 10, 12,  8,
-  9, 7, 6,  8,  17, 15, 14, 16,
+  4, 16, 18,  6,  3, 15, 17,  5,
+  8, 12, 14, 10,  7, 11, 13,  9,
+ 10,  8,  7,  9, 18, 16, 15, 17,
 };
 
 const int pylith::faults::CohesiveDataHex8f::_materialIds[] = {
@@ -86,12 +86,12 @@
   { 8, 8 };
 
 const int pylith::faults::CohesiveDataHex8f::_groups[] = {
-  6, 7, 8, 9, 14, 15, 16, 17,
-  4, 5, 8, 9, 12, 13, 16, 17
+  5, 6, 9, 10, 13, 14, 17, 18,
+  7, 8, 9, 10, 15, 16, 17, 18
 };
 
 const char* pylith::faults::CohesiveDataHex8f::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataHex8f::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8g.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8g.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8g.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -94,12 +94,12 @@
 };
 
 const int pylith::faults::CohesiveDataHex8g::_cells[] = {
-   4, 22, 23,  5,  6, 24, 25,  7,
    6, 24, 25,  7,  8, 26, 27,  9,
-  10, 16, 17, 11, 12, 18, 19, 13,
+   8, 26, 27,  9, 10, 28, 29, 11,
   12, 18, 19, 13, 14, 20, 21, 15,
-  11, 10, 12, 13, 23, 22, 24, 25,
+  14, 20, 21, 15, 16, 22, 23, 17,
   13, 12, 14, 15, 25, 24, 26, 27,
+  15, 14, 16, 17, 27, 26, 28, 29,
 };
 
 const int pylith::faults::CohesiveDataHex8g::_materialIds[] = {
@@ -110,15 +110,15 @@
 const int pylith::faults::CohesiveDataHex8g::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataHex8g::_groupSizes[] = 
-  { 12, 8 };
+  { 8, 12 };
 
 const int pylith::faults::CohesiveDataHex8g::_groups[] = {
-  10, 11, 12, 13, 14, 15, 22, 23, 24, 25, 26, 27,
-  8, 9, 14, 15, 20, 21, 26, 27
+  10, 11, 16, 17, 22, 23, 28, 29,
+  12, 13, 14, 15, 16, 17, 24, 25, 26, 27, 28, 29
 };
 
 const char* pylith::faults::CohesiveDataHex8g::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataHex8g::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8h.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8h.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8h.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -93,12 +93,12 @@
 };
 
 const int pylith::faults::CohesiveDataHex8h::_cells[] = {
-   4, 22, 23,  5,  6, 24, 25,  7,
-  19, 18, 20, 21, 13, 12, 14, 15,
-  11, 17, 19, 13, 10, 16, 18, 12,
-  27, 26,  8,  9, 25, 24,  6,  7,
-  13, 11, 10, 12, 25, 23, 22, 24,
+   6, 24, 25,  7,  8, 26, 27,  9,
+  21, 20, 22, 23, 15, 14, 16, 17,
+  13, 19, 21, 15, 12, 18, 20, 14,
+  29, 28, 10, 11, 27, 26,  8,  9,
   15, 13, 12, 14, 27, 25, 24, 26,
+  17, 15, 14, 16, 29, 27, 26, 28,
 };
 
 const int pylith::faults::CohesiveDataHex8h::_materialIds[] = {
@@ -109,15 +109,15 @@
 const int pylith::faults::CohesiveDataHex8h::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataHex8h::_groupSizes[] = 
-  { 12, 8 };
+  { 8, 12 };
 
 const int pylith::faults::CohesiveDataHex8h::_groups[] = {
-  10, 11, 12, 13, 14, 15, 22, 23, 24, 25, 26, 27,
-  8, 9, 14, 15, 20, 21, 26, 27
+  10, 11, 16, 17, 22, 23, 28, 29,
+  12, 13, 14, 15, 16, 17, 24, 25, 26, 27, 28, 29
 };
 
 const char* pylith::faults::CohesiveDataHex8h::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataHex8h::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8i.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8i.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8i.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -83,15 +83,15 @@
 };
 
 const int pylith::faults::CohesiveDataHex8i::_cells[] = {
-    8,  7, 20, 21, 13, 12, 23, 24,
-   14,  9, 10, 15, 13,  8, 21, 24,
-   15, 10, 11, 16, 24, 21, 22, 25,
-   30, 38, 28, 29, 35, 41, 33, 34,
-   41, 35, 30, 38, 42, 36, 31, 39,
-   27, 28, 38, 37, 32, 33, 41, 40,
-   15, 14, 13, 24, 19, 18, 17, 26,
-   20, 21, 24, 23, 37, 38, 41, 40,
-   24, 21, 22, 25, 41, 38, 39, 42,
+   10,  9, 22, 23, 15, 14, 25, 26,
+   16, 11, 12, 17, 15, 10, 23, 26,
+   17, 12, 13, 18, 26, 23, 24, 27,
+   32, 40, 30, 31, 37, 43, 35, 36,
+   43, 37, 32, 40, 44, 38, 33, 41,
+   29, 30, 40, 39, 34, 35, 43, 42,
+   17, 16, 15, 26, 21, 20, 19, 28,
+   22, 23, 26, 25, 39, 40, 43, 42,
+   26, 23, 24, 27, 43, 40, 41, 44,
 };
 
 const int pylith::faults::CohesiveDataHex8i::_materialIds[] = {
@@ -102,15 +102,15 @@
 const int pylith::faults::CohesiveDataHex8i::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataHex8i::_groupSizes[] = 
-  { 12, 10 };
+  { 10, 12 };
 
 const int pylith::faults::CohesiveDataHex8i::_groups[] = {
-  20, 21, 22, 23, 24, 25, 37, 38, 39, 40, 41, 42,
-  27, 28, 29, 30, 31, 32, 33, 34, 35, 36
+  29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+  22, 23, 24, 25, 26, 27, 39, 40, 41, 42, 43, 44
 };
 
 const char* pylith::faults::CohesiveDataHex8i::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataHex8i::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -23,7 +23,7 @@
  *   2 -------- 3 -------- 4
  *
  * After adding cohesive elements
- *   2 -------- 5 -- 3 -------- 4
+ *   3 -------- 6 -- 4 -------- 5
  */
 
 #include "CohesiveDataLine2.hh"
@@ -50,9 +50,9 @@
 };
 
 const int pylith::faults::CohesiveDataLine2::_cells[] = {
-       2,  5,
-       3,  4,
-       3,  5,
+       3,  6,
+       4,  5,
+       4,  6,
 };
 
 const int pylith::faults::CohesiveDataLine2::_materialIds[] = {
@@ -63,15 +63,15 @@
 const int pylith::faults::CohesiveDataLine2::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataLine2::_groupSizes[] = 
-  { 2, 3 };
+  { 3, 2 };
 
 const int pylith::faults::CohesiveDataLine2::_groups[] = {
-  3, 5,
-  2, 3, 5
+  3, 4, 6,
+  4, 6
 };
 
 const char* pylith::faults::CohesiveDataLine2::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataLine2::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2Lagrange.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2Lagrange.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2Lagrange.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -23,7 +23,7 @@
  *   2 -------- 3 -------- 4
  *
  * After adding cohesive elements
- *   2 -------- 5 -6- 3 -------- 4
+ *   3 -------- 6 -2- 4 -------- 5
  */
 
 #include "CohesiveDataLine2Lagrange.hh"
@@ -51,9 +51,9 @@
 };
 
 const int pylith::faults::CohesiveDataLine2Lagrange::_cells[] = {
-       2,  5,
-       3,  4,
-       3,  5,  6
+       3,  6,
+       4,  5,
+       4,  6,  7
 };
 
 const int pylith::faults::CohesiveDataLine2Lagrange::_materialIds[] = {
@@ -67,12 +67,12 @@
   { 3, 3 };
 
 const int pylith::faults::CohesiveDataLine2Lagrange::_groups[] = {
-  3, 5, 6,
-  2, 3, 5
+  3, 4, 6,
+  4, 6, 7
 };
 
 const char* pylith::faults::CohesiveDataLine2Lagrange::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataLine2Lagrange::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -33,9 +33,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,10 vertices are 2-9.
+ * Cells are 0-1,2 vertices are 3-10.
  *
- *       3 -------- 5 -- 9 -------- 7
+ *       4 -------- 6 --10 -------- 8
  *       |          |    |          |
  *       |          |    |          |
  *       |          |    |          |
@@ -44,7 +44,7 @@
  *       |          |    |          |
  *       |          |    |          |
  *       |          |    |          |
- *       2 -------- 4 -- 8 -------- 6
+ *       3 -------- 5 -- 9 -------- 7
  */
 
 #include "CohesiveDataQuad4.hh"
@@ -75,9 +75,9 @@
 };
 
 const int pylith::faults::CohesiveDataQuad4::_cells[] = {
-  2,  4,  5,  3,
-  6,  7,  9,  8,
-  4,  5,  8,  9,
+  3,  5,  6,  4,
+  7,  8, 10,  9,
+  5,  6,  9, 10,
 };
 
 const int pylith::faults::CohesiveDataQuad4::_materialIds[] = {
@@ -91,12 +91,12 @@
   { 4, 4 };
 
 const int pylith::faults::CohesiveDataQuad4::_groups[] = {
-  4, 5, 8, 9,
-  3, 5, 7, 9
+  4, 6, 8, 10,
+  5, 6, 9, 10
 };
 
 const char* pylith::faults::CohesiveDataQuad4::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataQuad4::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4Lagrange.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4Lagrange.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4Lagrange.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -33,9 +33,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,10 vertices are 2-9.
+ * Cells are 0-1,2 vertices are 3-10,11-12.
  *
- *       3 -------- 5 -11-  9 -------- 7
+ *       4 -------- 6 -12- 10 -------- 8
  *       |          |       |          |
  *       |          |       |          |
  *       |          |       |          |
@@ -44,7 +44,7 @@
  *       |          |       |          |
  *       |          |       |          |
  *       |          |       |          |
- *       2 -------- 4 -10-- 8 -------- 6
+ *       3 -------- 5 -11-- 9 -------- 7
  */
 
 #include "CohesiveDataQuad4Lagrange.hh"
@@ -77,9 +77,9 @@
 };
 
 const int pylith::faults::CohesiveDataQuad4Lagrange::_cells[] = {
-  2,  4,  5,  3,
-  6,  7,  9,  8,
-  4,  5,  8,  9, 10, 11
+  3,  5,  6,  4,
+  7,  8, 10,  9,
+  5,  6,  9, 10, 11, 12
 };
 
 const int pylith::faults::CohesiveDataQuad4Lagrange::_materialIds[] = {
@@ -90,15 +90,15 @@
 const int pylith::faults::CohesiveDataQuad4Lagrange::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataQuad4Lagrange::_groupSizes[] = 
-  { 6, 4 };
+  { 4, 6 };
 
 const int pylith::faults::CohesiveDataQuad4Lagrange::_groups[] = {
-  4, 5, 8, 9, 10, 11,
-  3, 5, 7, 9
+  4, 6, 8, 10,
+  5, 6, 9, 10, 11, 12
 };
 
 const char* pylith::faults::CohesiveDataQuad4Lagrange::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataQuad4Lagrange::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4b.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4b.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4b.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -33,9 +33,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,10 vertices are 2-9.
+ * Cells are 0-1,2 vertices are 3-10.
  *
- *       3 -------- 5 -- 9 -------- 7
+ *       4 -------- 6 --10 -------- 8
  *       |          |    |          |
  *       |          |    |          |
  *       |          |    |          |
@@ -44,7 +44,7 @@
  *       |          |    |          |
  *       |          |    |          |
  *       |          |    |          |
- *       2 -------- 4 -- 8 -------- 6
+ *       3 -------- 5 -- 9 -------- 7
  */
 
 #include "CohesiveDataQuad4b.hh"
@@ -75,9 +75,9 @@
 };
 
 const int pylith::faults::CohesiveDataQuad4b::_cells[] = {
-  4,  5,  3,  2,
-  7,  9,  8,  6,
-  4,  5,  8,  9,
+  5,  6,  4,  3,
+  8, 10,  9,  7,
+  5,  6,  9, 10,
 };
 
 const int pylith::faults::CohesiveDataQuad4b::_materialIds[] = {
@@ -91,12 +91,12 @@
   { 4, 4 };
 
 const int pylith::faults::CohesiveDataQuad4b::_groups[] = {
-  4, 5, 8, 9,
-  3, 5, 7, 9
+  4, 6, 8, 10,
+  5, 6, 9, 10
 };
 
 const char* pylith::faults::CohesiveDataQuad4b::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataQuad4b::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4c.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4c.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4c.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -33,9 +33,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,10 vertices are 2-9.
+ * Cells are 0-1,2 vertices are 3-10.
  *
- *       3 -------- 9 -- 5 -------- 7
+ *       4 --------10 -- 6 -------- 8
  *       |          |    |          |
  *       |          |    |          |
  *       |          |    |          |
@@ -44,7 +44,7 @@
  *       |          |    |          |
  *       |          |    |          |
  *       |          |    |          |
- *       2 -------- 8 -- 4 -------- 6
+ *       3 -------- 9 -- 5 -------- 7
  */
 
 #include "CohesiveDataQuad4c.hh"
@@ -75,9 +75,9 @@
 };
 
 const int pylith::faults::CohesiveDataQuad4c::_cells[] = {
-  9,  3,  2,  8,
-  5,  4,  6,  7,
-  5,  4,  9,  8,
+ 10,  4,  3,  9,
+  6,  5,  7,  8,
+  6,  5, 10,  9,
 };
 
 const int pylith::faults::CohesiveDataQuad4c::_materialIds[] = {
@@ -91,12 +91,12 @@
   { 4, 4 };
 
 const int pylith::faults::CohesiveDataQuad4c::_groups[] = {
-  4, 5, 8, 9,
-  3, 5, 7, 9
+  4, 6, 8, 10,
+  5, 6, 9, 10
 };
 
 const char* pylith::faults::CohesiveDataQuad4c::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataQuad4c::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4d.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4d.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4d.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -33,9 +33,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,10 vertices are 2-9.
+ * Cells are 0-1,2 vertices are 3-10.
  *
- *       3 -------- 9 -- 5 -------- 7
+ *       4 --------10 -- 6 -------- 8
  *       |          |    |          |
  *       |          |    |          |
  *       |          |    |          |
@@ -44,7 +44,7 @@
  *       |          |    |          |
  *       |          |    |          |
  *       |          |    |          |
- *       2 -------- 8 -- 4 -------- 6
+ *       3 -------- 9 -- 5 -------- 7
  */
 
 #include "CohesiveDataQuad4d.hh"
@@ -75,9 +75,9 @@
 };
 
 const int pylith::faults::CohesiveDataQuad4d::_cells[] = {
-  3,  2,  8,  9,
-  4,  6,  7,  5,
-  5,  4,  9,  8,
+  4,  3,  9, 10,
+  5,  7,  8,  6,
+  6,  5, 10,  9,
 };
 
 const int pylith::faults::CohesiveDataQuad4d::_materialIds[] = {
@@ -91,12 +91,12 @@
   { 4, 4 };
 
 const int pylith::faults::CohesiveDataQuad4d::_groups[] = {
-  4, 5, 8, 9,
-  3, 5, 7, 9
+  4, 6, 8, 10,
+  5, 6, 9, 10
 };
 
 const char* pylith::faults::CohesiveDataQuad4d::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataQuad4d::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4e.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4e.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4e.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -42,9 +42,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-3,16-17 vertices are 4-15.
+ * Cells are 0-3,4-5 vertices are 6-17.
  *
- *      10 --------15--11 --------12
+ *      12 --------17--13 --------14
  *       |          |   |          |
  *       |          |   |          |
  *       |          |   |          |
@@ -53,7 +53,7 @@
  *       |          |   |          |
  *       |          |   |          |
  *       |          |   |          |
- *       5 --------14-- 7 -------- 9
+ *       7 --------16-- 9 --------11
  *       |          |   |          |
  *       |          |   |          |
  *       |          |   |          |
@@ -62,7 +62,7 @@
  *       |          |   |          |
  *       |          |   |          |
  *       |          |   |          |
- *       4 --------13-- 6 -------- 8
+ *       6 --------15-- 8 --------10
  */
 
 #include "CohesiveDataQuad4e.hh"
@@ -100,12 +100,12 @@
 };
 
 const int pylith::faults::CohesiveDataQuad4e::_cells[] = {
-  4, 13, 14,  5,
-  6,  8,  9,  7,
-  5, 14, 15, 10,
-  7,  9, 12, 11,
-  7,  6, 14, 13,
- 11,  7, 15, 14,
+  6, 15, 16,  7,
+  8, 10, 11,  9,
+  7, 16, 17, 12,
+  9, 11, 14, 13,
+  9,  8, 16, 15,
+ 13,  9, 17, 16,
 };
 
 const int pylith::faults::CohesiveDataQuad4e::_materialIds[] = {
@@ -116,15 +116,15 @@
 const int pylith::faults::CohesiveDataQuad4e::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataQuad4e::_groupSizes[] = 
-  { 6, 4 };
+  { 4, 6 };
 
 const int pylith::faults::CohesiveDataQuad4e::_groups[] = {
-  6, 7, 11, 13, 14, 15,
-  5, 7, 9, 14
+  7, 9, 11, 16,
+  8, 9, 13, 15, 16, 17
 };
 
 const char* pylith::faults::CohesiveDataQuad4e::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataQuad4e::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4f.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4f.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4f.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -42,9 +42,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-3,16-17 vertices are 4-15.
+ * Cells are 0-3,4-5 vertices are 6-17.
  *
- *      10 --------15--11 --------12
+ *      12 --------17--13 --------14
  *       |          |   |          |
  *       |          |   |          |
  *       |          |   |          |
@@ -53,7 +53,7 @@
  *       |          |   |          |
  *       |          |   |          |
  *       |          |   |          |
- *       5 --------14---7 -------- 9
+ *       7 --------16-- 9 --------11
  *       |          |   |          |
  *       |          |   |          |
  *       |          |   |          |
@@ -62,7 +62,7 @@
  *       |          |   |          |
  *       |          |   |          |
  *       |          |   |          |
- *       4 --------13---6 -------- 8
+ *       6 --------15-- 8 --------10
  */
 
 #include "CohesiveDataQuad4f.hh"
@@ -100,12 +100,12 @@
 };
 
 const int pylith::faults::CohesiveDataQuad4f::_cells[] = {
-  5, 14, 15, 10,
-  7,  9, 12, 11,
-  6,  8,  9,  7,
-  4, 13, 14,  5,
-  7,  6, 14, 13,
- 11,  7, 15, 14,
+  7, 16, 17, 12,
+  9, 11, 14, 13,
+  8, 10, 11,  9,
+  6, 15, 16,  7,
+  9,  8, 16, 15,
+ 13,  9, 17, 16,
 };
 
 const int pylith::faults::CohesiveDataQuad4f::_materialIds[] = {
@@ -116,15 +116,15 @@
 const int pylith::faults::CohesiveDataQuad4f::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataQuad4f::_groupSizes[] = 
-  { 6, 4 };
+  { 4, 6 };
 
 const int pylith::faults::CohesiveDataQuad4f::_groups[] = {
-  6, 7, 11, 13, 14, 15,
-  5, 7, 9, 14
+  7, 9, 11, 16,
+  8, 9, 13, 15, 16, 17
 };
 
 const char* pylith::faults::CohesiveDataQuad4f::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataQuad4f::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4g.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4g.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4g.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -42,9 +42,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-4,19-20 vertices are 5-18.
+ * Cells are 0-4,5-6 vertices are 7-20.
  *
- *       7 --------12 -- 18 --------15
+ *       9 --------14 -- 20 --------17
  *       |          |     |          |
  *       |          |     |          |
  *       |          |     |          |
@@ -53,16 +53,16 @@
  *       |          |     |          |
  *       |          |     |          |
  *       |          |     |          |
- *       6 --------11 -- 17 --------14
+ *       8 --------13 -- 19 --------16
  *       |        / |     |          |
  *       |       /  |     |          |
  *       |      /   |     |          |
- *       5-----9    |     |          |
+ *       7-----11   |     |          |
  *             |    |     |          |
  *             |    |     |          |
  *             |    |     |          |
  *             |    |     |          |
- *             8---10 -- 16 --------13
+ *            10---12 -- 18 --------15
  */
 
 #include "CohesiveDataQuad4g.hh"
@@ -103,13 +103,13 @@
 };
 
 const int pylith::faults::CohesiveDataQuad4g::_cells[] = {
-  6, 11, 12,  7,
- 17, 16, 13, 14,
- 15, 18, 17, 14,
-  6,  5,  9, 11,
-  9,  8, 10, 11,
- 10, 11, 16, 17,
- 11, 12, 17, 18,
+  8, 13, 14,  9,
+ 19, 18, 15, 16,
+ 17, 20, 19, 16,
+  8,  7, 11, 13,
+ 11, 10, 12, 13,
+ 12, 13, 18, 19,
+ 13, 14, 19, 20,
 };
 
 const int pylith::faults::CohesiveDataQuad4g::_materialIds[] = {
@@ -120,15 +120,15 @@
 const int pylith::faults::CohesiveDataQuad4g::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataQuad4g::_groupSizes[] = 
-  { 6, 3 };
+  { 3, 6 };
 
 const int pylith::faults::CohesiveDataQuad4g::_groups[] = {
-  10, 11, 12, 16, 17, 18,
-  13, 14, 15
+  15, 16, 17,
+  12, 13, 14, 18, 19, 20
 };
 
 const char* pylith::faults::CohesiveDataQuad4g::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataQuad4g::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4h.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4h.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4h.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -39,26 +39,26 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-8,16-17 vertices are 9-24.
+ * Cells are 0-8,9-11 vertices are 12-32.
  *
- * 9 ----10 ----25-11 ----12
+ *12 ----13 ----28-14 ----15
  * |      |      |  |      |
- * |  0   |  1   |30|  2   |
+ * |  0   |  1   | 9|  2   |
  * |      |      |  |      |
  * |      |      |  |      |
- *13 ----14 ----26-15 ----16
+ *16 ----17 ----29-18 ----19
  * |      |      |  |      |
- * |  3   |  4   |31|  5   |
+ * |  3   |  4   |10|  5   |
  * |      |      |  |      |
  * |      |      |  |      |
- *28 ----29-----27-19 ----20
- * |  32  |      |         |
- *17 ----18      |         |
+ *31 ----32-----30-22 ----23
+ * |  11  |      |         |
+ *20 ----21      |         |
  * |      |   7  |     8   |
  * |  6   |      |         |
  * |      |      |         |
  * |      |      |         |
- *21 ----22 ----23--------24
+ *24 ----25 ----26--------27
  *
  */
 
@@ -112,18 +112,18 @@
 };
 
 const int pylith::faults::CohesiveDataQuad4h::_cells[] = {
-   9, 13, 14, 10,
-  10, 14, 26, 25,
-  11, 15, 16, 12,
-  13, 28, 29, 14,
-  14, 29, 27, 26,
-  15, 19, 20, 16,
-  17, 21, 22, 18,
-  29, 22, 23, 27,
-  27, 23, 24, 20,
-  11, 15, 25, 26,
-  15, 19, 26, 27,
-  18, 17, 29, 28,
+  12, 16, 17, 13,
+  13, 17, 29, 28,
+  14, 18, 19, 15,
+  16, 31, 32, 17,
+  17, 32, 30, 29,
+  18, 22, 23, 19,
+  20, 24, 25, 21,
+  32, 25, 26, 30,
+  30, 26, 27, 23,
+  14, 18, 28, 29,
+  18, 22, 29, 30,
+  21, 20, 32, 31,
 };
 
 const int pylith::faults::CohesiveDataQuad4h::_materialIds[] = {
@@ -134,15 +134,15 @@
 const int pylith::faults::CohesiveDataQuad4h::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataQuad4h::_groupSizes[] = 
-  { 6, 4 };
+  { 4, 6 };
 
 const int pylith::faults::CohesiveDataQuad4h::_groups[] = {
-  11, 15, 19, 25, 26, 27,
-  17, 18, 28, 29,
+  20, 21, 31, 32,
+  14, 18, 22, 28, 29, 30
 };
 
 const char* pylith::faults::CohesiveDataQuad4h::_groupNames[] = {
-  "faultA", "faultB"
+  "faultB", "faultA"
 };
 
 const char* pylith::faults::CohesiveDataQuad4h::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -26,9 +26,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,10, vertices are 2-9.
+ * Cells are 0-1,2, vertices are 3-10.
  *
- * 2   3,4,5  7,8,9   6
+ * 3   4,5,6  8,9,10   7
  *
  *     ^^^^^^^^^^^^ Cohesive element in x-y plane.
  */
@@ -61,9 +61,9 @@
 };
 
 const int pylith::faults::CohesiveDataTet4::_cells[] = {
-  3,  4,  5,  2,
-  7,  9,  8,  6,
-  4,  3,  5,  8,  7,  9
+  4,  5,  6,  3,
+  8, 10,  9,  7,
+  5,  4,  6,  9,  8, 10
 };
 
 const int pylith::faults::CohesiveDataTet4::_materialIds[] = {
@@ -74,15 +74,15 @@
 const int pylith::faults::CohesiveDataTet4::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataTet4::_groupSizes[] = 
-  { 6, 5 };
+  { 5, 6 };
 
 const int pylith::faults::CohesiveDataTet4::_groups[] = {
-  3, 4, 5, 7, 8, 9,
-  2, 4, 5, 8, 9
+  3, 5, 6, 9, 10,
+  4, 5, 6, 8,  9, 10
 };
 
 const char* pylith::faults::CohesiveDataTet4::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTet4::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4Lagrange.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4Lagrange.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4Lagrange.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -26,10 +26,10 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,10, vertices are 2-9.
+ * Cells are 0-1,2, vertices are 3-10,11-13.
  *
- * 2   3,4,5  7,9,11   6
- *             8,10,12
+ * 3   4,5,6  8,9,10   7
+ *             11,12,13
  *     ^^^^^^^^^^^^ Cohesive element in x-y plane.
  */
 
@@ -64,9 +64,9 @@
 };
 
 const int pylith::faults::CohesiveDataTet4Lagrange::_cells[] = {
-  3,  4,  5,  2,
-  7,  9,  8,  6,
-  4,  3,  5,  8,  7,   9,  11, 10, 12
+  4,  5,  6,  3,
+  8, 10,  9,  7,
+  5,  4,  6,  9,  8,  10,  12, 11, 13
 };
 
 const int pylith::faults::CohesiveDataTet4Lagrange::_materialIds[] = {
@@ -77,15 +77,15 @@
 const int pylith::faults::CohesiveDataTet4Lagrange::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataTet4Lagrange::_groupSizes[] = 
-  { 9, 5 };
+  { 5, 9 };
 
 const int pylith::faults::CohesiveDataTet4Lagrange::_groups[] = {
-  3, 4, 5, 7, 8, 9, 10, 11, 12,
-  2, 4, 5, 8, 9
+  3, 5, 6, 9, 10,
+  4, 5, 6, 8,  9, 10, 11, 12, 13
 };
 
 const char* pylith::faults::CohesiveDataTet4Lagrange::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTet4Lagrange::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4b.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4b.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4b.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -26,9 +26,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,10, vertices are 2-9.
+ * Cells are 0-1,2, vertices are 3-10.
  *
- * 2   3,4,5  7,8,9   6
+ * 3   4,5,6  8,9,10   7
  *
  *     ^^^^^^^^^^^^ Cohesive element in x-y plane.
  */
@@ -61,9 +61,9 @@
 };
 
 const int pylith::faults::CohesiveDataTet4b::_cells[] = {
-  2,  7,  9,  8,
-  3,  6,  5,  4,
-  5,  3,  4,  9,  7,  8
+  3,  8, 10,  9,
+  4,  7,  6,  5,
+  6,  4,  5, 10,  8,  9
 };
 
 const int pylith::faults::CohesiveDataTet4b::_materialIds[] = {
@@ -74,15 +74,15 @@
 const int pylith::faults::CohesiveDataTet4b::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataTet4b::_groupSizes[] = 
-  { 6, 5 };
+  { 5, 6 };
 
 const int pylith::faults::CohesiveDataTet4b::_groups[] = {
-  3, 4, 5, 7, 8, 9,
-  2, 4, 5, 8, 9
+  3, 5, 6, 9, 10,
+  4, 5, 6, 8,  9, 10
 };
 
 const char* pylith::faults::CohesiveDataTet4b::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTet4b::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4c.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4c.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4c.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -26,9 +26,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,10, vertices are 2-9.
+ * Cells are 0-1,2, vertices are 3-10.
  *
- * 2   3,4,5  7,8,9   6
+ * 3   4,5,6  8,9,10   7
  *
  *     ^^^^^^^^^^^^ Cohesive element in x-y plane.
  */
@@ -61,9 +61,9 @@
 };
 
 const int pylith::faults::CohesiveDataTet4c::_cells[] = {
-  5,  4,  2,  3,
-  6,  8,  9,  7,
-  4,  3,  5,  8,  7,  9,
+  6,  5,  3,  4,
+  7,  9, 10,  8,
+  5,  4,  6,  9,  8, 10,
 };
 
 const int pylith::faults::CohesiveDataTet4c::_materialIds[] = {
@@ -74,15 +74,15 @@
 const int pylith::faults::CohesiveDataTet4c::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataTet4c::_groupSizes[] = 
-  { 6, 5 };
+  { 5, 6 };
 
 const int pylith::faults::CohesiveDataTet4c::_groups[] = {
-  3, 4, 5, 7, 8, 9,
-  2, 4, 5, 8, 9
+  3, 5, 6, 9, 10,
+  4, 5, 6, 8,  9, 10
 };
 
 const char* pylith::faults::CohesiveDataTet4c::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTet4c::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4d.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4d.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4d.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -28,7 +28,7 @@
  *
  * Cells are 0-1,10, vertices are 2-9.
  *
- * 2   3,4,5  7,8,9   6
+ * 3   4,5,6  8,9,10   7
  *
  *     ^^^^^^^^^^^^ Cohesive element in x-y plane.
  */
@@ -61,9 +61,9 @@
 };
 
 const int pylith::faults::CohesiveDataTet4d::_cells[] = {
-  3,  2,  4,  5,
-  7,  8,  6,  9,
-  4,  3,  5,  8,  7,  9
+  4,  3,  5,  6,
+  8,  9,  7, 10,
+  5,  4,  6,  9,  8, 10
 };
 
 const int pylith::faults::CohesiveDataTet4d::_materialIds[] = {
@@ -74,15 +74,15 @@
 const int pylith::faults::CohesiveDataTet4d::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataTet4d::_groupSizes[] = 
-  { 6, 5 };
+  { 5, 6 };
 
 const int pylith::faults::CohesiveDataTet4d::_groups[] = {
-  3, 4, 5, 7, 8, 9,
-  2, 4, 5, 8, 9
+  3, 5, 6, 9, 10,
+  4, 5, 6, 8,  9, 10
 };
 
 const char* pylith::faults::CohesiveDataTet4d::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTet4d::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4f.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4f.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4f.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -26,9 +26,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,10, vertices are 2-9.
+ * Cells are 0-1,2, vertices are 3-10.
  *
- * 2   7,8,9  3,4,5    6
+ * 3   8,9,10  4,5,6    7
  *
  *     ^^^^^^^^^^^^ Cohesive element in x-y plane.
  */
@@ -61,9 +61,9 @@
 };
 
 const int pylith::faults::CohesiveDataTet4f::_cells[] = {
-  3,  5,  4,  6,
-  7,  8,  9,  2,
-  5,  3,  4,  9,  7,  8
+  4,  6,  5,  7,
+  8,  9, 10,  3,
+  6,  4,  5, 10,  8,  9
 };
 
 const int pylith::faults::CohesiveDataTet4f::_materialIds[] = {
@@ -74,15 +74,15 @@
 const int pylith::faults::CohesiveDataTet4f::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataTet4f::_groupSizes[] = 
-  { 6, 5 };
+  { 5, 6 };
 
 const int pylith::faults::CohesiveDataTet4f::_groups[] = {
-  3, 4, 5, 7, 8, 9,
-  2, 4, 5, 8, 9
+  3, 5, 6, 9, 10,
+  4, 5, 6, 8,  9, 10
 };
 
 const char* pylith::faults::CohesiveDataTet4f::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTet4f::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4g.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4g.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4g.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -26,9 +26,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,10, vertices are 2-9.
+ * Cells are 0-1,2, vertices are 3-10.
  *
- * 2   3,4,5  7,8,9   6
+ * 3   4,5,6  8,9,10   7
  *
  *     ^^^^^^^^^^^^ Cohesive element in x-y plane.
  */
@@ -61,9 +61,9 @@
 };
 
 const int pylith::faults::CohesiveDataTet4g::_cells[] = {
-  3,  5,  4,  6,
-  7,  9,  2,  8,
-  5,  3,  4,  9,  7,  8
+  4,  6,  5,  7,
+  8, 10,  3,  9,
+  6,  4,  5, 10,  8,  9
 };
 
 const int pylith::faults::CohesiveDataTet4g::_materialIds[] = {
@@ -74,15 +74,15 @@
 const int pylith::faults::CohesiveDataTet4g::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataTet4g::_groupSizes[] = 
-  { 6, 5 };
+  { 5, 6 };
 
 const int pylith::faults::CohesiveDataTet4g::_groups[] = {
-  3, 4, 5, 7, 8, 9,
-  2, 4, 5, 8, 9
+  3, 5, 6, 9, 10,
+  4, 5, 6, 8,  9, 10
 };
 
 const char* pylith::faults::CohesiveDataTet4g::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTet4g::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4h.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4h.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4h.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -26,9 +26,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,10, vertices are 2-9.
+ * Cells are 0-1,2, vertices are 3-10.
  *
- * 2   3,4,5  7,8,9   6
+ * 3   4,5,6  8,9,10   7
  *
  *     ^^^^^^^^^^^^ Cohesive element in x-y plane.
  */
@@ -61,9 +61,9 @@
 };
 
 const int pylith::faults::CohesiveDataTet4h::_cells[] = {
-  9,  8,  2,  7,
-  5,  4,  3,  6,
-  4,  5,  3,  8,  9,  7
+ 10,  9,  3,  8,
+  6,  5,  4,  7,
+  5,  6,  4,  9, 10,  8
 };
 
 const int pylith::faults::CohesiveDataTet4h::_materialIds[] = {
@@ -74,15 +74,15 @@
 const int pylith::faults::CohesiveDataTet4h::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataTet4h::_groupSizes[] = 
-  { 6, 5 };
+  { 5, 6 };
 
 const int pylith::faults::CohesiveDataTet4h::_groups[] = {
-  3, 4, 5, 7, 8, 9,
-  2, 4, 5, 8, 9
+  3, 5, 6, 9, 10,
+  4, 5, 6, 8,  9, 10
 };
 
 const char* pylith::faults::CohesiveDataTet4h::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTet4h::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4i.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4i.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4i.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -26,7 +26,7 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-3,14-15, vertices are 4-13.
+ * Cells are 0-3,4-5, vertices are 6-15.
  *
  * 4   5,6,7,8  10,11,12,13    9
  *
@@ -66,12 +66,12 @@
 };
 
 const int pylith::faults::CohesiveDataTet4i::_cells[] = {
-  5,  6,  7,  4,
- 10, 12, 11,  9,
- 13,  9, 12, 10,
-  4,  5,  8,  7,
-  8,  7,  5, 13, 12, 10,
-  7,  6,  5, 12, 11, 10,
+  7,  8,  9,  6,
+ 12, 14, 13, 11,
+ 15, 11, 14, 12,
+  6,  7, 10,  9,
+ 10,  9,  7, 15, 14, 12,
+  9,  8,  7, 14, 13, 12,
 };
 
 const int pylith::faults::CohesiveDataTet4i::_materialIds[] = {
@@ -82,15 +82,15 @@
 const int pylith::faults::CohesiveDataTet4i::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataTet4i::_groupSizes[] = 
-  { 8, 2 };
+  { 2, 8 };
 
 const int pylith::faults::CohesiveDataTet4i::_groups[] = {
-  5, 6, 7, 8, 10, 11, 12, 13,
-  4, 9
+  6, 11,
+  7,  8, 9, 10, 12, 13, 14, 15
 };
 
 const char* pylith::faults::CohesiveDataTet4i::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTet4i::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4j.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4j.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4j.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -18,7 +18,7 @@
 
 /* Original mesh
  *
- * Cells are 0-5, vertices are 6-17.
+ * Cells are 0-5,6 vertices are 7-18.
  */
 
 #include "CohesiveDataTet4j.hh"
@@ -57,13 +57,13 @@
 };
 
 const int pylith::faults::CohesiveDataTet4j::_cells[] = {
-   7,  9,  8,  6,
-  17, 15, 13, 14,
-  16, 13, 17, 15,
-  10,  9, 11,  7,
-  15, 13, 14, 12,
-   7, 11,  8,  9,
-   9, 10, 11, 15, 16, 17
+   8, 10,  9,  7,
+  18, 16, 14, 15,
+  17, 14, 18, 16,
+  11, 10, 12,  8,
+  16, 14, 15, 13,
+   8, 12,  9, 10,
+  10, 11, 12, 16, 17, 18
 };
 
 const int pylith::faults::CohesiveDataTet4j::_materialIds[] = {
@@ -74,15 +74,15 @@
 const int pylith::faults::CohesiveDataTet4j::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataTet4j::_groupSizes[] = 
-  { 6, 8 };
+  { 8, 6 };
 
 const int pylith::faults::CohesiveDataTet4j::_groups[] = {
-  9, 10, 11, 15, 16, 17,
-  6, 8, 9, 11, 12, 14, 15, 17
+  7,  9, 10, 12, 13, 15, 16, 18,
+ 10, 11, 12, 16, 17, 18
 };
 
 const char* pylith::faults::CohesiveDataTet4j::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTet4j::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -35,19 +35,19 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1, 8, vertices are 2-7.
+ * Cells are 0-1, 2, vertices are 3-8.
  *
- *              6 -- 3
+ *              7 -- 4
  *             /|    |\
  *            / |    | \
  *           /  |    |  \
  *          /   |    |   \
- *         2    |    |    5
+ *         3    |    |    6
  *          \   |    |   /
  *           \  |    |  /
  *            \ |    | /
  *             \|    |/
- *              7 -- 4
+ *              8 -- 5
  */
 
 #include "CohesiveDataTri3.hh"
@@ -76,9 +76,9 @@
 };
 
 const int pylith::faults::CohesiveDataTri3::_cells[] = {
-  2,  7,  6,
-  3,  4,  5,
-  3,  4,  6, 7
+  3,  8,  7,
+  4,  5,  6,
+  4,  5,  7, 8
 };
 
 const int pylith::faults::CohesiveDataTri3::_materialIds[] = {
@@ -89,15 +89,15 @@
 const int pylith::faults::CohesiveDataTri3::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataTri3::_groupSizes[] = 
-  { 4, 5 };
+  { 5, 4 };
 
 const int pylith::faults::CohesiveDataTri3::_groups[] = {
-  3, 4, 6, 7,
-  3, 4, 5, 6, 7
+  4, 5, 6, 7, 8,
+  4, 5, 7, 8
 };
 
 const char* pylith::faults::CohesiveDataTri3::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTri3::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3Lagrange.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3Lagrange.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3Lagrange.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -35,19 +35,19 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1, 8, vertices are 2-7.
+ * Cells are 0-1, 2, vertices are 3-8,9-10.
  *
- *              6 -8- 3
+ *              7 -9- 4
  *             /|     |\
  *            / |     | \
  *           /  |     |  \
  *          /   |     |   \
- *         2    |     |    5
+ *         3    |     |    6
  *          \   |     |   /
  *           \  |     |  /
  *            \ |     | /
  *             \|     |/
- *              7 -9- 4
+ *              8-10- 5
  */
 
 #include "CohesiveDataTri3Lagrange.hh"
@@ -78,9 +78,9 @@
 };
 
 const int pylith::faults::CohesiveDataTri3Lagrange::_cells[] = {
-  2,  7,  6,
-  3,  4,  5,
-  3,  4,  6,  7,  8,  9
+  3,  8,  7,
+  4,  5,  6,
+  4,  5,  7,  8,  9,  10
 };
 
 const int pylith::faults::CohesiveDataTri3Lagrange::_materialIds[] = {
@@ -91,15 +91,15 @@
 const int pylith::faults::CohesiveDataTri3Lagrange::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataTri3Lagrange::_groupSizes[] = 
-  { 6, 5 };
+  { 5, 6 };
 
 const int pylith::faults::CohesiveDataTri3Lagrange::_groups[] = {
-  3, 4, 6, 7, 8, 9,
-  3, 4, 5, 6, 7
+  4, 5, 6, 7, 8,
+  4, 5, 7, 8, 9, 10
 };
 
 const char* pylith::faults::CohesiveDataTri3Lagrange::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTri3Lagrange::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3b.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3b.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3b.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -35,19 +35,19 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1, 8, vertices are 2-7.
+ * Cells are 0-1, 2, vertices are 3-8.
  *
- *              3 -- 6
+ *              4 -- 7
  *             /|    |\
  *            / |    | \
  *           /  |    |  \
  *          /   |    |   \
- *         2    |    |    5
+ *         3    |    |    6
  *          \   |    |   /
  *           \  |    |  /
  *            \ |    | /
  *             \|    |/
- *              4 -- 7
+ *              5 -- 8
  */
 
 #include "CohesiveDataTri3b.hh"
@@ -76,9 +76,9 @@
 };
 
 const int pylith::faults::CohesiveDataTri3b::_cells[] = {
-  4,  3,  2,
-  7,  5,  6,
-  4,  3,  7, 6
+  5,  4,  3,
+  8,  6,  7,
+  5,  4,  8, 7
 };
 
 const int pylith::faults::CohesiveDataTri3b::_materialIds[] = {
@@ -89,15 +89,15 @@
 const int pylith::faults::CohesiveDataTri3b::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataTri3b::_groupSizes[] = 
-  { 4, 5 };
+  { 5, 4 };
 
 const int pylith::faults::CohesiveDataTri3b::_groups[] = {
-  3, 4, 6, 7,
-  3, 4, 5, 6, 7
+  4, 5, 6, 7, 8,
+  4, 5, 7, 8
 };
 
 const char* pylith::faults::CohesiveDataTri3b::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTri3b::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3c.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3c.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3c.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -35,19 +35,19 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1, 8, vertices are 2-7.
+ * Cells are 0-1, 2, vertices are 3-8.
  *
- *              3 -- 6
+ *              4 -- 7
  *             /|    |\
  *            / |    | \
  *           /  |    |  \
  *          /   |    |   \
- *         2    |    |    5
+ *         3    |    |    6
  *          \   |    |   /
  *           \  |    |  /
  *            \ |    | /
  *             \|    |/
- *              4 -- 7
+ *              5 -- 8
  */
 
 #include "CohesiveDataTri3c.hh"
@@ -76,9 +76,9 @@
 };
 
 const int pylith::faults::CohesiveDataTri3c::_cells[] = {
-  3,  2,  4,
-  5,  6,  7,
-  4,  3,  7, 6
+  4,  3,  5,
+  6,  7,  8,
+  5,  4,  8, 7
 };
 
 const int pylith::faults::CohesiveDataTri3c::_materialIds[] = {
@@ -89,15 +89,15 @@
 const int pylith::faults::CohesiveDataTri3c::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataTri3c::_groupSizes[] = 
-  { 4, 5 };
+  { 5, 4 };
 
 const int pylith::faults::CohesiveDataTri3c::_groups[] = {
-  3, 4, 6, 7,
-  3, 4, 5, 6, 7
+  4, 5, 6, 7, 8,
+  4, 5, 7, 8
 };
 
 const char* pylith::faults::CohesiveDataTri3c::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTri3c::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3d.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3d.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3d.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -41,26 +41,26 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-3, 13-14, vertices are 4-12.
+ * Cells are 0-3, 4-5, vertices are 6-14.
  *
- *         9
+ *        11
  *        / \
  *       /   \
  *      /     \
  *     /       \
- *    8---------  5
+ *   10---------  7
  *    |          /|
- *   12--------10 |
+ *   14--------12 |
  *     \       /| |\
  *      \     / | | \
  *       \   /  | |  \
  *        \ /   | |   \
- *         4    | |    7
+ *         6    | |    9
  *          \   | |   /
  *           \  | |  /
  *            \ | | /
  *             \| |/
- *             11-6
+ *             13-8
  */
 
 #include "CohesiveDataTri3d.hh"
@@ -95,12 +95,12 @@
 };
 
 const int pylith::faults::CohesiveDataTri3d::_cells[] = {
-  4, 11, 10,
-  5,  6,  7,
- 12,  4, 10,
-  8,  5,  9,
-  8,  5, 12, 10,
-  5,  6, 10, 11,
+  6, 13, 12,
+  7,  8,  9,
+ 14,  6, 12,
+ 10,  7, 11,
+ 10,  7, 14, 12,
+  7,  8, 12, 13,
 };
 
 const int pylith::faults::CohesiveDataTri3d::_materialIds[] = {
@@ -111,15 +111,15 @@
 const int pylith::faults::CohesiveDataTri3d::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataTri3d::_groupSizes[] = 
-  { 6, 5 };
+  { 5, 6 };
 
 const int pylith::faults::CohesiveDataTri3d::_groups[] = {
-  5, 6, 8, 10, 11, 12,
-  5, 6, 7, 10, 11
+  7, 8,  9, 12, 13,
+  7, 8, 10, 12, 13, 14
 };
 
 const char* pylith::faults::CohesiveDataTri3d::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTri3d::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3e.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3e.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3e.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -41,26 +41,26 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-3, 13-14, vertices are 4-12.
+ * Cells are 0-3, 4-5, vertices are 6-14.
  *
- *         9
+ *        11
  *        / \
  *       /   \
  *      /     \
  *     /       \
- *    8---------  5
+ *   10---------  7
  *    |          /|
- *   12--------10 |\
+ *   14--------12 |\
  *     \       /| | \
  *      \     / | |  \
  *       \   /  | |   \
  *        \ /   | |    \
- *         4    | |    7
+ *         6    | |    9
  *          \   | |   /
  *           \  | |  /
  *            \ | | /
  *             \| |/
- *             11-6
+ *             13-8
  */
 
 #include "CohesiveDataTri3e.hh"
@@ -95,12 +95,12 @@
 };
 
 const int pylith::faults::CohesiveDataTri3e::_cells[] = {
-  4, 11, 10,
-  5,  6,  7,
-  8,  5,  9,
- 12,  4, 10,
-  5,  6, 10, 11,
-  8,  5, 12, 10,
+  6, 13, 12,
+  7,  8,  9,
+ 10,  7, 11,
+ 14,  6, 12,
+  7,  8, 12, 13,
+ 10,  7, 14, 12,
 };
 
 const int pylith::faults::CohesiveDataTri3e::_materialIds[] = {
@@ -111,15 +111,15 @@
 const int pylith::faults::CohesiveDataTri3e::_numGroups = 2;
 
 const int pylith::faults::CohesiveDataTri3e::_groupSizes[] = 
-  { 6, 5 };
+  { 5, 6 };
 
 const int pylith::faults::CohesiveDataTri3e::_groups[] = {
-  5, 6, 8, 10, 11, 12,
-  5, 6, 7, 10, 11
+  7, 8,  9, 12, 13,
+  7, 8, 10, 12, 13, 14
 };
 
 const char* pylith::faults::CohesiveDataTri3e::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTri3e::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3f.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3f.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3f.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -33,18 +33,18 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-3, 12, vertices are 4-11.
+ * Cells are 0-3, 4, vertices are 5-12.
  *
- *       5 -------- 7 --11 -------- 9
+ *       6 -------- 8 --12 --------10
  *       |        / |    |        / |
  *       |       /  |    |       /  |
  *       |  0   /   |    |  1   /   |
- *       |     /    | 12 |     /    |
+ *       |     /    |  4 |     /    |
  *       |    /     |    |    /     |
  *       |   /      |    |   /      |
  *       |  /   3   |    |  /   2   |
  *       | /        |    | /        |
- *       4 -------- 6 --10--------- 8
+ *       5 -------- 7 --11--------- 9
  */
 
 #include "CohesiveDataTri3f.hh"
@@ -77,11 +77,11 @@
 };
 
 const int pylith::faults::CohesiveDataTri3f::_cells[] = {
-  4,  7,  5,
-  9, 11, 10,
- 10,  8,  9,
-  6,  7,  4,
-  6,  7, 10, 11,
+  5,  8,  6,
+ 10, 12, 11,
+ 11,  9, 10,
+  7,  8,  5,
+  7,  8, 11, 12,
 };
 
 const int pylith::faults::CohesiveDataTri3f::_materialIds[] = {
@@ -95,12 +95,12 @@
   { 4, 4 };
 
 const int pylith::faults::CohesiveDataTri3f::_groups[] = {
-  6, 7, 10, 11,
-  5, 7, 9, 11
+  6, 8, 10, 12,
+  7, 8, 11, 12
 };
 
 const char* pylith::faults::CohesiveDataTri3f::_groupNames[] = {
-  "fault", "output"
+  "output", "fault"
 };
 
 const char* pylith::faults::CohesiveDataTri3f::_groupTypes[] = {

Modified: short/3D/PyLith/trunk/unittests/libtests/feassemble/TestQuadrature.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/feassemble/TestQuadrature.cc	2013-03-10 04:00:59 UTC (rev 21484)
+++ short/3D/PyLith/trunk/unittests/libtests/feassemble/TestQuadrature.cc	2013-03-10 20:35:51 UTC (rev 21485)
@@ -238,8 +238,8 @@
 #if defined(PRECOMPUTE_GEOMETRY)
     quadrature.retrieveGeometry(c);
 #else
-    const PetscScalar *coords = PETSC_NULL;
-    PetscInt           coordsSize;
+    PetscScalar *coords = PETSC_NULL;
+    PetscInt     coordsSize;
 
     err = DMPlexVecGetClosure(dmMesh, coordSection, coordVec, c, &coordsSize, &coords);CHECK_PETSC_ERROR(err);
     for(PetscInt i = 0; i < coordsSize; ++i) {coordinatesCell[i] = coords[i];}



More information about the CIG-COMMITS mailing list