[cig-commits] r18240 - in short/3D/PyLith/trunk: . doc/releasenotes libsrc/meshio libsrc/problems libsrc/topology pylith/feassemble pylith/problems

brad at geodynamics.org brad at geodynamics.org
Mon Apr 18 14:55:24 PDT 2011


Author: brad
Date: 2011-04-18 14:55:23 -0700 (Mon, 18 Apr 2011)
New Revision: 18240

Added:
   short/3D/PyLith/trunk/doc/releasenotes/announce_v1.5.2.txt
Modified:
   short/3D/PyLith/trunk/README
   short/3D/PyLith/trunk/TODO
   short/3D/PyLith/trunk/doc/releasenotes/checklist.txt
   short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc
   short/3D/PyLith/trunk/libsrc/meshio/MeshIOSieve.cc
   short/3D/PyLith/trunk/libsrc/problems/Solver.cc
   short/3D/PyLith/trunk/libsrc/problems/SolverNonlinear.cc
   short/3D/PyLith/trunk/libsrc/topology/Jacobian.cc
   short/3D/PyLith/trunk/libsrc/topology/Mesh.cc
   short/3D/PyLith/trunk/pylith/feassemble/FIATLagrange.py
   short/3D/PyLith/trunk/pylith/problems/Problem.py
Log:
Merge from stable.

Modified: short/3D/PyLith/trunk/README
===================================================================
--- short/3D/PyLith/trunk/README	2011-04-18 20:03:41 UTC (rev 18239)
+++ short/3D/PyLith/trunk/README	2011-04-18 21:55:23 UTC (rev 18240)
@@ -1,4 +1,4 @@
-We are pleased to announce release of PyLith version 1.5.1
+We are pleased to announce release of PyLith version 1.5.2
 
 Please submit bug reports via the World Wide Web at:
     http://geodynamics.org/roundup    
@@ -97,6 +97,37 @@
 the up-dip direction.
 
 ----------------------------------------------------------------------
+Version 1.5.2
+----------------------------------------------------------------------
+
+  * PyLith 1.5.2 requires FIAT version 0.9.9 or later and an updated
+    PETSc development version. It also requires users to update to the
+    latest spatialdata version for compatibility of the SWIG generated
+    files. These are included in the binary distribution, but users
+    building PyLith from source will need to update FIAT, PETSc, and
+    spatialdata.
+
+  * Bug fixes
+
+    - Fixed setting of elastic constants in DruckerPrager3D and
+      computation of the yield function. Some off-diagonal elasticity
+      constants were off by a factor of 2.0 and the yield function was
+      missing a factor of 0.5 and sqrt().
+
+    - Fixed computation of stable time step when using initial
+      stresses with PowerLaw3D. If effective stress is zero, then
+      stable time step is infinite.
+
+    - Re-enabled check for compatibility of quadrature scheme and
+      cells for bulk rheologies.
+
+    - Added check to configure for compatible version of FIAT.
+
+    - Fixed bug where buffer for output of initial stresses for
+      dynamic (spontaneous) rupture.
+
+
+----------------------------------------------------------------------
 Version 1.5.1
 ----------------------------------------------------------------------
 

Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO	2011-04-18 20:03:41 UTC (rev 18239)
+++ short/3D/PyLith/trunk/TODO	2011-04-18 21:55:23 UTC (rev 18240)
@@ -2,8 +2,6 @@
 CURRENT ISSUES/PRIORITIES (1.6.0)
 ======================================================================
 
-If dimension of problem doesn't match dimension of mesh, 
-
 Strip whitespace from UniformDB values and names.
 
 * Memory model [MATT and BRAD]

Copied: short/3D/PyLith/trunk/doc/releasenotes/announce_v1.5.2.txt (from rev 18236, short/3D/PyLith/branches/v1.5-stable/doc/releasenotes/announce_v1.5.2.txt)
===================================================================
--- short/3D/PyLith/trunk/doc/releasenotes/announce_v1.5.2.txt	                        (rev 0)
+++ short/3D/PyLith/trunk/doc/releasenotes/announce_v1.5.2.txt	2011-04-18 21:55:23 UTC (rev 18240)
@@ -0,0 +1,49 @@
+Greetings,
+
+I am pleased to announce the release of PyLith 1.5.2, a finite-element
+code designed to solve dynamic elastic problems and quasi-static
+viscoelastic problems in tectonic deformation.
+
+This release fixes several bugs in v1.5.1. We strongly recommend
+all users of previous PyLith releases to switch to this latest
+release. See the README file for changes required to switch to the
+v1.5.x release series from previous versions.
+
+You can download the source code and binaries from
+
+    http://geodynamics.org/cig/software/packages/short/pylith
+
+Detailed installation instructions are in the User Manual with example
+installation procedures for a few platforms in the bundled doc/install
+directory.
+
+
+RELEASE NOTES
+
+  * PyLith 1.5.2 requires FIAT version 0.9.9 or later and an updated
+    PETSc development version. It also requires users to update to the
+    latest spatialdata version for compatibility of the SWIG generated
+    files. These are included in the binary distribution, but users
+    building PyLith from source will need to update FIAT, PETSc, and
+    spatialdata.
+
+  * Bug fixes
+
+    - Fixed setting of elastic constants in DruckerPrager3D and
+      computation of the yield function. Some off-diagonal elasticity
+      constants were off by a factor of 2.0 and the yield function was
+      missing a factor of 0.5 and sqrt().
+
+    - Fixed computation of stable time step when using initial
+      stresses with PowerLaw3D. If effective stress is zero, then
+      stable time step is infinite.
+
+    - Re-enabled check for compatibility of quadrature scheme and
+      cells for bulk rheologies.
+
+    - Added check to configure for compatible version of FIAT.
+
+    - Fixed bug where buffer for output of initial stresses for
+      dynamic (spontaneous) rupture.
+
+

Modified: short/3D/PyLith/trunk/doc/releasenotes/checklist.txt
===================================================================
--- short/3D/PyLith/trunk/doc/releasenotes/checklist.txt	2011-04-18 20:03:41 UTC (rev 18239)
+++ short/3D/PyLith/trunk/doc/releasenotes/checklist.txt	2011-04-18 21:55:23 UTC (rev 18240)
@@ -26,6 +26,8 @@
 
   * Increment version number in configure.ac.
 
+  * Increment version number in setup.py.
+
   * Add changes to README.
 
   * Add release notes in doc/releasenotes.

Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc	2011-04-18 20:03:41 UTC (rev 18239)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc	2011-04-18 21:55:23 UTC (rev 18240)
@@ -23,8 +23,6 @@
 #include "pylith/topology/Mesh.hh" // USES Mesh
 #include "pylith/utils/array.hh" // USES double_array, int_array
 
-#include "spatialdata/geocoords/CoordSys.hh" // USES CoordSys
-
 #include "Selection.hh" // USES boundary()
 
 #include <cassert> // USES assert()

Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIOSieve.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIOSieve.cc	2011-04-18 20:03:41 UTC (rev 18239)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIOSieve.cc	2011-04-18 21:55:23 UTC (rev 18240)
@@ -20,7 +20,7 @@
 
 #include "MeshIOSieve.hh" // implementation of class methods
 
-#include <petscdmmesh.hh>
+#include "petscdmmesh.hh"
 
 #include "MeshBuilder.hh" // USES MeshBuilder
 #include "pylith/topology/Mesh.hh" // USES Mesh

Modified: short/3D/PyLith/trunk/libsrc/problems/Solver.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/problems/Solver.cc	2011-04-18 20:03:41 UTC (rev 18239)
+++ short/3D/PyLith/trunk/libsrc/problems/Solver.cc	2011-04-18 21:55:23 UTC (rev 18240)
@@ -111,9 +111,11 @@
   assert(!solutionSection.isNull());
   const ALE::Obj<SieveMesh>& sieveMesh = fields.solution().mesh().sieveMesh();
   assert(!sieveMesh.isNull());
-  if (solutionSection->getNumSpaces() > sieveMesh->getDimension() && 0 != _precondMatrix) {
+
+  PetscErrorCode err = 0;
+  if (solutionSection->getNumSpaces() > sieveMesh->getDimension() &&
+      _precondMatrix) {
     PetscInt M, N, m, n;
-    PetscErrorCode err;
 
     err = MatGetSize(jacobianMat, &M, &N);CHECK_PETSC_ERROR(err);
     err = MatGetLocalSize(jacobianMat, &m, &n);CHECK_PETSC_ERROR(err);
@@ -123,11 +125,9 @@
     _ctx.faultFieldName = "3";
     _ctx.faultA         = _precondMatrix;
   } else {
-    PetscErrorCode err;
-
     _jacobianPre = jacobianMat;
     err = PetscObjectReference((PetscObject) jacobianMat);CHECK_PETSC_ERROR(err);
-  }
+  } // if/else
 
   _formulation = formulation;
 } // initialize

Modified: short/3D/PyLith/trunk/libsrc/problems/SolverNonlinear.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/problems/SolverNonlinear.cc	2011-04-18 20:03:41 UTC (rev 18239)
+++ short/3D/PyLith/trunk/libsrc/problems/SolverNonlinear.cc	2011-04-18 21:55:23 UTC (rev 18240)
@@ -259,7 +259,6 @@
   // minimization problem:
   // min  z(x):  R^n -> R,
   // where z(x) = .5 * fnorm*fnorm, and fnorm = || f ||_2.
- 
   typedef pylith::problems::_SolverNonlinear::SNES_LS SNES_LS;
        
   PetscReal      initslope,lambdaprev,gnormprev,a,b,d,t1,t2,rellength;

Modified: short/3D/PyLith/trunk/libsrc/topology/Jacobian.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/Jacobian.cc	2011-04-18 20:03:41 UTC (rev 18239)
+++ short/3D/PyLith/trunk/libsrc/topology/Jacobian.cc	2011-04-18 21:55:23 UTC (rev 18240)
@@ -43,12 +43,8 @@
   // dimension, otherwise use a block size of 1.
   const int blockFlag = (blockOkay) ? -1 : 1;
 
-#if 0
-  sieveMesh->getFactory()->getGlobalOrder(sieveMesh, fieldSection->getName(), fieldSection)->view("Global Order");
-  sieveMesh->setDebug(3);
-#endif
   PetscErrorCode err = DMMeshCreateMatrix(sieveMesh, fieldSection,
-                                          matrixType, &_matrix, blockFlag);
+					matrixType, &_matrix, blockFlag);
   CHECK_PETSC_ERROR_MSG(err, "Could not create PETSc sparse matrix "
 			"associated with system Jacobian.");
   logger.stagePop();
@@ -74,7 +70,7 @@
   const int blockFlag = (blockOkay) ? -1 : 1;
 
   PetscErrorCode err = DMMeshCreateMatrix(sieveMesh, fieldSection,
-                                          matrixType, &_matrix, blockFlag);
+					  matrixType, &_matrix, blockFlag);
   CHECK_PETSC_ERROR_MSG(err, "Could not create PETSc sparse matrix "
       "associated with subsystem Jacobian.");
   logger.stagePop();

Modified: short/3D/PyLith/trunk/libsrc/topology/Mesh.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/topology/Mesh.cc	2011-04-18 20:03:41 UTC (rev 18239)
+++ short/3D/PyLith/trunk/libsrc/topology/Mesh.cc	2011-04-18 21:55:23 UTC (rev 18240)
@@ -119,33 +119,30 @@
   const SieveMesh::label_sequence::iterator verticesEnd = 
     vertices->end();
 
-  assert(0 != _coordsys);
-  const int spaceDim = _coordsys->spaceDim();
-  double_array coordsVertex(spaceDim);
-  double_array coordsDimVertex(spaceDim);
-
-  int i = 0;
+  double coordsVertex[3];
   for (SieveMesh::label_sequence::iterator v_iter=verticesBegin;
       v_iter != verticesEnd;
       ++v_iter) {
-    coordsSection->restrictPoint(*v_iter,
-			       &coordsVertex[0], coordsVertex.size());
+    const int spaceDim = coordsSection->getFiberDimension(*v_iter);
+    assert(spaceDim <= 3);
+    const double* coordsDimVertex = coordsSection->restrictPoint(*v_iter);
+    
+    // Update section with dimensioned coordinates
+    assert(spaceDim == 
+	   coordsDimSection->getFiberDimension(*v_iter));
+    coordsDimSection->updatePoint(*v_iter, coordsDimVertex);
 
-    // Save dimensioned coordinates in coordsDimVertex
-    coordsDimVertex = coordsVertex;
+    // Copy coordinates to array for nondimensionalization.
+    for (int i=0; i < spaceDim; ++i)
+      coordsVertex[i] = coordsDimVertex[i];
 
     // Nondimensionalize original coordinates.
     normalizer.nondimensionalize(&coordsVertex[0], spaceDim, lengthScale);
-
+    
     // Update section with nondimensional coordinates
-    assert(coordsVertex.size() == 
+    assert(spaceDim == 
 	   coordsSection->getFiberDimension(*v_iter));
-    coordsSection->updatePoint(*v_iter, &coordsVertex[0]);
-    
-    // Update section with dimensioned coordinates
-    assert(coordsDimVertex.size() == 
-	   coordsDimSection->getFiberDimension(*v_iter));
-    coordsDimSection->updatePoint(*v_iter, &coordsDimVertex[0]);
+    coordsSection->updatePoint(*v_iter, coordsVertex);
   } // for
 } // nondimensionalize
 

Modified: short/3D/PyLith/trunk/pylith/feassemble/FIATLagrange.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/FIATLagrange.py	2011-04-18 20:03:41 UTC (rev 18239)
+++ short/3D/PyLith/trunk/pylith/feassemble/FIATLagrange.py	2011-04-18 21:55:23 UTC (rev 18240)
@@ -445,8 +445,9 @@
       elif 3 == spaceDim:
         self.geometry = CellGeometry.GeometryPoint3D()
     if None == self.geometry:
-      raise ValueError("Could not set shape of cell for '%s' in spatial " \
-                       "dimension '%s'." % (self.name, spaceDim))
+      raise ValueError("Could not set shape of %dD cell for "
+                       "Quadrature object '%s' in spatial " \
+                       "dimension '%d'." % (self.cellDim, self.name, spaceDim))
     return
   
 

Modified: short/3D/PyLith/trunk/pylith/problems/Problem.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Problem.py	2011-04-18 20:03:41 UTC (rev 18239)
+++ short/3D/PyLith/trunk/pylith/problems/Problem.py	2011-04-18 21:55:23 UTC (rev 18240)
@@ -151,6 +151,12 @@
             "for spatial dimension '%d'." % \
             (self.dimension, self.mesh.dimension())
 
+    if self.dimension != self.mesh.coordsys().spaceDim():
+      raise ValueError, \
+            "Spatial dimension of problem is '%d' but mesh coordinate system " \
+            "is  for spatial dimension '%d'." % \
+            (self.dimension, self.mesh.coordsys().spaceDim())
+
     # Check to make sure ids of materials and interfaces are unique
     materialIds = {}
     for material in self.materials.components():



More information about the CIG-COMMITS mailing list