[cig-commits] r19127 - in short/3D/PyLith/branches/v1.6-stable/libsrc/pylith: bc faults feassemble meshio

brad at geodynamics.org brad at geodynamics.org
Fri Oct 28 17:26:58 PDT 2011


Author: brad
Date: 2011-10-28 17:26:58 -0700 (Fri, 28 Oct 2011)
New Revision: 19127

Modified:
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/bc/AbsorbingDampers.cc
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveDyn.cc
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveLagrange.cc
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/feassemble/ElasticityExplicit.cc
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/feassemble/ElasticityExplicitLgDeform.cc
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/feassemble/ElasticityImplicit.cc
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/feassemble/ElasticityImplicitLgDeform.cc
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterHDF5.cc
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterHDF5Ext.cc
Log:
Fixed bug in constraining solution for lumped Jacobian. Missing factor of 2 in calculation of relative displacement. Removed guads on maxGetConeSize() and depth() since Sieve defaults are now nonnegative.

Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/bc/AbsorbingDampers.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/bc/AbsorbingDampers.cc	2011-10-28 23:49:25 UTC (rev 19126)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/bc/AbsorbingDampers.cc	2011-10-29 00:26:58 UTC (rev 19127)
@@ -591,8 +591,7 @@
   const ALE::Obj<SieveMesh::sieve_type>& sieve = sieveMesh->getSieve();
   assert(!sieve.isNull());
   const int closureSize = 
-    std::max(0, int(pow(sieve->getMaxConeSize(), 
-			std::max(0, sieveMesh->depth()))));
+    int(pow(sieve->getMaxConeSize(), sieveMesh->depth()));
   IndicesVisitor jacobianVisitor(*solutionSection, *globalOrder,
 				 closureSize*spaceDim);
 

Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveDyn.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveDyn.cc	2011-10-28 23:49:25 UTC (rev 19126)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveDyn.cc	2011-10-29 00:26:58 UTC (rev 19127)
@@ -1097,7 +1097,7 @@
 	areaVertex * dLagrangeTpdtVertexGlobal[iDim] / jacobianVertexP[iDim];
 
       // Set increment in relative displacement.
-      dispRelVertex[iDim] = -areaVertex * dLagrangeTpdtVertexGlobal[iDim] / 
+      dispRelVertex[iDim] = -areaVertex * 2.0*dLagrangeTpdtVertexGlobal[iDim] / 
 	(jacobianVertexN[iDim] + jacobianVertexP[iDim]);
 
       // Update increment in Lagrange multiplier.
@@ -1661,9 +1661,9 @@
   const ALE::Obj<SieveMesh::sieve_type>& sieve = sieveMesh->getSieve();
   assert(!sieve.isNull());
   const int closureSize = 
-    std::max(0, int(pow(sieve->getMaxConeSize(), 
-			std::max(0, sieveMesh->depth()))));
-  ALE::ISieveVisitor::NConeRetriever<SieveMesh::sieve_type>
+    int(pow(sieve->getMaxConeSize(), sieveMesh->depth()));
+  assert(closureSize >= 0);
+  ALE::ISieveVisitor::NConeRetriever<SieveMesh::sieve_type> 
     ncV(*sieve, closureSize);
   int_array indicesGlobal(subnrows);
 

Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveLagrange.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveLagrange.cc	2011-10-28 23:49:25 UTC (rev 19126)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveLagrange.cc	2011-10-29 00:26:58 UTC (rev 19127)
@@ -1088,8 +1088,8 @@
   const ALE::Obj<SieveMesh::sieve_type>& sieve = mesh.sieveMesh()->getSieve();
   assert(!sieve.isNull());
   const int closureSize = 
-    std::max(0, int(pow(sieve->getMaxConeSize(), 
-			std::max(0, faultSieveMesh->depth()))));
+    int(pow(sieve->getMaxConeSize(), faultSieveMesh->depth()));
+  assert(closureSize >= 0);
   ALE::ISieveVisitor::NConeRetriever<SieveMesh::sieve_type>
     ncV(*sieve, closureSize);
 
@@ -1251,8 +1251,8 @@
   const ALE::Obj<SieveSubMesh::sieve_type>& sieve = faultSieveMesh->getSieve();
   assert(!sieve.isNull());
   const int closureSize = 
-    std::max(0, int(pow(sieve->getMaxConeSize(), 
-			std::max(0, faultSieveMesh->depth()))));
+    int(pow(sieve->getMaxConeSize(), faultSieveMesh->depth()));
+  assert(closureSize >= 0);
   ALE::ISieveVisitor::NConeRetriever<SieveMesh::sieve_type>
     ncV(*sieve, closureSize);
 

Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/feassemble/ElasticityExplicit.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/feassemble/ElasticityExplicit.cc	2011-10-28 23:49:25 UTC (rev 19126)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/feassemble/ElasticityExplicit.cc	2011-10-29 00:26:58 UTC (rev 19127)
@@ -726,9 +726,9 @@
   const ALE::Obj<SieveMesh::sieve_type>& sieve = sieveMesh->getSieve();
   assert(!sieve.isNull());
   const int closureSize = 
-    std::max(0, int(pow(sieve->getMaxConeSize(), 
-			std::max(0, sieveMesh->depth()))));
-  IndicesVisitor jacobianVisitor(*solnSection, *globalOrder,
+    int(pow(sieve->getMaxConeSize(), sieveMesh->depth()));
+  assert(closureSize >= 0);
+  IndicesVisitor jacobianVisitor(*solnSection, *globalOrder, 
 				 closureSize*spaceDim);
 
   double_array coordinatesCell(numBasis*spaceDim);

Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/feassemble/ElasticityExplicitLgDeform.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/feassemble/ElasticityExplicitLgDeform.cc	2011-10-28 23:49:25 UTC (rev 19126)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/feassemble/ElasticityExplicitLgDeform.cc	2011-10-29 00:26:58 UTC (rev 19127)
@@ -650,8 +650,8 @@
   const ALE::Obj<SieveMesh::sieve_type>& sieve = sieveMesh->getSieve();
   assert(!sieve.isNull());
   const int closureSize = 
-    std::max(0, int(pow(sieve->getMaxConeSize(), 
-			std::max(0, sieveMesh->depth()))));
+    int(pow(sieve->getMaxConeSize(), sieveMesh->depth()));
+  assert(closureSize >= 0);
   IndicesVisitor jacobianVisitor(*solnSection, *globalOrder,
 				 closureSize*spaceDim);
 

Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/feassemble/ElasticityImplicit.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/feassemble/ElasticityImplicit.cc	2011-10-28 23:49:25 UTC (rev 19126)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/feassemble/ElasticityImplicit.cc	2011-10-29 00:26:58 UTC (rev 19127)
@@ -413,8 +413,8 @@
   const ALE::Obj<SieveMesh::sieve_type>& sieve = sieveMesh->getSieve();
   assert(!sieve.isNull());
   const int closureSize = 
-    std::max(0, int(pow(sieve->getMaxConeSize(), 
-			std::max(0, sieveMesh->depth()))));
+    int(pow(sieve->getMaxConeSize(), sieveMesh->depth()));
+  assert(closureSize >= 0);
   IndicesVisitor jacobianVisitor(*dispTSection, *globalOrder,
 				 closureSize*spaceDim);
 

Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/feassemble/ElasticityImplicitLgDeform.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/feassemble/ElasticityImplicitLgDeform.cc	2011-10-28 23:49:25 UTC (rev 19126)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/feassemble/ElasticityImplicitLgDeform.cc	2011-10-29 00:26:58 UTC (rev 19127)
@@ -408,8 +408,8 @@
   const ALE::Obj<SieveMesh::sieve_type>& sieve = sieveMesh->getSieve();
   assert(!sieve.isNull());
   const int closureSize = 
-    std::max(0, int(pow(sieve->getMaxConeSize(), 
-			std::max(0, sieveMesh->depth()))));
+    int(pow(sieve->getMaxConeSize(), sieveMesh->depth()));
+  assert(closureSize >= 0);
   IndicesVisitor jacobianVisitor(*dispTSection, *globalOrder, 
 				 closureSize*spaceDim);
 

Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterHDF5.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterHDF5.cc	2011-10-28 23:49:25 UTC (rev 19126)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterHDF5.cc	2011-10-29 00:26:58 UTC (rev 19127)
@@ -171,12 +171,11 @@
 
     const Obj<sieve_type>& sieve = sieveMesh->getSieve();
     assert(!sieve.isNull());
+    const int closureSize = 
+      int(pow(sieve->getMaxConeSize(), sieveMesh->depth()));
+    assert(closureSize >= 0);
+    ALE::ISieveVisitor::NConeRetriever<sieve_type> ncV(*sieve, closureSize);
 
-  const int closureSize = 
-    std::max(0, int(pow(sieve->getMaxConeSize(), 
-			std::max(0, sieveMesh->depth()))));
-  ALE::ISieveVisitor::NConeRetriever<sieve_type> ncV(*sieve, closureSize);
-
     int k = 0;
     const typename label_sequence::const_iterator cellsEnd = cells->end();
     for (typename label_sequence::iterator c_iter=cells->begin();

Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterHDF5Ext.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterHDF5Ext.cc	2011-10-28 23:49:25 UTC (rev 19126)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterHDF5Ext.cc	2011-10-29 00:26:58 UTC (rev 19127)
@@ -187,8 +187,8 @@
     const Obj<sieve_type>& sieve = sieveMesh->getSieve();
     assert(!sieve.isNull());
     const int closureSize = 
-      std::max(0, int(pow(sieve->getMaxConeSize(), 
-			  std::max(0, sieveMesh->depth()))));
+      int(pow(sieve->getMaxConeSize(), sieveMesh->depth()));
+    assert(closureSize >= 0);
     ALE::ISieveVisitor::NConeRetriever<sieve_type> ncV(*sieve, closureSize);
     
     int k = 0;



More information about the CIG-COMMITS mailing list