[cig-commits] r8141 - in short/3D/PyLith/trunk: . libsrc/feassemble

knepley at geodynamics.org knepley at geodynamics.org
Thu Oct 18 09:40:11 PDT 2007


Author: knepley
Date: 2007-10-18 09:40:11 -0700 (Thu, 18 Oct 2007)
New Revision: 8141

Modified:
   short/3D/PyLith/trunk/TODO
   short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc
Log:
Cleaned up FASTER code


Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO	2007-10-18 00:52:42 UTC (rev 8140)
+++ short/3D/PyLith/trunk/TODO	2007-10-18 16:40:11 UTC (rev 8141)
@@ -118,6 +118,7 @@
 ----------------------------------------------------------------------
 PyLith 1.1
 ----------------------------------------------------------------------
+Nonlinear solvers
 HDF5 output
   volume (solution field)
   ground surface (or other surfaces) (solution field)
@@ -153,7 +154,6 @@
 ----------------------------------------------------------------------
 PyLith 1.5
 ----------------------------------------------------------------------
-Nonlinear solvers
 Large deformation
 Improved support for spherical geometry in user-interface
 Power-law viscoelastic material
@@ -213,20 +213,24 @@
 
 7. Time fixes
 
-  a. Remove extra time in uninterpolated restrict(). May need special method for P1.
+  Not used a. Remove extra time in uninterpolated restrict(). May need special method for P1.
 
   Done b. Precompute element geometry
 
-  c. getStateVars() is way to expensive. It looks like _getParameters() allocates an int_array. Try just using _numParamValues.
+  Done c. getStateVars() is way to expensive. It looks like _getParameters() allocates an int_array. Try just using _numParamValues.
 
-  d. Same as a) for update
+  Not used d. Same as a) for update
 
-  e. Put in flop counting for IR
+  Done e. Put in flop counting for IR
 
 8. Memory fixes
 
-  a. Share memory in precomputation sections
+  Done a. Share memory in precomputation sections
 
+9. Fixup FASTER improvements
+
+10. Move events to Python (make wrappers for events)
+
 ======================================================================
 QUESTIONS FOR LEIF
 ======================================================================

Modified: short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc	2007-10-18 00:52:42 UTC (rev 8140)
+++ short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc	2007-10-18 16:40:11 UTC (rev 8141)
@@ -175,10 +175,8 @@
   const int numBasis = _quadrature->numBasis();
   const int spaceDim = _quadrature->spaceDim();
 
-#ifdef FASTER
   // Precompute the geometric and function space information
   _quadrature->precomputeGeometry(mesh, coordinates, cells);
-#endif
 
   // Allocate vector for cell values.
   _initCellVector();
@@ -200,11 +198,7 @@
        ++c_iter) {
     // Compute geometry information for current cell
     PetscLogEventBegin(cellGeomEvent,0,0,0,0);
-#ifdef FASTER
     _quadrature->retrieveGeometry(mesh, coordinates, *c_iter);
-#else
-    _quadrature->computeGeometry(mesh, coordinates, *c_iter);
-#endif
     PetscLogEventEnd(cellGeomEvent,0,0,0,0);
 
     // Get state variables for cell.
@@ -217,22 +211,7 @@
 
     // Restrict input fields to cell
     PetscLogEventBegin(restrictEvent,0,0,0,0);
-#ifdef FASTER
-    const Obj<Mesh::sieve_type::coneSequence>& cone = sieve->cone(*c_iter);
-    Mesh::sieve_type::coneSequence::iterator   end  = cone->end();
-    int                                        j    = -1;
-
-    for(Mesh::sieve_type::coneSequence::iterator p_iter = cone->begin(); p_iter != end; ++p_iter) {
-      const real_section_type::value_type *array = dispTBctpdt->restrictPoint(*p_iter);
-      const int&                           dim   = dispTBctpdt->getFiberDimension(*p_iter);
-
-      for(int i = 0; i < dim; ++i) {
-        dispTBctpdtCell[++j] = array[i];
-      }
-    }
-#else
     mesh->restrict(dispTBctpdt, *c_iter, &dispTBctpdtCell[0], cellVecSize);
-#endif
     PetscLogEventEnd(restrictEvent,0,0,0,0);
 
     // Get cell geometry information that depends on cell
@@ -286,15 +265,7 @@
 #endif
     // Assemble cell contribution into field
     PetscLogEventBegin(updateEvent,0,0,0,0);
-#ifdef FASTER
-    j = 0;
-    for(Mesh::sieve_type::coneSequence::iterator p_iter = cone->begin(); p_iter != end; ++p_iter) {
-      residual->updateAddPoint(*p_iter, &_cellVector[j]);
-      j += residual->getFiberDimension(*p_iter);
-    }
-#else
     mesh->updateAdd(residual, *c_iter, _cellVector);
-#endif
     PetscLogEventEnd(updateEvent,0,0,0,0);
   } // for
 } // integrateResidual
@@ -371,10 +342,8 @@
 			   "contribution to Jacobian matrix for cells with " \
 			   "different dimensions than the spatial dimension.");
 
-#ifdef FASTER
   // Precompute the geometric and function space information
   _quadrature->precomputeGeometry(mesh, coordinates, cells);
-#endif
 
   // Allocate matrix and vectors for cell values.
   _initCellMatrix();
@@ -393,11 +362,7 @@
        c_iter != cellsEnd;
        ++c_iter) {
     // Compute geometry information for current cell
-#ifdef FASTER
     _quadrature->retrieveGeometry(mesh, coordinates, *c_iter);
-#else
-    _quadrature->computeGeometry(mesh, coordinates, *c_iter);
-#endif
 
     // Get state variables for cell.
     _material->getStateVarsCell(*c_iter, numQuadPts);
@@ -483,10 +448,8 @@
   const int numBasis = _quadrature->numBasis();
   const int spaceDim = _quadrature->spaceDim();
 
-#ifdef FASTER
   // Precompute the geometric and function space information
   _quadrature->precomputeGeometry(mesh, coordinates, cells);
-#endif
 
   const int cellVecSize = numBasis*spaceDim;
   double_array dispCell(cellVecSize);
@@ -502,11 +465,7 @@
        c_iter != cellsEnd;
        ++c_iter) {
     // Compute geometry information for current cell
-#ifdef FASTER
     _quadrature->retrieveGeometry(mesh, coordinates, *c_iter);
-#else
-    _quadrature->computeGeometry(mesh, coordinates, *c_iter);
-#endif
 
     // Restrict input fields to cell
     mesh->restrict(disp, *c_iter, &dispCell[0], cellVecSize);



More information about the cig-commits mailing list