[cig-commits] r12048 - in short/3D/PyLith/trunk/libsrc: faults feassemble

knepley at geodynamics.org knepley at geodynamics.org
Wed May 28 17:01:43 PDT 2008


Author: knepley
Date: 2008-05-28 17:01:43 -0700 (Wed, 28 May 2008)
New Revision: 12048

Modified:
   short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
   short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc
Log:
Correct cohesive cell creation for multiple processes


Modified: short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc	2008-05-28 22:06:42 UTC (rev 12047)
+++ short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc	2008-05-29 00:01:43 UTC (rev 12048)
@@ -90,9 +90,9 @@
   }
 
   // This only works for uninterpolated meshes
-  assert(mesh->depth() == 1);
-  ALE::ISieveVisitor::PointRetriever<sieve_type> sV(sieve->getMaxSupportSize());
-  ALE::ISieveVisitor::PointRetriever<sieve_type> cV(sieve->getMaxConeSize());
+  assert((mesh->depth() == 1) || (mesh->depth() == -1));
+  ALE::ISieveVisitor::PointRetriever<sieve_type> sV(std::max(1, sieve->getMaxSupportSize()));
+  ALE::ISieveVisitor::PointRetriever<sieve_type> cV(std::max(1, sieve->getMaxConeSize()));
   for(PointSet::const_iterator fv_iter = fvBegin; fv_iter != fvEnd; ++fv_iter) {
     sieve->support(*fv_iter, sV);
     const Mesh::point_type *support = sV.getPoints();
@@ -423,8 +423,8 @@
   PointSet replaceCells;
   PointSet noReplaceCells;
   PointSet replaceVertices;
-  ALE::ISieveVisitor::PointRetriever<sieve_type> sV2(ifaultSieve->getMaxSupportSize());
-  ALE::ISieveVisitor::NConeRetriever<sieve_type> cV2(*ifaultSieve, (size_t) pow(ifaultSieve->getMaxConeSize(), (*ifault)->depth()));
+  ALE::ISieveVisitor::PointRetriever<sieve_type> sV2(std::max(1, ifaultSieve->getMaxSupportSize()));
+  ALE::ISieveVisitor::NConeRetriever<sieve_type> cV2(*ifaultSieve, (size_t) pow(std::max(1, ifaultSieve->getMaxConeSize()), (*ifault)->depth()));
 
   for(Mesh::label_sequence::iterator f_iter = faces->begin(); f_iter != faces->end(); ++f_iter, ++newPoint) {
     const Mesh::point_type face = *f_iter;
@@ -612,7 +612,7 @@
       }
     }
   }
-  ReplaceVisitor<sieve_type,std::map<Mesh::point_type,Mesh::point_type> > rVc(vertexRenumber, sieve->getMaxConeSize(), debug);
+  ReplaceVisitor<sieve_type,std::map<Mesh::point_type,Mesh::point_type> > rVc(vertexRenumber, std::max(1, sieve->getMaxConeSize()), debug);
 
   for(PointSet::const_iterator c_iter = replaceCells.begin(); c_iter != replaceCells.end(); ++c_iter) {
     sieve->cone(*c_iter, rVc);
@@ -622,7 +622,7 @@
     }
     rVc.clear();
   }
-  ReplaceVisitor<sieve_type,std::map<Mesh::point_type,Mesh::point_type> > rVs(cellRenumber, sieve->getMaxSupportSize(), debug);
+  ReplaceVisitor<sieve_type,std::map<Mesh::point_type,Mesh::point_type> > rVs(cellRenumber, std::max(1, sieve->getMaxSupportSize()), debug);
 
   for(PointSet::const_iterator v_iter = replaceVertices.begin(); v_iter != replaceVertices.end(); ++v_iter) {
     sieve->support(*v_iter, rVs);

Modified: short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc	2008-05-28 22:06:42 UTC (rev 12047)
+++ short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc	2008-05-29 00:01:43 UTC (rev 12048)
@@ -337,7 +337,6 @@
 
   const ALE::Obj<Mesh::order_type>& globalOrder = mesh->getFactory()->getGlobalOrder(mesh, "default", dispTBctpdt);
   assert(!globalOrder.isNull());
-  globalOrder->view("Global Order for Jacobian");
   visitor_type iV(*dispTBctpdt, *globalOrder, (int) pow(mesh->getSieve()->getMaxConeSize(), mesh->depth())*spaceDim);
 
   // Loop over cells



More information about the cig-commits mailing list