[cig-commits] r13432 - in short/3D/PyLith/trunk: libsrc/bc libsrc/faults libsrc/feassemble libsrc/meshio libsrc/utils modulesrc/bc modulesrc/faults unittests/libtests/bc

knepley at geodynamics.org knepley at geodynamics.org
Mon Dec 1 15:23:37 PST 2008


Author: knepley
Date: 2008-12-01 15:23:36 -0800 (Mon, 01 Dec 2008)
New Revision: 13432

Modified:
   short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc
   short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.hh
   short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc
   short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.hh
   short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.icc
   short/3D/PyLith/trunk/libsrc/bc/Neumann.cc
   short/3D/PyLith/trunk/libsrc/bc/Neumann.hh
   short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
   short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.hh
   short/3D/PyLith/trunk/libsrc/faults/Fault.cc
   short/3D/PyLith/trunk/libsrc/faults/Fault.hh
   short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
   short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.hh
   short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature.hh
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature0D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature0D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.hh
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.cc
   short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.hh
   short/3D/PyLith/trunk/libsrc/meshio/OutputSolnSubset.cc
   short/3D/PyLith/trunk/libsrc/meshio/OutputSolnSubset.hh
   short/3D/PyLith/trunk/libsrc/utils/sievetypes.hh
   short/3D/PyLith/trunk/modulesrc/bc/bc.pyxe.src
   short/3D/PyLith/trunk/modulesrc/faults/faults.pyxe.src
   short/3D/PyLith/trunk/unittests/libtests/bc/TestAbsorbingDampers.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMesh.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMesh.hh
   short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshTri3.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletBoundary.cc
   short/3D/PyLith/trunk/unittests/libtests/bc/TestNeumann.cc
Log:
Changes for new labels


Modified: short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -59,7 +59,7 @@
 			     "a vector with 3 components.");
 
   // Extract submesh associated with boundary
-  _boundaryMesh = ALE::Selection<Mesh>::submeshV(mesh, mesh->getIntSection(_label));
+  _boundaryMesh = ALE::Selection<Mesh>::submeshV<SubMesh>(mesh, mesh->getIntSection(_label));
   if (_boundaryMesh.isNull()) {
     std::ostringstream msg;
     msg << "Could not construct boundary mesh for absorbing boundary "
@@ -69,9 +69,9 @@
   _boundaryMesh->setRealSection("coordinates", 
 				mesh->getRealSection("coordinates"));
   // Create the parallel overlap
-  Obj<Mesh::send_overlap_type> sendParallelMeshOverlap = _boundaryMesh->getSendOverlap();
-  Obj<Mesh::recv_overlap_type> recvParallelMeshOverlap = _boundaryMesh->getRecvOverlap();
-  Mesh::renumbering_type&      renumbering             = mesh->getRenumbering();
+  Obj<SubMesh::send_overlap_type> sendParallelMeshOverlap = _boundaryMesh->getSendOverlap();
+  Obj<SubMesh::recv_overlap_type> recvParallelMeshOverlap = _boundaryMesh->getRecvOverlap();
+  Mesh::renumbering_type&         renumbering             = mesh->getRenumbering();
   //   Can I figure this out in a nicer way?
   ALE::SetFromMap<std::map<Mesh::point_type,Mesh::point_type> > globalPoints(renumbering);
 
@@ -92,14 +92,14 @@
   } // if
   const int numCorners = _quadrature->numBasis();
 
-  const ALE::Obj<Mesh::label_sequence>& cells = 
+  const ALE::Obj<SubMesh::label_sequence>& cells = 
     _boundaryMesh->heightStratum(1);
     
   assert(!cells.isNull());
-  const Mesh::label_sequence::iterator cellsBegin = cells->begin();
-  const Mesh::label_sequence::iterator cellsEnd = cells->end();
+  const SubMesh::label_sequence::iterator cellsBegin = cells->begin();
+  const SubMesh::label_sequence::iterator cellsEnd = cells->end();
   const int boundaryDepth = _boundaryMesh->depth()-1; // depth of bndry cells
-  for (Mesh::label_sequence::iterator c_iter=cellsBegin;
+  for (SubMesh::label_sequence::iterator c_iter=cellsBegin;
        c_iter != cellsEnd;
        ++c_iter) {
     const int cellNumCorners = _boundaryMesh->getNumCellCorners(*c_iter, boundaryDepth);
@@ -168,7 +168,7 @@
   const double velocityScale = 
     _normalizer->lengthScale() / _normalizer->timeScale();
 
-  for(Mesh::label_sequence::iterator c_iter = cells->begin();
+  for(SubMesh::label_sequence::iterator c_iter = cells->begin();
       c_iter != cells->end();
       ++c_iter) {
     _quadrature->computeGeometry(_boundaryMesh, coordinates, *c_iter);
@@ -249,10 +249,10 @@
   PetscErrorCode err = 0;
 
   // Get cell information
-  const ALE::Obj<Mesh::label_sequence>& cells = 
+  const ALE::Obj<SubMesh::label_sequence>& cells = 
     _boundaryMesh->heightStratum(1);
   assert(!cells.isNull());
-  const Mesh::label_sequence::iterator cellsEnd = cells->end();
+  const SubMesh::label_sequence::iterator cellsEnd = cells->end();
 
   // Get sections
   const ALE::Obj<real_section_type>& coordinates = 
@@ -281,7 +281,7 @@
   double_array dispTpdtCell(cellVecSize);
   double_array dispTmdtCell(cellVecSize);
 
-  for (Mesh::label_sequence::iterator c_iter=cells->begin();
+  for (SubMesh::label_sequence::iterator c_iter=cells->begin();
        c_iter != cellsEnd;
        ++c_iter) {
     // Compute geometry information for current cell
@@ -345,10 +345,10 @@
   PetscErrorCode err = 0;
 
   // Get cell information
-  const ALE::Obj<Mesh::label_sequence>& cells = 
+  const ALE::Obj<SubMesh::label_sequence>& cells = 
     _boundaryMesh->heightStratum(1);
   assert(!cells.isNull());
-  const Mesh::label_sequence::iterator cellsEnd = cells->end();
+  const SubMesh::label_sequence::iterator cellsEnd = cells->end();
 
   // Get sections
   const ALE::Obj<real_section_type>& coordinates = 
@@ -385,7 +385,7 @@
 		  (int) pow(mesh->getSieve()->getMaxConeSize(),
 			    mesh->depth())*spaceDim);
 
-  for (Mesh::label_sequence::iterator c_iter=cells->begin();
+  for (SubMesh::label_sequence::iterator c_iter=cells->begin();
        c_iter != cellsEnd;
        ++c_iter) {
     // Compute geometry information for current cell

Modified: short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -145,7 +145,7 @@
 private :
 
   /// Mesh of absorbing boundary
-  ALE::Obj<Mesh> _boundaryMesh;
+  ALE::Obj<SubMesh> _boundaryMesh;
 
   /// Damping constants in global coordinates at integration points.
   ALE::Obj<real_section_type> _dampingConsts;

Modified: short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -60,7 +60,7 @@
 
   // Extract submesh associated with boundary
   _boundaryMesh = 
-    ALE::Selection<Mesh>::submeshV(mesh, mesh->getIntSection(_label));
+    ALE::Selection<Mesh>::submeshV<SubMesh>(mesh, mesh->getIntSection(_label));
   if (_boundaryMesh.isNull()) {
     std::ostringstream msg;
     msg << "Could not construct boundary mesh for Dirichlet boundary "
@@ -70,9 +70,9 @@
   _boundaryMesh->setRealSection("coordinates", 
 				mesh->getRealSection("coordinates"));
   // Create the parallel overlap
-  Obj<Mesh::send_overlap_type> sendParallelMeshOverlap = _boundaryMesh->getSendOverlap();
-  Obj<Mesh::recv_overlap_type> recvParallelMeshOverlap = _boundaryMesh->getRecvOverlap();
-  Mesh::renumbering_type&      renumbering             = mesh->getRenumbering();
+  Obj<SubMesh::send_overlap_type> sendParallelMeshOverlap = _boundaryMesh->getSendOverlap();
+  Obj<SubMesh::recv_overlap_type> recvParallelMeshOverlap = _boundaryMesh->getRecvOverlap();
+  Mesh::renumbering_type&         renumbering             = mesh->getRenumbering();
   //   Can I figure this out in a nicer way?
   ALE::SetFromMap<std::map<Mesh::point_type,Mesh::point_type> > globalPoints(renumbering);
 
@@ -97,9 +97,9 @@
   } // for
   delete[] valueNames; valueNames = 0;
 
-  const ALE::Obj<Mesh::label_sequence>& vertices = 
+  const ALE::Obj<SubMesh::label_sequence>& vertices = 
     _boundaryMesh->depthStratum(0);
-  const Mesh::label_sequence::iterator verticesEnd = vertices->end();
+  const SubMesh::label_sequence::iterator verticesEnd = vertices->end();
 
   const ALE::Obj<real_section_type>& coordinates = 
     mesh->getRealSection("coordinates");
@@ -123,7 +123,7 @@
   const double velocityScale = 
     _normalizer->lengthScale() / _normalizer->timeScale();
 
-  for (Mesh::label_sequence::iterator v_iter=vertices->begin();
+  for (SubMesh::label_sequence::iterator v_iter=vertices->begin();
        v_iter != verticesEnd;
        ++v_iter) {
     // Get coordinates of vertex
@@ -175,9 +175,9 @@
   if (0 == numFixedDOF)
     return;
 
-  const ALE::Obj<Mesh::label_sequence>& vertices = 
+  const ALE::Obj<SubMesh::label_sequence>& vertices = 
     _boundaryMesh->depthStratum(0);
-  const Mesh::label_sequence::iterator verticesEnd = vertices->end();
+  const SubMesh::label_sequence::iterator verticesEnd = vertices->end();
 
   _offsetLocal = new int_section_type(_boundaryMesh->comm(), 
 				      _boundaryMesh->debug());
@@ -185,7 +185,7 @@
   _offsetLocal->setFiberDimension(vertices, 1);
   _boundaryMesh->allocate(_offsetLocal);
 
-  for (Mesh::label_sequence::iterator v_iter=vertices->begin();
+  for (SubMesh::label_sequence::iterator v_iter=vertices->begin();
        v_iter != verticesEnd;
        ++v_iter) {
     const int fiberDim = field->getFiberDimension(*v_iter);
@@ -218,11 +218,11 @@
   if (0 == numFixedDOF)
     return;
 
-  const ALE::Obj<Mesh::label_sequence>& vertices = 
+  const ALE::Obj<SubMesh::label_sequence>& vertices = 
     _boundaryMesh->depthStratum(0);
-  const Mesh::label_sequence::iterator verticesEnd = vertices->end();
+  const SubMesh::label_sequence::iterator verticesEnd = vertices->end();
 
-  for (Mesh::label_sequence::iterator v_iter=vertices->begin();
+  for (SubMesh::label_sequence::iterator v_iter=vertices->begin();
        v_iter != verticesEnd;
        ++v_iter) {
     // Get list of currently constrained DOF
@@ -285,16 +285,16 @@
   if (0 == numFixedDOF)
     return;
 
-  const ALE::Obj<Mesh::label_sequence>& vertices = 
+  const ALE::Obj<SubMesh::label_sequence>& vertices = 
     _boundaryMesh->depthStratum(0);
-  const Mesh::label_sequence::iterator verticesEnd = vertices->end();
+  const SubMesh::label_sequence::iterator verticesEnd = vertices->end();
 
   const int fiberDimension = 
     (vertices->size() > 0) ? field->getFiberDimension(*vertices->begin()) : 0;
 
   double_array fieldValues(fiberDimension);
 
-  for (Mesh::label_sequence::iterator v_iter=vertices->begin();
+  for (SubMesh::label_sequence::iterator v_iter=vertices->begin();
        v_iter != verticesEnd;
        ++v_iter) {
     assert(fiberDimension == field->getFiberDimension(*v_iter));

Modified: short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -115,7 +115,7 @@
    *
    * @return Boundary mesh.
    */
-  const ALE::Obj<Mesh>& boundaryMesh(void) const;
+  const ALE::Obj<SubMesh>& boundaryMesh(void) const;
 
   /** Get vertex field with BC information.
    *
@@ -150,7 +150,7 @@
   ALE::Obj<real_section_type> _values;
   ALE::Obj<real_section_type> _buffer; ///< Buffer for output.
 
-  ALE::Obj<Mesh> _boundaryMesh; ///< Boundary mesh.
+  ALE::Obj<SubMesh> _boundaryMesh; ///< Boundary mesh.
   int_array _fixedDOF; ///< Indices of fixed degrees of freedom
 
   /// Offset in list of fixed DOF at point to get to fixed DOF

Modified: short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.icc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/bc/DirichletBoundary.icc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -43,7 +43,7 @@
    * @return Boundary mesh.
    */
 inline
-const ALE::Obj<pylith::Mesh>&
+const ALE::Obj<pylith::SubMesh>&
 pylith::bc::DirichletBoundary::boundaryMesh(void) const {
   return _boundaryMesh;
 } // dataMesh

Modified: short/3D/PyLith/trunk/libsrc/bc/Neumann.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/Neumann.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/bc/Neumann.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -61,7 +61,7 @@
 
   // Extract submesh associated with surface
   _boundaryMesh =
-    ALE::Selection<Mesh>::submeshV(mesh, mesh->getIntSection(_label));
+    ALE::Selection<Mesh>::submeshV<SubMesh>(mesh, mesh->getIntSection(_label));
   if (_boundaryMesh.isNull()) {
     std::ostringstream msg;
     msg << "Could not construct boundary mesh for Neumann traction "
@@ -71,9 +71,9 @@
   _boundaryMesh->setRealSection("coordinates", 
 				mesh->getRealSection("coordinates"));
   // Create the parallel overlap
-  Obj<Mesh::send_overlap_type> sendParallelMeshOverlap = _boundaryMesh->getSendOverlap();
-  Obj<Mesh::recv_overlap_type> recvParallelMeshOverlap = _boundaryMesh->getRecvOverlap();
-  Mesh::renumbering_type&      renumbering             = mesh->getRenumbering();
+  Obj<SubMesh::send_overlap_type> sendParallelMeshOverlap = _boundaryMesh->getSendOverlap();
+  Obj<SubMesh::recv_overlap_type> recvParallelMeshOverlap = _boundaryMesh->getRecvOverlap();
+  Mesh::renumbering_type&         renumbering             = mesh->getRenumbering();
   //   Can I figure this out in a nicer way?
   ALE::SetFromMap<std::map<Mesh::point_type,Mesh::point_type> > globalPoints(renumbering);
 
@@ -95,16 +95,16 @@
   const int numCorners = _quadrature->numBasis();
 
   // Get 'surface' cells (1 dimension lower than top-level cells)
-  const ALE::Obj<Mesh::label_sequence>& cells = 
+  const ALE::Obj<SubMesh::label_sequence>& cells = 
     _boundaryMesh->heightStratum(1);
   assert(!cells.isNull());
 
-  const Mesh::label_sequence::iterator cellsBegin = cells->begin();
-  const Mesh::label_sequence::iterator cellsEnd = cells->end();
+  const SubMesh::label_sequence::iterator cellsBegin = cells->begin();
+  const SubMesh::label_sequence::iterator cellsEnd = cells->end();
   const int boundaryDepth = _boundaryMesh->depth()-1;  //depth of boundary cells
 
   // Make sure surface cells are compatible with quadrature.
-  for (Mesh::label_sequence::iterator c_iter=cellsBegin;
+  for (SubMesh::label_sequence::iterator c_iter=cellsBegin;
        c_iter != cellsEnd;
        ++c_iter) {
     const int cellNumCorners = _boundaryMesh->getNumCellCorners(*c_iter, boundaryDepth);
@@ -190,7 +190,7 @@
   // Loop over cells in boundary mesh, compute orientations, and then
   // compute corresponding traction vector in global coordinates
   // (store values in _tractionGlobal).
-  for(Mesh::label_sequence::iterator c_iter = cellsBegin;
+  for(SubMesh::label_sequence::iterator c_iter = cellsBegin;
       c_iter != cellsEnd;
       ++c_iter) {
     // std::cout << "c_iter:  " << *c_iter << std::endl;
@@ -261,11 +261,11 @@
   PetscErrorCode err = 0;
 
   // Get cell information
-  const ALE::Obj<Mesh::label_sequence>& cells = 
+  const ALE::Obj<SubMesh::label_sequence>& cells = 
     _boundaryMesh->heightStratum(1);
   assert(!cells.isNull());
-  const Mesh::label_sequence::iterator cellsBegin = cells->begin();
-  const Mesh::label_sequence::iterator cellsEnd = cells->end();
+  const SubMesh::label_sequence::iterator cellsBegin = cells->begin();
+  const SubMesh::label_sequence::iterator cellsEnd = cells->end();
 
   // Get sections
   const ALE::Obj<real_section_type>& coordinates = 
@@ -286,7 +286,7 @@
   double_array tractionsCell(numQuadPts*spaceDim);
 
   // Loop over faces and integrate contribution from each face
-  for (Mesh::label_sequence::iterator c_iter=cellsBegin;
+  for (SubMesh::label_sequence::iterator c_iter=cellsBegin;
        c_iter != cellsEnd;
        ++c_iter) {
     // Compute geometry information for current cell
@@ -343,7 +343,7 @@
 
 // ----------------------------------------------------------------------
 // Get boundary mesh.
-const ALE::Obj<pylith::Mesh>&
+const ALE::Obj<pylith::SubMesh>&
 pylith::bc::Neumann::boundaryMesh(void) const
 { // dataMesh
   return _boundaryMesh;

Modified: short/3D/PyLith/trunk/libsrc/bc/Neumann.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/Neumann.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/bc/Neumann.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -106,7 +106,7 @@
    *
    * @returns Boundary mesh.
    */
-  const ALE::Obj<Mesh>& boundaryMesh(void) const;
+  const ALE::Obj<SubMesh>& boundaryMesh(void) const;
 
   /** Get cell field with BC information.
    *
@@ -136,7 +136,7 @@
 private :
 
   /// Mesh over which tractions are applied
-  ALE::Obj<Mesh> _boundaryMesh;
+  ALE::Obj<SubMesh> _boundaryMesh;
 
   /// Traction vector in global coordinates at integration points.
   ALE::Obj<real_section_type> _tractions;

Modified: short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -406,16 +406,16 @@
 
 // ----------------------------------------------------------------------
 void
-pylith::faults::CohesiveTopology::createFault(Obj<Mesh>& ifault,
+pylith::faults::CohesiveTopology::createFault(Obj<SubMesh>& ifault,
                                               Obj<ALE::Mesh>& faultBd,
                                               const Obj<Mesh>& mesh,
                                               const Obj<Mesh::int_section_type>& groupField)
 {
-  const Obj<sieve_type>&      sieve       = mesh->getSieve();
-  const Obj<Mesh::sieve_type> ifaultSieve = new Mesh::sieve_type(sieve->comm(), sieve->debug());
-  Obj<ALE::Mesh>              fault       = new ALE::Mesh(mesh->comm(), mesh->getDimension()-1, mesh->debug());
-  Obj<ALE::Mesh::sieve_type>  faultSieve  = new ALE::Mesh::sieve_type(sieve->comm(), sieve->debug());
-  const int                   debug       = mesh->debug();
+  const Obj<sieve_type>&         sieve       = mesh->getSieve();
+  const Obj<SubMesh::sieve_type> ifaultSieve = new Mesh::sieve_type(sieve->comm(), sieve->debug());
+  Obj<ALE::Mesh>                 fault       = new ALE::Mesh(mesh->comm(), mesh->getDimension()-1, mesh->debug());
+  Obj<ALE::Mesh::sieve_type>     faultSieve  = new ALE::Mesh::sieve_type(sieve->comm(), sieve->debug());
+  const int                      debug       = mesh->debug();
 
   // Create set with vertices on fault
   const int_section_type::chart_type& chart = groupField->getChart();
@@ -442,7 +442,7 @@
   orientFaultSieve(fault->getDimension(), mesh, fault->getArrowSection("orientation"), fault);
 
   // Convert fault to an IMesh
-  Mesh::renumbering_type& renumbering = ifault->getRenumbering();
+  SubMesh::renumbering_type& renumbering = ifault->getRenumbering();
   ifault->setSieve(ifaultSieve);
   ALE::ISieveConverter::convertMesh(*fault, *ifault, renumbering, false);
   renumbering.clear();
@@ -450,18 +450,19 @@
 
 // ----------------------------------------------------------------------
 void
-pylith::faults::CohesiveTopology::create(Obj<Mesh>& ifault,
+pylith::faults::CohesiveTopology::create(Obj<SubMesh>& ifault,
                                          const Obj<ALE::Mesh>& faultBd,
                                          const Obj<Mesh>& mesh,
                                          const Obj<Mesh::int_section_type>& groupField,
                                          const int materialId,
-                                         const bool constraintCell)
+                                         const bool constraintCell,
+                                         const bool flipFault)
 { // create
   typedef ALE::SieveAlg<ALE::Mesh>  sieveAlg;
   typedef ALE::Selection<ALE::Mesh> selection;
 
   const Obj<sieve_type>& sieve = mesh->getSieve();
-  const Obj<Mesh::sieve_type> ifaultSieve = ifault->getSieve();
+  const Obj<SubMesh::sieve_type> ifaultSieve = ifault->getSieve();
   const int  depth           = mesh->depth();
   const int  numCells        = mesh->heightStratum(0)->size();
   int        numCorners      = 0;    // The number of vertices in a mesh cell
@@ -475,7 +476,7 @@
   PointArray neighborVertices;
 
   if (!ifault->commRank()) {
-    const Mesh::point_type p = *ifault->heightStratum(1)->begin();
+    const SubMesh::point_type p = *ifault->heightStratum(1)->begin();
 
     numCorners      = mesh->getNumCellCorners();
     faceSize        = selection::numFaceVertices(mesh);
@@ -485,29 +486,23 @@
   //ifault->view("Serial fault mesh");
 
   // Add new shadow vertices and possibly Lagrange multipler vertices
-  const Obj<Mesh::label_sequence>&   fVertices       = ifault->depthStratum(0);
-  const Obj<Mesh::label_sequence>&   vertices        = mesh->depthStratum(0);
-  const Obj<std::set<std::string> >& groupNames      = mesh->getIntSections();
+  const Obj<SubMesh::label_sequence>& fVertices       = ifault->depthStratum(0);
+  const Obj<Mesh::label_sequence>&    vertices        = mesh->depthStratum(0);
+  const Obj<std::set<std::string> >&  groupNames      = mesh->getIntSections();
   Mesh::point_type newPoint = sieve->getBaseSize() + sieve->getCapSize();
   const int        numFaultVertices = fVertices->size();
   std::map<Mesh::point_type,Mesh::point_type> vertexRenumber;
   std::map<Mesh::point_type,Mesh::point_type> cellRenumber;
 
-  for(Mesh::label_sequence::iterator v_iter = fVertices->begin(); v_iter != fVertices->end(); ++v_iter, ++newPoint) {
+  for(SubMesh::label_sequence::iterator v_iter = fVertices->begin(); v_iter != fVertices->end(); ++v_iter, ++newPoint) {
     vertexRenumber[*v_iter] = newPoint;
     if (debug) std::cout << "Duplicating " << *v_iter << " to " << vertexRenumber[*v_iter] << std::endl;
 
     // Add shadow and constraint vertices (if they exist) to group
     // associated with fault
     groupField->addPoint(newPoint, 1);
-    // OPTIMIZATION
-    mesh->setHeight(newPoint, 1);
-    mesh->setDepth(newPoint, 0);
     if (constraintCell) {
       groupField->addPoint(newPoint+numFaultVertices, 1);
-      // OPTIMIZATION
-      mesh->setHeight(newPoint+numFaultVertices, 1);
-      mesh->setDepth(newPoint+numFaultVertices, 0);
     }
 
     // Add shadow vertices to other groups, don't add constraint
@@ -524,11 +519,24 @@
       name != groupNames->end(); ++name) {
     mesh->reallocate(mesh->getIntSection(*name));
   } // for
+#if 0
+  for(SubMesh::label_sequence::iterator v_iter = fVertices->begin(); v_iter != fVertices->end(); ++v_iter, ++newPoint) {
+    vertexRenumber[*v_iter] = newPoint;
+    // OPTIMIZATION
+    mesh->setHeight(newPoint, 1);
+    mesh->setDepth(newPoint, 0);
+    if (constraintCell) {
+      // OPTIMIZATION
+      mesh->setHeight(newPoint+numFaultVertices, 1);
+      mesh->setDepth(newPoint+numFaultVertices, 0);
+    }
+  }
+#endif
   if (constraintCell) newPoint += numFaultVertices;
 
   // Split the mesh along the fault sieve and create cohesive elements
-  const ALE::Obj<Mesh::label_sequence>& faces = ifault->heightStratum(1);
-  const ALE::Obj<Mesh::label_type>& material = mesh->getLabel("material-id");
+  const ALE::Obj<SubMesh::label_sequence>& faces    = ifault->heightStratum(1);
+  const ALE::Obj<Mesh::label_type>&        material = mesh->getLabel("material-id");
   const int firstCohesiveCell = newPoint;
   PointSet replaceCells;
   PointSet noReplaceCells;
@@ -537,14 +545,18 @@
   ALE::ISieveVisitor::NConeRetriever<sieve_type> cV2(*ifaultSieve, (size_t) pow(std::max(1, ifaultSieve->getMaxConeSize()), ifault->depth()));
   std::set<Mesh::point_type> faceSet;
 
-  for(Mesh::label_sequence::iterator f_iter = faces->begin(); f_iter != faces->end(); ++f_iter, ++newPoint) {
+  for(SubMesh::label_sequence::iterator f_iter = faces->begin(); f_iter != faces->end(); ++f_iter, ++newPoint) {
     const Mesh::point_type face = *f_iter;
     if (debug) std::cout << "Considering fault face " << face << std::endl;
     ifaultSieve->support(face, sV2);
     const Mesh::point_type *cells = sV2.getPoints();
-    Mesh::point_type cell = cells[0];
-    Mesh::point_type otherCell;
+    Mesh::point_type cell      = cells[0];
+    Mesh::point_type otherCell = cells[1];
 
+    if (flipFault) {
+      otherCell = cells[0];
+      cell      = cells[1];
+    }
     if (debug) std::cout << "  Checking orientation against cell " << cell << std::endl;
     ALE::ISieveTraversal<sieve_type>::orientedClosure(*ifaultSieve, face, cV2);
     const int               coneSize = cV2.getSize();
@@ -603,10 +615,10 @@
     }
     if (found) {
       if (debug) std::cout << "  Choosing other cell" << std::endl;
+      Mesh::point_type tmpCell = otherCell;
       otherCell = cell;
-      cell = cells[1];
+      cell      = tmpCell;
     } else {
-      otherCell = cells[1];
       if (debug) std::cout << "  Verifing reverse orientation" << std::endl;
       found = true;
       int v = 0;
@@ -650,10 +662,13 @@
         sieve->addArrow(vertexRenumber[faceCone[c]]+numFaultVertices, newPoint);
       }
     }
+    // TODO: Need to reform the material label when sieve is reallocated
     mesh->setValue(material, newPoint, materialId);
+#if 0
     // OPTIMIZATION
     mesh->setHeight(newPoint, 0);
     mesh->setDepth(newPoint, 1);
+#endif
     sV2.clear();
     cV2.clear();
   } // for
@@ -791,7 +806,9 @@
     rVs.clear();
   }
   if (!ifault->commRank()) delete [] indices;
-  /// THIS IS TOO SLOW mesh->stratify();
+#if 1
+  mesh->stratify();
+#endif
   const std::string labelName("censored depth");
 
   if (!mesh->hasLabel(labelName)) {
@@ -811,10 +828,10 @@
   // Fix coordinates
   const ALE::Obj<real_section_type>& coordinates = 
     mesh->getRealSection("coordinates");
-  const ALE::Obj<Mesh::label_sequence>& fVertices2 = ifault->depthStratum(0);
+  const ALE::Obj<SubMesh::label_sequence>& fVertices2 = ifault->depthStratum(0);
 
   if (debug) coordinates->view("Coordinates without shadow vertices");
-  for(Mesh::label_sequence::iterator v_iter = fVertices2->begin();
+  for(SubMesh::label_sequence::iterator v_iter = fVertices2->begin();
       v_iter != fVertices2->end();
       ++v_iter) {
     coordinates->addPoint(vertexRenumber[*v_iter],
@@ -825,7 +842,7 @@
     }
   } // for
   mesh->reallocate(coordinates);
-  for(Mesh::label_sequence::iterator v_iter = fVertices2->begin();
+  for(SubMesh::label_sequence::iterator v_iter = fVertices2->begin();
       v_iter != fVertices2->end();
       ++v_iter) {
     coordinates->updatePoint(vertexRenumber[*v_iter], 
@@ -842,7 +859,7 @@
 // Form a parallel fault mesh using the cohesive cell information
 void
 pylith::faults::CohesiveTopology::createParallel(
-		ALE::Obj<Mesh>* ifault,
+		ALE::Obj<SubMesh>* ifault,
 		std::map<Mesh::point_type, Mesh::point_type>* cohesiveToFault,
 		const ALE::Obj<Mesh>& mesh,
 		const int materialId,
@@ -852,7 +869,7 @@
   assert(0 != cohesiveToFault);
 
   const ALE::Obj<sieve_type>& sieve = mesh->getSieve();
-  *ifault = new Mesh(mesh->comm(), mesh->getDimension()-1, mesh->debug());
+  *ifault = new SubMesh(mesh->comm(), mesh->getDimension()-1, mesh->debug());
   const ALE::Obj<sieve_type> ifaultSieve = new sieve_type(sieve->comm(), sieve->debug());
   ALE::Obj<ALE::Mesh> fault = new ALE::Mesh(mesh->comm(), mesh->getDimension()-1, mesh->debug());
   ALE::Obj<ALE::Mesh::sieve_type> faultSieve = new ALE::Mesh::sieve_type(sieve->comm(), sieve->debug());
@@ -903,7 +920,7 @@
   fault->stratify();
 
   // Convert fault to an IMesh
-  Mesh::renumbering_type& fRenumbering = (*ifault)->getRenumbering();
+  SubMesh::renumbering_type& fRenumbering = (*ifault)->getRenumbering();
   (*ifault)->setSieve(ifaultSieve);
   //ALE::ISieveConverter::convertMesh(*fault, *(*ifault), fRenumbering, true);
   {
@@ -914,9 +931,11 @@
   fault      = NULL;
   faultSieve = NULL;
 
-  const ALE::Obj<Mesh::label_sequence>& faultCells = (*ifault)->heightStratum(0);
+  const ALE::Obj<SubMesh::label_sequence>& faultCells = (*ifault)->heightStratum(0);
   assert(!faultCells.isNull());
-  for(Mesh::label_sequence::iterator c_iter = cBegin, f_iter=faultCells->begin(); c_iter != cEnd; ++c_iter, ++f_iter) {
+  SubMesh::label_sequence::iterator f_iter = faultCells->begin();
+
+  for(Mesh::label_sequence::iterator c_iter = cBegin; c_iter != cEnd; ++c_iter, ++f_iter) {
     (*cohesiveToFault)[*c_iter] = *f_iter;
   }
     
@@ -949,8 +968,8 @@
 
   // Create the parallel overlap
   //   Can I figure this out in a nicer way?
-  Obj<Mesh::send_overlap_type> sendParallelMeshOverlap = (*ifault)->getSendOverlap();
-  Obj<Mesh::recv_overlap_type> recvParallelMeshOverlap = (*ifault)->getRecvOverlap();
+  Obj<SubMesh::send_overlap_type> sendParallelMeshOverlap = (*ifault)->getSendOverlap();
+  Obj<SubMesh::recv_overlap_type> recvParallelMeshOverlap = (*ifault)->getRecvOverlap();
 
   // Must process the renumbering local --> fault to global --> fault
   Mesh::renumbering_type& renumbering = mesh->getRenumbering();

Modified: short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -29,7 +29,7 @@
 
 /// C++ object to manage creation of cohesive cells.
 class pylith::faults::CohesiveTopology
-{ // class Fault
+{ // class CohesiveTopology
 public :
   typedef std::set<Mesh::point_type>             PointSet;
   typedef std::vector<sieve_type::point_type>    PointArray;
@@ -159,7 +159,6 @@
 
   // PUBLIC METHODS /////////////////////////////////////////////////////
 public :
-
   /** Create the fault mesh.
    *
    * @param fault Finite-element mesh of fault (output)
@@ -168,7 +167,7 @@
    *   fault surface
    */
   static
-  void createFault(Obj<Mesh>& fault,
+  void createFault(Obj<SubMesh>& ifault,
                    Obj<ALE::Mesh>& faultBd,
                    const Obj<Mesh>& mesh,
                    const Obj<Mesh::int_section_type>& groupField);
@@ -182,12 +181,13 @@
    *   Lagrange multipliers that require extra vertices, false otherwise
    */
   static
-  void create(Obj<Mesh>& fault,
+  void create(Obj<SubMesh>& ifault,
               const Obj<ALE::Mesh>& faultBd,
               const Obj<Mesh>& mesh,
               const Obj<Mesh::int_section_type>& groupField,
               const int materialId,
-              const bool constraintCell =false);
+              const bool constraintCell = false,
+              const bool flipFault = false);
 
   /** Create (distributed) fault mesh from cohesive cells.
    *
@@ -199,7 +199,7 @@
    *   Lagrange multipliers that require extra vertices, false otherwise.
    */
   static
-  void createParallel(ALE::Obj<Mesh>* fault,
+  void createParallel(ALE::Obj<SubMesh>* ifault,
 		      std::map<Mesh::point_type, Mesh::point_type>* cohesiveToFault,
 		      const ALE::Obj<Mesh>& mesh,
 		      const int materialId,

Modified: short/3D/PyLith/trunk/libsrc/faults/Fault.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/Fault.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/faults/Fault.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -31,7 +31,7 @@
 
 // ----------------------------------------------------------------------
 // Get mesh associated with fault fields.
-const ALE::Obj<pylith::Mesh>&
+const ALE::Obj<pylith::SubMesh>&
 pylith::faults::Fault:: faultMesh(void) const
 { // faultMesh
   return _faultMesh;

Modified: short/3D/PyLith/trunk/libsrc/faults/Fault.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/Fault.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/faults/Fault.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -97,7 +97,7 @@
    * @param mesh PETSc mesh
    */
   virtual
-  void adjustTopology(const ALE::Obj<Mesh>& mesh) = 0;
+  void adjustTopology(const ALE::Obj<Mesh>& mesh, const bool flipFault = false) = 0;
 
   /** Initialize fault. Determine orientation and setup boundary
    * condition parameters.
@@ -124,7 +124,7 @@
    *
    * @returns PETSc mesh object
    */
-  const ALE::Obj<Mesh>& faultMesh(void) const;
+  const ALE::Obj<SubMesh>& faultMesh(void) const;
 
   /** Get vertex field associated with integrator.
    *
@@ -168,7 +168,7 @@
 // PROTECTED MEMBERS ////////////////////////////////////////////////////
 protected :
 
-  ALE::Obj<Mesh> _faultMesh; ///< Mesh over fault surface
+  ALE::Obj<SubMesh> _faultMesh; ///< Mesh over fault surface
 
   // PRIVATE MEMBERS ////////////////////////////////////////////////////
 private :

Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -59,17 +59,17 @@
 // ----------------------------------------------------------------------
 // Adjust mesh topology for fault implementation.
 void
-pylith::faults::FaultCohesive::adjustTopology(const ALE::Obj<Mesh>& mesh)
+pylith::faults::FaultCohesive::adjustTopology(const ALE::Obj<Mesh>& mesh, const bool flipFault)
 { // adjustTopology
   assert(std::string("") != label());
-  Obj<Mesh>      faultMesh = NULL;
+  Obj<SubMesh>   faultMesh = NULL;
   Obj<ALE::Mesh> faultBd   = NULL;
 
   if (_useFaultMesh) {
     const int faultDim = 2;
 
     //MPI_Bcast(&faultDim, 1, MPI_INT, 0, comm);
-    faultMesh = new Mesh(mesh->comm(), faultDim, mesh->debug());
+    faultMesh = new SubMesh(mesh->comm(), faultDim, mesh->debug());
     pylith::meshio::MeshIOLagrit::readFault(_faultMeshFilename, mesh, faultMesh, faultBd);
 
     // Get group of vertices associated with fault
@@ -77,7 +77,7 @@
       mesh->getIntSection(label());
     faultMesh->setRealSection("coordinates", mesh->getRealSection("coordinates"));
 
-    CohesiveTopology::create(faultMesh, faultBd, mesh, groupField, id(), _useLagrangeConstraints());
+    CohesiveTopology::create(faultMesh, faultBd, mesh, groupField, id(), _useLagrangeConstraints(), flipFault);
   } else {
     if (!mesh->hasIntSection(label())) {
       std::ostringstream msg;
@@ -91,7 +91,7 @@
       mesh->getIntSection(label());
     assert(!groupField.isNull());
 
-    faultMesh = new Mesh(mesh->comm(), mesh->getDimension()-1, mesh->debug());
+    faultMesh = new SubMesh(mesh->comm(), mesh->getDimension()-1, mesh->debug());
 
     CohesiveTopology::createFault(faultMesh, faultBd, mesh, groupField);
 

Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -66,7 +66,7 @@
    *
    * @param mesh PETSc mesh
    */
-  void adjustTopology(const ALE::Obj<Mesh>& mesh);
+  void adjustTopology(const ALE::Obj<Mesh>& mesh, const bool flipFault = false);
 
   // PROTECTED METHODS //////////////////////////////////////////////////
 protected :

Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -109,7 +109,7 @@
   } // for
 
   // Allocate slip field
-  const ALE::Obj<Mesh::label_sequence>& vertices = _faultMesh->depthStratum(0);
+  const ALE::Obj<SubMesh::label_sequence>& vertices = _faultMesh->depthStratum(0);
   _slip = new real_section_type(_faultMesh->comm(), _faultMesh->debug());
   _slip->setChart(real_section_type::chart_type(
 		     *std::min_element(vertices->begin(), vertices->end()), 
@@ -647,9 +647,9 @@
   assert(!_faultMesh.isNull());
 
   // Get vertices in fault mesh
-  const ALE::Obj<Mesh::label_sequence>& vertices = 
+  const ALE::Obj<SubMesh::label_sequence>& vertices = 
     _faultMesh->depthStratum(0);
-  const Mesh::label_sequence::iterator verticesEnd = vertices->end();
+  const SubMesh::label_sequence::iterator verticesEnd = vertices->end();
 
   // Create orientation section for fault (constraint) vertices
   const int cohesiveDim = _faultMesh->getDimension();
@@ -690,10 +690,10 @@
   double_array faceVertices(numBasis*spaceDim);
   
   // Get fault cells (1 dimension lower than top-level cells)
-  const ALE::Obj<Mesh::label_sequence>& cells = 
+  const ALE::Obj<SubMesh::label_sequence>& cells = 
     _faultMesh->heightStratum(0);
   assert(!cells.isNull());
-  const Mesh::label_sequence::iterator cellsEnd = cells->end();
+  const SubMesh::label_sequence::iterator cellsEnd = cells->end();
 
   const ALE::Obj<sieve_type>& sieve = _faultMesh->getSieve();
   assert(!sieve.isNull());
@@ -702,7 +702,7 @@
 
   ALE::ISieveVisitor::NConeRetriever<sieve_type> ncV(*sieve, (size_t) pow(sieve->getMaxConeSize(), std::max(0, _faultMesh->depth())));
 
-  for (Mesh::label_sequence::iterator c_iter=cells->begin();
+  for (SubMesh::label_sequence::iterator c_iter=cells->begin();
        c_iter != cellsEnd;
        ++c_iter) {
     _faultMesh->restrictClosure(coordinates, *c_iter, 
@@ -735,7 +735,7 @@
   // Loop over vertices, make orientation information unit magnitude
   double_array vertexDir(orientationSize);
   int count = 0;
-  for (Mesh::label_sequence::iterator v_iter=vertices->begin();
+  for (SubMesh::label_sequence::iterator v_iter=vertices->begin();
        v_iter != verticesEnd;
        ++v_iter, ++count) {
     const real_section_type::value_type* vertexOrient = 
@@ -775,7 +775,7 @@
       normalDir[1]*vertNormalDir[1] +
       normalDir[2]*vertNormalDir[2];
     if (dot < 0.0)
-      for (Mesh::label_sequence::iterator v_iter=vertices->begin();
+      for (SubMesh::label_sequence::iterator v_iter=vertices->begin();
 	   v_iter != verticesEnd;
 	   ++v_iter) {
 	const real_section_type::value_type* vertexOrient = 
@@ -815,9 +815,9 @@
   const int spaceDim = cs->spaceDim();
 
   // Get vertices in fault mesh
-  const ALE::Obj<Mesh::label_sequence>& vertices = 
+  const ALE::Obj<SubMesh::label_sequence>& vertices = 
     _faultMesh->depthStratum(0);
-  const Mesh::label_sequence::iterator verticesEnd = vertices->end();
+  const SubMesh::label_sequence::iterator verticesEnd = vertices->end();
   
   _pseudoStiffness = new real_section_type(_faultMesh->comm(), 
 					   _faultMesh->debug());
@@ -844,7 +844,7 @@
 
   double_array matprops(numStiffnessVals);
   int count = 0;
-  for (Mesh::label_sequence::iterator v_iter=vertices->begin();
+  for (SubMesh::label_sequence::iterator v_iter=vertices->begin();
        v_iter != verticesEnd;
        ++v_iter, ++count) {
     const real_section_type::value_type* vertexCoords = 
@@ -879,9 +879,9 @@
   assert(!_faultMesh.isNull());
 
   // Get vertices in fault mesh
-  const ALE::Obj<Mesh::label_sequence>& vertices = 
+  const ALE::Obj<SubMesh::label_sequence>& vertices = 
     _faultMesh->depthStratum(0);
-  const Mesh::label_sequence::iterator verticesEnd = vertices->end();
+  const SubMesh::label_sequence::iterator verticesEnd = vertices->end();
   const int numVertices = vertices->size();
 
   _area = new real_section_type(_faultMesh->comm(), 
@@ -895,10 +895,10 @@
   _faultMesh->allocate(_area);
   
   // Get fault cells (1 dimension lower than top-level cells)
-  const ALE::Obj<Mesh::label_sequence>& cells = 
+  const ALE::Obj<SubMesh::label_sequence>& cells = 
     _faultMesh->heightStratum(0);
   assert(!cells.isNull());
-  const Mesh::label_sequence::iterator cellsEnd = cells->end();
+  const SubMesh::label_sequence::iterator cellsEnd = cells->end();
 
   // Get section containing coordinates of vertices
   const ALE::Obj<real_section_type>& coordinates = 
@@ -918,7 +918,7 @@
   double_array cellVertices(numBasis*spaceDim);
 
   // Loop over cells in fault mesh, compute area
-  for(Mesh::label_sequence::iterator c_iter = cells->begin();
+  for(SubMesh::label_sequence::iterator c_iter = cells->begin();
       c_iter != cellsEnd;
       ++c_iter) {
     _quadrature->computeGeometry(_faultMesh, coordinates, *c_iter);
@@ -1062,7 +1062,7 @@
   if (_bufferVertexScalar.isNull()) {
     _bufferVertexScalar = new real_section_type(_faultMesh->comm(), 
 						_faultMesh->debug());
-    const ALE::Obj<Mesh::label_sequence>& vertices = 
+    const ALE::Obj<SubMesh::label_sequence>& vertices = 
       _faultMesh->depthStratum(0);
     _bufferVertexScalar->setChart(real_section_type::chart_type(
 		 *std::min_element(vertices->begin(), vertices->end()),
@@ -1082,7 +1082,7 @@
   if (_bufferVertexVector.isNull()) {
     _bufferVertexVector = new real_section_type(_faultMesh->comm(), 
 						_faultMesh->debug());
-    const ALE::Obj<Mesh::label_sequence>& vertices = 
+    const ALE::Obj<SubMesh::label_sequence>& vertices = 
       _faultMesh->depthStratum(0);
     _bufferVertexVector->setChart(real_section_type::chart_type(
 		 *std::min_element(vertices->begin(), vertices->end()),

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -221,10 +221,19 @@
    * @param cell Finite-element cell
    */
   virtual 
-  void computeGeometry(const ALE::Obj<Mesh>& mesh,
-		       const ALE::Obj<real_section_type>& coordinates,
-		       const Mesh::point_type& cell) = 0;
+  void computeGeometry(const real_section_type::value_type* vertCoords,
+                       const int coordDim,
+                       const Mesh::point_type& cell) = 0;
 
+  template<typename mesh_type>
+  void computeGeometry(const ALE::Obj<mesh_type>& mesh,
+                       const ALE::Obj<real_section_type>& coordinates,
+                       const Mesh::point_type& cell) {
+    computeGeometry(mesh->restrictClosure(coordinates, cell),
+                    coordinates->getFiberDimension(*mesh->depthStratum(0)->begin()),
+                    cell);
+  };
+
   /** Reset the precomputation structures. */
   void resetPrecomputation(void);
 

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature0D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature0D.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature0D.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -43,20 +43,16 @@
 // Compute geometric quantities for a cell at quadrature points.
 void
 pylith::feassemble::Quadrature0D::computeGeometry(
-			      const ALE::Obj<Mesh>& mesh,
-			      const ALE::Obj<real_section_type>& coordinates,
-			      const Mesh::point_type& cell)
+		       const real_section_type::value_type* vertCoords,
+               const int coordDim,
+               const Mesh::point_type& cell)
 { // computeGeometry
   assert(0 == _cellDim);
   assert(1 == _numQuadPts);
   assert(1 == _numBasis);
 
   _resetGeometry();
-  
-  // Get coordinates of cell's vertices
-  const real_section_type::value_type* vertCoords = 
-    mesh->restrictClosure(coordinates, cell);
-  assert(1 == coordinates->getFiberDimension(*mesh->depthStratum(0)->begin()));
+  assert(1 == coordDim);
 
   for (int i=0; i < _spaceDim; ++i)
     _quadPts[i] = vertCoords[i];

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature0D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature0D.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature0D.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -53,9 +53,9 @@
    * @param coordinates Section containing vertex coordinates
    * @param cell Finite-element cell
    */
-  void computeGeometry(const ALE::Obj<Mesh>& mesh,
-		       const ALE::Obj<real_section_type>& coordinates,
-		       const Mesh::point_type& cell);
+  void computeGeometry(const real_section_type::value_type* vertCoords,
+                       const int coordDim,
+                       const Mesh::point_type& cell);
 
 // PROTECTED METHODS ////////////////////////////////////////////////////
 protected :

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -46,20 +46,16 @@
 // Compute geometric quantities for a cell at quadrature points.
 void
 pylith::feassemble::Quadrature1D::computeGeometry(
-			      const ALE::Obj<Mesh>& mesh,
-			      const ALE::Obj<real_section_type>& coordinates,
-			      const Mesh::point_type& cell)
+		       const real_section_type::value_type* vertCoords,
+               const int coordDim,
+               const Mesh::point_type& cell)
 { // computeGeometry
   assert(1 == _cellDim);
   assert(1 == _spaceDim);
 
   _resetGeometry();
+  assert(1 == coordDim);
   
-  // Get coordinates of cell's vertices
-  const real_section_type::value_type* vertCoords = 
-    mesh->restrictClosure(coordinates, cell);
-  assert(1 == coordinates->getFiberDimension(*mesh->depthStratum(0)->begin()));
-  
   // Loop over quadrature points
   for (int iQuadPt=0; iQuadPt < _numQuadPts; ++iQuadPt) {
 

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1D.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -50,9 +50,9 @@
    * @param coordinates Section containing vertex coordinates
    * @param cell Finite-element cell
    */
-  void computeGeometry(const ALE::Obj<Mesh>& mesh,
-		       const ALE::Obj<real_section_type>& coordinates,
-		       const Mesh::point_type& cell);
+  void computeGeometry(const real_section_type::value_type* vertCoords,
+                       const int coordDim,
+                       const Mesh::point_type& cell);
 
 // PROTECTED METHODS ////////////////////////////////////////////////////
 protected :

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -45,20 +45,16 @@
 // Compute geometric quantities for a cell at quadrature points.
 void
 pylith::feassemble::Quadrature1Din2D::computeGeometry(
-		       const ALE::Obj<Mesh>& mesh,
-		       const ALE::Obj<real_section_type>& coordinates,
+		       const real_section_type::value_type* vertCoords,
+               const int coordDim,
 		       const Mesh::point_type& cell)
 { // computeGeometry
   assert(1 == _cellDim);
   assert(2 == _spaceDim);
 
   _resetGeometry();
+  assert(2 == coordDim);
 
-  // Get coordinates of cell's vertices
-  const real_section_type::value_type* vertCoords = 
-    mesh->restrictClosure(coordinates, cell);
-  assert(2 == coordinates->getFiberDimension(*mesh->depthStratum(0)->begin()));
-
   // Loop over quadrature points
   for (int iQuadPt=0; iQuadPt < _numQuadPts; ++iQuadPt) {
     

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din2D.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -50,9 +50,9 @@
    * @param coordinates Section containing vertex coordinates
    * @param cell Finite-element cell
    */
-  void computeGeometry(const ALE::Obj<Mesh>& mesh,
-		       const ALE::Obj<real_section_type>& coordinates,
-		       const Mesh::point_type& cell);
+  void computeGeometry(const real_section_type::value_type* vertCoords,
+                       const int coordDim,
+                       const Mesh::point_type& cell);
 
 // PROTECTED METHODS ////////////////////////////////////////////////////
 protected :

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -45,20 +45,16 @@
 // Compute geometric quantities for a cell at quadrature points.
 void
 pylith::feassemble::Quadrature1Din3D::computeGeometry(
-		       const ALE::Obj<Mesh>& mesh,
-		       const ALE::Obj<real_section_type>& coordinates,
+		       const real_section_type::value_type* vertCoords,
+               const int coordDim,
 		       const Mesh::point_type& cell)
 { // computeGeometry
   assert(1 == _cellDim);
   assert(3 == _spaceDim);
 
   _resetGeometry();
+  assert(3 == coordDim);
 
-  // Get coordinates of cell's vertices
-  const real_section_type::value_type* vertCoords = 
-    mesh->restrictClosure(coordinates, cell);
-  assert(3 == coordinates->getFiberDimension(*mesh->depthStratum(0)->begin()));
-
   // Loop over quadrature points
   for (int iQuadPt=0; iQuadPt < _numQuadPts; ++iQuadPt) {
     

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature1Din3D.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -50,9 +50,9 @@
    * @param coordinates Section containing vertex coordinates
    * @param cell Finite-element cell
    */
-  void computeGeometry(const ALE::Obj<Mesh>& mesh,
-		       const ALE::Obj<real_section_type>& coordinates,
-		       const Mesh::point_type& cell);
+  void computeGeometry(const real_section_type::value_type* vertCoords,
+                       const int coordDim,
+                       const Mesh::point_type& cell);
 
 // PROTECTED METHODS ////////////////////////////////////////////////////
 protected :

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -45,20 +45,16 @@
 // Compute geometric quantities for a cell at quadrature points.
 void
 pylith::feassemble::Quadrature2D::computeGeometry(
-		       const ALE::Obj<Mesh>& mesh,
-		       const ALE::Obj<real_section_type>& coordinates,
+		       const real_section_type::value_type* vertCoords,
+               const int coordDim,
 		       const Mesh::point_type& cell)
 { // computeGeometry
   assert(2 == _cellDim);
   assert(2 == _spaceDim);
 
   _resetGeometry();
+  assert(2 == coordDim);
 
-  // Get coordinates of cell's vertices
-  const real_section_type::value_type* vertCoords = 
-    mesh->restrictClosure(coordinates, cell);
-  assert(2 == coordinates->getFiberDimension(*mesh->depthStratum(0)->begin()));
-
   // Loop over quadrature points
   for (int iQuadPt=0; iQuadPt < _numQuadPts; ++iQuadPt) {
     

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2D.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -50,9 +50,9 @@
    * @param coordinates Section containing vertex coordinates
    * @param cell Finite-element cell
    */
-  void computeGeometry(const ALE::Obj<Mesh>& mesh,
-		       const ALE::Obj<real_section_type>& coordinates,
-		       const Mesh::point_type& cell);
+  void computeGeometry(const real_section_type::value_type* vertCoords,
+                       const int coordDim,
+                       const Mesh::point_type& cell);
 
 // PROTECTED METHODS ////////////////////////////////////////////////////
 protected :

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -47,20 +47,16 @@
 // Compute geometric quantities for a cell at quadrature points.
 void
 pylith::feassemble::Quadrature2Din3D::computeGeometry(
-		       const ALE::Obj<Mesh>& mesh,
-		       const ALE::Obj<real_section_type>& coordinates,
+		       const real_section_type::value_type* vertCoords,
+               const int coordDim,
 		       const Mesh::point_type& cell)
 { // computeGeometry
   assert(2 == _cellDim);
   assert(3 == _spaceDim);
 
   _resetGeometry();
+  assert(3 == coordDim);
 
-  // Get coordinates of cell's vertices
-  const real_section_type::value_type* vertCoords = 
-    mesh->restrictClosure(coordinates, cell);
-  assert(3 == coordinates->getFiberDimension(*mesh->depthStratum(0)->begin()));
-
   // Loop over quadrature points
   for (int iQuadPt=0; iQuadPt < _numQuadPts; ++iQuadPt) {
     

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature2Din3D.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -50,9 +50,9 @@
    * @param coordinates Section containing vertex coordinates
    * @param cell Finite-element cell
    */
-  void computeGeometry(const ALE::Obj<Mesh>& mesh,
-		       const ALE::Obj<real_section_type>& coordinates,
-		       const Mesh::point_type& cell);
+  void computeGeometry(const real_section_type::value_type* vertCoords,
+                       const int coordDim,
+                       const Mesh::point_type& cell);
 
 // PROTECTED METHODS ////////////////////////////////////////////////////
 protected :

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -45,20 +45,16 @@
 // Compute geometric quantities for a cell at quadrature points.
 void
 pylith::feassemble::Quadrature3D::computeGeometry(
-		       const ALE::Obj<Mesh>& mesh,
-		       const ALE::Obj<real_section_type>& coordinates,
+		       const real_section_type::value_type* vertCoords,
+               const int coordDim,
 		       const Mesh::point_type& cell)
 { // computeGeometry
   assert(3 == _cellDim);
   assert(3 == _spaceDim);
 
   _resetGeometry();
+  assert(3 == coordDim);
 
-  // Get coordinates of cell's vertices
-  const real_section_type::value_type* vertCoords = 
-    mesh->restrictClosure(coordinates, cell);
-  assert(3 == coordinates->getFiberDimension(*mesh->depthStratum(0)->begin()));
-
   // Loop over quadrature points
   for (int iQuadPt=0; iQuadPt < _numQuadPts; ++iQuadPt) {
     

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Quadrature3D.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -50,9 +50,9 @@
    * @param coordinates Section containing vertex coordinates
    * @param cell Finite-element cell
    */
-  void computeGeometry(const ALE::Obj<Mesh>& mesh,
-		       const ALE::Obj<real_section_type>& coordinates,
-		       const Mesh::point_type& cell);
+  void computeGeometry(const real_section_type::value_type* vertCoords,
+                       const int coordDim,
+                       const Mesh::point_type& cell);
 
 // PROTECTED METHODS ////////////////////////////////////////////////////
 protected :

Modified: short/3D/PyLith/trunk/libsrc/meshio/OutputSolnSubset.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/OutputSolnSubset.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/meshio/OutputSolnSubset.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -58,7 +58,7 @@
 pylith::meshio::OutputSolnSubset::subdomainMesh(const ALE::Obj<Mesh>& mesh)
 { // subdomainMesh
   _mesh =
-    ALE::Selection<Mesh>::submeshV(mesh, mesh->getIntSection(_label));
+    ALE::Selection<Mesh>::submeshV<SubMesh>(mesh, mesh->getIntSection(_label));
   if (_mesh.isNull()) {
     std::ostringstream msg;
     msg << "Could not construct mesh of subdomain " << _label << "'.";

Modified: short/3D/PyLith/trunk/libsrc/meshio/OutputSolnSubset.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/OutputSolnSubset.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/meshio/OutputSolnSubset.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -75,7 +75,7 @@
 private :
 
   std::string _label; ///< Label of subdomain.
-  ALE::Obj<Mesh> _mesh; ///< Mesh of subdomain.
+  ALE::Obj<SubMesh> _mesh; ///< Mesh of subdomain.
 
 }; // OutputSolnSubset
 

Modified: short/3D/PyLith/trunk/libsrc/utils/sievetypes.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/utils/sievetypes.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/libsrc/utils/sievetypes.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -24,6 +24,7 @@
 namespace pylith {
 
   typedef ALE::IMesh<> Mesh;
+  typedef ALE::IMesh<ALE::LabelSifter<int, Mesh::point_type> > SubMesh;
   typedef Mesh::sieve_type sieve_type;
   typedef Mesh::real_section_type real_section_type; 
   typedef Mesh::int_section_type int_section_type;

Modified: short/3D/PyLith/trunk/modulesrc/bc/bc.pyxe.src
===================================================================
--- short/3D/PyLith/trunk/modulesrc/bc/bc.pyxe.src	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/modulesrc/bc/bc.pyxe.src	2008-12-01 23:23:36 UTC (rev 13432)
@@ -687,7 +687,7 @@
     try {
       assert(0 != objVptr);
       assert(0 != meshVptr);
-      ALE::Obj<pylith::Mesh>* mesh = (ALE::Obj<pylith::Mesh>*) meshVptr;
+      ALE::Obj<pylith::SubMesh>* mesh = (ALE::Obj<pylith::SubMesh>*) meshVptr;
       *mesh = ((pylith::bc::DirichletBoundary*) objVptr)->boundaryMesh();
       } catch (const std::exception& err) {
       PyErr_SetString(PyExc_RuntimeError,
@@ -1424,7 +1424,7 @@
     try {
       assert(0 != objVptr);
       assert(0 != meshVptr);
-      ALE::Obj<pylith::Mesh>* mesh = (ALE::Obj<pylith::Mesh>*) meshVptr;
+      ALE::Obj<pylith::SubMesh>* mesh = (ALE::Obj<pylith::SubMesh>*) meshVptr;
       *mesh = ((pylith::bc::Neumann*) objVptr)->boundaryMesh();
       } catch (const std::exception& err) {
       PyErr_SetString(PyExc_RuntimeError,

Modified: short/3D/PyLith/trunk/modulesrc/faults/faults.pyxe.src
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/faults.pyxe.src	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/modulesrc/faults/faults.pyxe.src	2008-12-01 23:23:36 UTC (rev 13432)
@@ -174,7 +174,7 @@
     try {
       assert(0 != objVptr);
       assert(0 != meshVptr);
-      ALE::Obj<pylith::Mesh>* mesh = (ALE::Obj<pylith::Mesh>*) meshVptr;
+      ALE::Obj<pylith::SubMesh>* mesh = (ALE::Obj<pylith::SubMesh>*) meshVptr;
       *mesh = ((pylith::faults::Fault*) objVptr)->faultMesh();
       } catch (const std::exception& err) {
       PyErr_SetString(PyExc_RuntimeError,

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/TestAbsorbingDampers.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestAbsorbingDampers.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestAbsorbingDampers.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -70,14 +70,14 @@
 
   CPPUNIT_ASSERT(0 != _data);
   
-  const ALE::Obj<Mesh>& boundaryMesh = bc._boundaryMesh;
+  const ALE::Obj<SubMesh>& boundaryMesh = bc._boundaryMesh;
 
   // Check boundary mesh
   CPPUNIT_ASSERT(!boundaryMesh.isNull());
 
   const int cellDim = boundaryMesh->getDimension();
   const ALE::Obj<sieve_type>& sieve = boundaryMesh->getSieve();
-  const ALE::Obj<Mesh::label_sequence>& cells = boundaryMesh->heightStratum(1);
+  const ALE::Obj<SubMesh::label_sequence>& cells = boundaryMesh->heightStratum(1);
   const int numVertices = boundaryMesh->depthStratum(0)->size();
   const int numCells = cells->size();
 
@@ -90,7 +90,7 @@
   const int boundaryDepth = boundaryMesh->depth()-1; // depth of bndry cells
   ALE::ISieveVisitor::PointRetriever<Mesh::sieve_type> pV(sieve->getMaxConeSize());
   int dp = 0;
-  for(Mesh::label_sequence::iterator c_iter = cells->begin();
+  for(SubMesh::label_sequence::iterator c_iter = cells->begin();
       c_iter != cells->end();
       ++c_iter) {
     const int numCorners = boundaryMesh->getNumCellCorners(*c_iter, boundaryDepth);
@@ -257,6 +257,7 @@
     //iohandler.debug(true);
     iohandler.read(mesh);
     CPPUNIT_ASSERT(!mesh->isNull());
+    (*mesh)->view("Absorbing mesh");
 
     spatialdata::geocoords::CSCart cs;
     cs.setSpaceDim((*mesh)->getDimension());

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMesh.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMesh.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMesh.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -29,6 +29,7 @@
 pylith::bc::TestBoundaryMesh::setUp(void)
 { // setUp
   _data = 0;
+  _flipFault = false;
 } // setUp
 
 // ----------------------------------------------------------------------
@@ -54,25 +55,25 @@
   CPPUNIT_ASSERT(!mesh.isNull());
 
   const char* label = _data->bcLabel;
-  const ALE::Obj<Mesh>& subMesh = 
-    ALE::Selection<Mesh>::submeshV(mesh, mesh->getIntSection(label));
+  const ALE::Obj<SubMesh>& subMesh = 
+    ALE::Selection<Mesh>::submeshV<SubMesh>(mesh, mesh->getIntSection(label));
   CPPUNIT_ASSERT(!subMesh.isNull());
 
   //subMesh->view("SUBMESH WITHOUT FAULT");
 
-  const ALE::Obj<Mesh::label_sequence>& vertices = subMesh->depthStratum(0);
-  const Mesh::label_sequence::iterator verticesEnd = vertices->end();
+  const ALE::Obj<SubMesh::label_sequence>& vertices = subMesh->depthStratum(0);
+  const SubMesh::label_sequence::iterator verticesEnd = vertices->end();
 
   CPPUNIT_ASSERT_EQUAL(_data->numVerticesNoFault, int(vertices->size()));
 
   int ipt = 0;
-  for (Mesh::label_sequence::iterator v_iter=vertices->begin();
+  for (SubMesh::label_sequence::iterator v_iter=vertices->begin();
        v_iter != verticesEnd;
        ++v_iter, ++ipt)
     CPPUNIT_ASSERT_EQUAL(_data->verticesNoFault[ipt], *v_iter);
 
-  const ALE::Obj<Mesh::label_sequence>& cells = subMesh->heightStratum(1);
-  const Mesh::label_sequence::iterator cellsEnd = cells->end();
+  const ALE::Obj<SubMesh::label_sequence>& cells = subMesh->heightStratum(1);
+  const SubMesh::label_sequence::iterator cellsEnd = cells->end();
   const ALE::Obj<sieve_type>& sieve = subMesh->getSieve();
   assert(!sieve.isNull());
 
@@ -82,7 +83,7 @@
 
   int icell = 0;
   int index = 0;
-  for (Mesh::label_sequence::iterator c_iter=cells->begin();
+  for (SubMesh::label_sequence::iterator c_iter=cells->begin();
        c_iter != cellsEnd;
        ++c_iter, ++icell) {
     ALE::ISieveTraversal<sieve_type>::orientedClosure(*sieve, *c_iter, ncV);
@@ -114,26 +115,26 @@
   faults::FaultCohesiveKin fault;
   fault.label(_data->faultLabel);
   fault.id(_data->faultId);
-  fault.adjustTopology(mesh);
+  fault.adjustTopology(mesh, _flipFault);
 
   const char* label = _data->bcLabel;
-  const ALE::Obj<Mesh>& subMesh = 
-    ALE::Selection<Mesh>::submeshV(mesh, mesh->getIntSection(label));
+  const ALE::Obj<SubMesh>& subMesh = 
+    ALE::Selection<Mesh>::submeshV<SubMesh>(mesh, mesh->getIntSection(label));
   CPPUNIT_ASSERT(!subMesh.isNull());
 
-  const ALE::Obj<Mesh::label_sequence>& vertices = subMesh->depthStratum(0);
-  const Mesh::label_sequence::iterator verticesEnd = vertices->end();
+  const ALE::Obj<SubMesh::label_sequence>& vertices = subMesh->depthStratum(0);
+  const SubMesh::label_sequence::iterator verticesEnd = vertices->end();
 
   CPPUNIT_ASSERT_EQUAL(_data->numVerticesFault, int(vertices->size()));
 
   int ipt = 0;
-  for (Mesh::label_sequence::iterator v_iter=vertices->begin();
+  for (SubMesh::label_sequence::iterator v_iter=vertices->begin();
        v_iter != verticesEnd;
        ++v_iter, ++ipt)
     CPPUNIT_ASSERT_EQUAL(_data->verticesFault[ipt], *v_iter);
     
-  const ALE::Obj<Mesh::label_sequence>& cells = subMesh->depthStratum(1);
-  const Mesh::label_sequence::iterator cellsEnd = cells->end();
+  const ALE::Obj<SubMesh::label_sequence>& cells = subMesh->depthStratum(1);
+  const SubMesh::label_sequence::iterator cellsEnd = cells->end();
   const ALE::Obj<sieve_type>& sieve = subMesh->getSieve();
   assert(!sieve.isNull());
   const int depth = 1;
@@ -145,7 +146,7 @@
 
   int icell = 0;
   int index = 0;
-  for (Mesh::label_sequence::iterator c_iter=cells->begin();
+  for (SubMesh::label_sequence::iterator c_iter=cells->begin();
        c_iter != cellsEnd;
        ++c_iter, ++icell) {
     ALE::ISieveTraversal<sieve_type>::orientedClosure(*sieve, *c_iter, ncV);

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMesh.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMesh.hh	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMesh.hh	2008-12-01 23:23:36 UTC (rev 13432)
@@ -56,6 +56,8 @@
 
   BoundaryMeshData* _data; ///< Data for testing
 
+  bool _flipFault;
+
 }; // class TestBoundaryMesh
 
 #endif // pylith_bc_boundarymesh_hh

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshTri3.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestBoundaryMeshTri3.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -16,6 +16,8 @@
 
 #include "data/BoundaryMeshDataTri3.hh" // USES BoundaryMeshDataTri3
 
+#include "pylith/faults/CohesiveTopology.hh"
+
 // ----------------------------------------------------------------------
 CPPUNIT_TEST_SUITE_REGISTRATION( pylith::bc::TestBoundaryMeshTri3 );
 
@@ -25,6 +27,7 @@
 pylith::bc::TestBoundaryMeshTri3::setUp(void)
 { // setUp
   _data = new BoundaryMeshDataTri3();
+  _flipFault = true;
 } // setUp
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletBoundary.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletBoundary.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestDirichletBoundary.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -86,14 +86,14 @@
   const int numFixedDOF = _data->numFixedDOF;
   const size_t numBoundary = _data->numConstrainedPts;
   // Check vertices in boundary mesh
-  const ALE::Obj<Mesh::label_sequence>& vertices = 
+  const ALE::Obj<SubMesh::label_sequence>& vertices = 
     bc._boundaryMesh->depthStratum(0);
-  const Mesh::label_sequence::iterator verticesEnd = vertices->end();
+  const SubMesh::label_sequence::iterator verticesEnd = vertices->end();
 
   const int offset = numCells;
   if (numFixedDOF > 0) {
     int i = 0;
-    for (Mesh::label_sequence::iterator v_iter=vertices->begin();
+    for (SubMesh::label_sequence::iterator v_iter=vertices->begin();
 	 v_iter != verticesEnd;
 	 ++v_iter, ++i) {
       CPPUNIT_ASSERT_EQUAL(_data->constrainedPoints[i]+offset, *v_iter);
@@ -103,7 +103,7 @@
 
   // Check initial and rate values
   int i = 0;
-  for (Mesh::label_sequence::iterator v_iter=vertices->begin();
+  for (SubMesh::label_sequence::iterator v_iter=vertices->begin();
        v_iter != verticesEnd;
        ++v_iter) {
     CPPUNIT_ASSERT_EQUAL(2*numFixedDOF, 

Modified: short/3D/PyLith/trunk/unittests/libtests/bc/TestNeumann.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/TestNeumann.cc	2008-12-01 22:32:55 UTC (rev 13431)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/TestNeumann.cc	2008-12-01 23:23:36 UTC (rev 13432)
@@ -70,13 +70,13 @@
 
   CPPUNIT_ASSERT(0 != _data);
 
-  const ALE::Obj<Mesh>& boundaryMesh = bc._boundaryMesh;
+  const ALE::Obj<SubMesh>& boundaryMesh = bc._boundaryMesh;
 
   // Check boundary mesh
   CPPUNIT_ASSERT(!boundaryMesh.isNull());
 
   const int cellDim = boundaryMesh->getDimension();
-  const ALE::Obj<Mesh::label_sequence>& cells = boundaryMesh->heightStratum(1);
+  const ALE::Obj<SubMesh::label_sequence>& cells = boundaryMesh->heightStratum(1);
   const int numBoundaryVertices = boundaryMesh->depthStratum(0)->size();
   const int numBoundaryCells = cells->size();
 
@@ -100,7 +100,7 @@
 
   // check cell vertices
   int iCell = 0;
-  for(Mesh::label_sequence::iterator c_iter = cells->begin();
+  for(SubMesh::label_sequence::iterator c_iter = cells->begin();
       c_iter != cells->end();
       ++c_iter) {
     const int numCorners = boundaryMesh->getNumCellCorners(*c_iter, boundaryDepth);
@@ -132,7 +132,7 @@
   double_array tractionsCell(fiberDim);
   int index = 0;
 
-  for(Mesh::label_sequence::iterator c_iter = cells->begin();
+  for(SubMesh::label_sequence::iterator c_iter = cells->begin();
       c_iter != cells->end();
       ++c_iter) {
 



More information about the CIG-COMMITS mailing list