[cig-commits] r14911 - in short/3D/PyLith/trunk: . doc/presentations/pylith1.3 libsrc/bc libsrc/faults

brad at geodynamics.org brad at geodynamics.org
Wed May 6 17:41:18 PDT 2009


Author: brad
Date: 2009-05-06 17:41:17 -0700 (Wed, 06 May 2009)
New Revision: 14911

Modified:
   short/3D/PyLith/trunk/README
   short/3D/PyLith/trunk/TODO
   short/3D/PyLith/trunk/doc/presentations/pylith1.3/pylith_overview.tex
   short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc
   short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
Log:
A little cleanup.

Modified: short/3D/PyLith/trunk/README
===================================================================
--- short/3D/PyLith/trunk/README	2009-05-06 23:39:57 UTC (rev 14910)
+++ short/3D/PyLith/trunk/README	2009-05-07 00:41:17 UTC (rev 14911)
@@ -56,6 +56,9 @@
 (e.g., CellFilterAvg is now CellFilterAvgMesh or
 CellFilterAvgSubMesh). This is related to the use of templates.
 
+(5) The DirichletPoints boundary condition has been renamed to
+DirichletBC.
+
 STILL ON THE TODO LIST
 
 (5) Nondimensionalization of the problem eliminates the need to

Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO	2009-05-06 23:39:57 UTC (rev 14910)
+++ short/3D/PyLith/trunk/TODO	2009-05-07 00:41:17 UTC (rev 14911)
@@ -6,6 +6,12 @@
 
 0. SWIG conversion [Brad]
 
+  (1) Finish initial stress/strain for materials.
+
+    pylith/materials/ElasticMaterial.py
+      initial_stress_db
+      initial_strain_db
+
   (3) Full-scale tests (few 1-D, 2-D, and 3-D)
 
     1-D
@@ -30,8 +36,9 @@
       5. single fault (dynamic)
       6. two fault (static)
       7. two fault (static, parallel)
- 
+      8. gravity w/initial stress and strain 
 
+
   (4) SNES
     Reformulate implicit time stepping to use displacement increment.
     Solution fields should be disp(t) and dispIncr(t).
@@ -39,6 +46,43 @@
 
   (5) Add missing unit tests
 
+    pytests.meshio.TestOutputSoln
+    pytests.meshio.TestOutputDirichlet
+    pytests.meshio.TestOutputFaultKin
+    pytests.meshio.TestOutputMatElastic
+    pytests.meshio.TestOutputNeumann
+
+    add test_factory() methods to Python unit tests
+
+    pytests
+      test_configure
+
+    libtests/materials
+      Cleanup testUpdateStateVars for Maxwell models
+
+    libtests/bc/TestDirichletBoundary::testVertexField()
+    libtests/bc/TestDirichletBoundary::testBoundaryMesh()
+
+    pytests/bc/TestDirichletBoundary
+    pytests/bc/TestNeumann (output)
+
+    libtests/feassemble/ElasticityExplict
+      testVerifyConfiguration()
+      testCellField()
+    libtests/feassemble/ElasticityImplict
+      testVerifyConfiguration()
+      testCellField()
+    libtests/materials/Material
+      propertyField()
+      stateVarField()
+
+    Need unit tests
+      MeshIO::normalizer()
+      Material::normalizer()
+      Constraint::normalizer()
+      Integrator::normalizer()
+      DataWriter::normalizer()
+
   (6) Tidy up
 
     How do we determine the orientation for a fault in a 1-D mesh? We
@@ -57,15 +101,6 @@
 
     Eliminate use of Inventory class.
 
-    add test_factory() methods to Python unit tests
-
-    Cleanup error checking on PETSc calls.
-      FaultCohesiveKin
-      DataWriterVTK
-
-    pytests
-      test_configure
-
     Switch Components to PetscComponents.
       Add _cleanup() to components to deallocate local data structures.
       Add cleanup() to non-components to deallocate local data structures.
@@ -77,43 +112,12 @@
     Add check before calling newSection() when want to enforce at
     least 1 value.
 
-    Distribution debug (dump VTK) needs Nondimensional
-
-  pylith/materials/ElasticMaterial.py
-    initial_stress_db
-    initial_strain_db
-
   libsrc/materials
     Generalized Maxwell materials
 
-  libtests/materials
-    Cleanup testUpdateStateVars for Maxwell models
-
-  libtests/bc/TestDirichletBoundary::testVertexField()
-  libtests/bc/TestDirichletBoundary::testBoundaryMesh()
-
-  pytests/bc/TestDirichletBoundary
-  pytests/bc/TestNeumann (output)
-
-  libtests/feassemble/ElasticityExplict
-    testVerifyConfiguration()
-    testCellField()
-  libtests/feassemble/ElasticityImplict
-    testVerifyConfiguration()
-    testCellField()
-  libtests/materials/Material
-    propertyField()
-    stateVarField()
-
-  DirichletPoints (Python) - rate == None -> dbRate == 0
+  DirichletBC (Python) - rate == None -> dbRate == 0
   DirichletBoundary (Python) - rate == None -> dbRate == 0
 
-  pytests.meshio.TestOutputSoln
-  pytests.meshio.TestOutputDirichlet
-  pytests.meshio.TestOutputFaultKin
-  pytests.meshio.TestOutputMatElastic
-  pytests.meshio.TestOutputNeumann
-
 1. Memory model [Matt]
    playpen/memcheck/*
 
@@ -124,13 +128,6 @@
       solution in output (nondimensional instead of dimensioned)
       const slip rate in output (slip rate not slip)          
 
-    Need unit tests
-      MeshIO::normalizer()
-      Material::normalizer()
-      Constraint::normalizer()
-      Integrator::normalizer()
-      DataWriter::normalizer()
-
 3. 3-D Power-law rheology [Charles]
 
 4. 2-D Plane strain Maxwell viscoelastic rheology [Charles]

Modified: short/3D/PyLith/trunk/doc/presentations/pylith1.3/pylith_overview.tex
===================================================================
--- short/3D/PyLith/trunk/doc/presentations/pylith1.3/pylith_overview.tex	2009-05-06 23:39:57 UTC (rev 14910)
+++ short/3D/PyLith/trunk/doc/presentations/pylith1.3/pylith_overview.tex	2009-05-07 00:41:17 UTC (rev 14911)
@@ -41,7 +41,6 @@
     \item Planned releases
     \end{itemize}
   \item Benchmark results
-  \item Current development
   \end{itemize}
 
 \bgadd{\vspace*{7.9in}%
@@ -74,7 +73,7 @@
     \begin{itemize}
     \item Strain accumulation associated with interseismic deformation
     \item Post-seismic relaxation of the crust
-    \item Volcanic deformation due to ??
+    \item Volcanic deformation associated with magma chambers and/or dikes
     \end{itemize}
   \item Dynamic rupture and wave propagation
     \begin{itemize}
@@ -115,7 +114,7 @@
 
   \begin{itemize}
   \item Automatic and user-controlled time stepping
-  \item Solution as perturbation from an initial stress state
+  \item Ability to specify initial stress state
   \item Importing meshes
     \begin{itemize}
     \item LaGriT: GMV/Pset

Modified: short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc	2009-05-06 23:39:57 UTC (rev 14910)
+++ short/3D/PyLith/trunk/libsrc/bc/AbsorbingDampers.cc	2009-05-07 00:41:17 UTC (rev 14911)
@@ -363,8 +363,6 @@
   assert(0 != jacobian);
   assert(0 != fields);
 
-  typedef ALE::ISieveVisitor::IndicesVisitor<RealSection,SieveMesh::order_type,PetscInt> visitor_type;
-
   // Get cell geometry information that doesn't depend on cell
   const int numQuadPts = _quadrature->numQuadPts();
   const double_array& quadWts = _quadrature->quadWts();
@@ -393,9 +391,10 @@
     sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "default", 
 					    solutionSection);
   assert(!globalOrder.isNull());
-  visitor_type iV(*solutionSection, *globalOrder,
-		  (int) pow(sieveMesh->getSieve()->getMaxConeSize(),
-			    sieveMesh->depth())*spaceDim);
+  topology::Mesh::IndicesVisitor jacobianVisitor(*solutionSection,
+						 *globalOrder,
+			   (int) pow(sieveMesh->getSieve()->getMaxConeSize(),
+				     sieveMesh->depth())*spaceDim);
 
   // Get sparse matrix
   const PetscMat jacobianMat = jacobian->matrix();
@@ -444,11 +443,11 @@
     PetscLogFlops(numQuadPts*(3+numBasis*(1+numBasis*(1+2*spaceDim))));
     
     // Assemble cell contribution into PETSc Matrix
+    jacobianVisitor.clear();
     PetscErrorCode err = updateOperator(jacobianMat, *submesh->getSieve(), 
-					iV, *c_iter, &_cellMatrix[0], 
-					ADD_VALUES);
+					jacobianVisitor, *c_iter,
+					&_cellMatrix[0], ADD_VALUES);
     CHECK_PETSC_ERROR_MSG(err, "Update to PETSc Mat failed.");
-    iV.clear();
   } // for
 
   _needNewJacobian = false;

Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc	2009-05-06 23:39:57 UTC (rev 14910)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc	2009-05-07 00:41:17 UTC (rev 14911)
@@ -291,7 +291,7 @@
       const int indexK = iConstraint + 2*numConstraintVert;
 
       const double pseudoStiffness = stiffnessCell[iConstraint];
-      //assert(areaAssembledCell[iConstraint] > 0);
+      assert(areaAssembledCell[iConstraint] > 0);
       const double wt = pseudoStiffness * 
 	areaCell[iConstraint] / areaAssembledCell[iConstraint];
       
@@ -441,8 +441,6 @@
   // direction cosines. Entries are associated with vertices ik, jk,
   // ki, and kj.
 
-  PetscErrorCode err = 0;
-
   // Get cohesive cells
   const ALE::Obj<SieveMesh>& sieveMesh = fields->mesh().sieveMesh();
   assert(!sieveMesh.isNull());
@@ -581,8 +579,9 @@
 
     // Insert cell contribution into PETSc Matrix
     jacobianVisitor.clear();
-    err = updateOperator(jacobianMatrix, *sieveMesh->getSieve(),
-			 jacobianVisitor, *c_iter, &matrixCell[0], INSERT_VALUES);
+    PetscErrorCode err = updateOperator(jacobianMatrix, *sieveMesh->getSieve(),
+					      jacobianVisitor, *c_iter,
+					      &matrixCell[0], INSERT_VALUES);
     CHECK_PETSC_ERROR_MSG(err, "Update to PETSc Mat failed.");
   } // for
   PetscLogFlops(cellsCohesiveSize*numConstraintVert*spaceDim*spaceDim*4);



More information about the CIG-COMMITS mailing list