[cig-commits] r7083 - in short/3D/PyLith/trunk: . libsrc/faults pylith/faults unittests/libtests/faults unittests/libtests/faults/data unittests/pytests/faults

brad at geodynamics.org brad at geodynamics.org
Wed Jun 6 17:41:53 PDT 2007


Author: brad
Date: 2007-06-06 17:41:52 -0700 (Wed, 06 Jun 2007)
New Revision: 7083

Added:
   short/3D/PyLith/trunk/unittests/libtests/faults/data/hex8.mesh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/line2.mesh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/line2_finalslip.spatialdb
   short/3D/PyLith/trunk/unittests/libtests/faults/data/line2_peakrate.spatialdb
   short/3D/PyLith/trunk/unittests/libtests/faults/data/line2_sliptime.spatialdb
   short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4.mesh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4.mesh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4_finalslip.spatialdb
   short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4_peakrate.spatialdb
   short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4_sliptime.spatialdb
   short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3.mesh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_finalslip.spatialdb
   short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_peakrate.spatialdb
   short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_sliptime.spatialdb
Removed:
   short/3D/PyLith/trunk/unittests/libtests/faults/data/meshHex8A.txt
   short/3D/PyLith/trunk/unittests/libtests/faults/data/meshLine.txt
   short/3D/PyLith/trunk/unittests/libtests/faults/data/meshQuad4A.txt
   short/3D/PyLith/trunk/unittests/libtests/faults/data/meshTet4A.txt
   short/3D/PyLith/trunk/unittests/libtests/faults/data/meshTri3A.txt
Modified:
   short/3D/PyLith/trunk/TODO
   short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc
   short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.hh
   short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.icc
   short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.cc
   short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.hh
   short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.icc
   short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
   short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
   short/3D/PyLith/trunk/libsrc/faults/SlipTimeFn.hh
   short/3D/PyLith/trunk/pylith/faults/Fault.py
   short/3D/PyLith/trunk/pylith/faults/FaultCohesive.py
   short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8Lagrange.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2Lagrange.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4Lagrange.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4Lagrange.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3Lagrange.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/Makefile.am
   short/3D/PyLith/trunk/unittests/pytests/faults/TestFault.py
   short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesive.py
   short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveKin.py
Log:
Implemented C++ unit tests for BruneSlipFn::initialize(). Removed extraneous fault unit tests.

Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/TODO	2007-06-07 00:41:52 UTC (rev 7083)
@@ -26,23 +26,16 @@
 
    b. Implement integrator for faults
 
-     i. FaultCohesive
-       (2) Python unit tests
-	 constructor
-         initialize()
-
-     ii. BruneSlipFn
+     i. BruneSlipFn
        (1) C++ unit tests
-         initialize()
          slip()
        (2) Python unit tests
          constructor
          initialize()
 
-     iii. EqKinSrc
+     ii. EqKinSrc
        (1) C++ unit tests
          constructor
-         clone()
          slipfn()
          initialize()
          slip()
@@ -50,19 +43,20 @@
          constructor
          initialize()
 
-     iv. FaultCohesiveKin
+     iii. FaultCohesiveKin
        (1) C++ unit tests
          constructor
-         clone()
          eqsrc()
          initialize()
          integrateResidual()
          integrateJacobian()
+         setConstraintSizes()
+         setConstraints()
          setField()
          _useLagrangeConstraint()
        (2) Python unit tests
-         constructor
          initialize()
+         adjustTopology()
 
 3. Allow use of all elasticity constants (9 for 2-D, 36 for 3-D).
    a. Materials C++ code

Modified: short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.cc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -43,17 +43,6 @@
 } // destructor
 
 // ----------------------------------------------------------------------
-// Copy constructor.
-pylith::faults::BruneSlipFn::BruneSlipFn(const BruneSlipFn& f) :
-  SlipTimeFn(f),
-  _slipField(f._slipField),
-  _dbFinalSlip(f._dbFinalSlip),
-  _dbSlipTime(f._dbSlipTime),
-  _dbPeakRate(f._dbPeakRate)
-{ // copy constructor
-} // copy constructor
-
-// ----------------------------------------------------------------------
 // Initialize slip time function.
 void
 pylith::faults::BruneSlipFn::initialize(const ALE::Obj<Mesh>& mesh,
@@ -107,23 +96,27 @@
   
   // Open databases and set query values
   _dbFinalSlip->open();
-  switch (spaceDim) {
-  case 1 : {
-    const char* slipValues[] = {"slip"};
-    _dbFinalSlip->queryVals(slipValues, 1);
-  } // case 1
-  case 2 : {
-    const char* slipValues[] = {"slip", "fault-opening"};
-    _dbFinalSlip->queryVals(slipValues, 2);
-  } // case 2
-  case 3 : {
-    const char* slipValues[] = {"left-lateral-slip", "reverse-slip", 
-				"fault-opening"};
-    _dbFinalSlip->queryVals(slipValues, 3);
-  } // case 3
-  default :
-    assert(0);
-  } // switch
+  switch (spaceDim)
+    { // switch
+    case 1 : {
+      const char* slipValues[] = {"slip"};
+      _dbFinalSlip->queryVals(slipValues, 1);
+      break;
+    } // case 1
+    case 2 : {
+      const char* slipValues[] = {"slip", "fault-opening"};
+      _dbFinalSlip->queryVals(slipValues, 2);
+      break;
+    } // case 2
+    case 3 : {
+      const char* slipValues[] = {"left-lateral-slip", "reverse-slip", 
+				  "fault-opening"};
+      _dbFinalSlip->queryVals(slipValues, 3);
+      break;
+    } // case 3
+    default :
+      assert(0);
+    } // switch
 
   _dbSlipTime->open();
   const char* slipTimeValues[] = {"slip-time"};
@@ -149,7 +142,8 @@
     const real_section_type::value_type* vCoords = 
       coordinates->restrictPoint(*v_iter);
     
-    int err = _dbFinalSlip->query(&slipData[0], spaceDim, vCoords, spaceDim, cs);
+    int err = _dbFinalSlip->query(&slipData[0], spaceDim, 
+				  vCoords, spaceDim, cs);
     if (err) {
       std::ostringstream msg;
       msg << "Could not find final slip at (";

Modified: short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.hh	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.hh	2007-06-07 00:41:52 UTC (rev 7083)
@@ -56,12 +56,6 @@
   virtual
   ~BruneSlipFn(void);
 
-  /** Create copy of fault.
-   *
-   * @returns Copy of fault.
-   */
-  SlipTimeFn* clone(void) const;  
-
   /** Set spatial database for final slip.
    *
    * @param db Spatial database
@@ -100,19 +94,13 @@
   const ALE::Obj<real_section_type>& slip(const double t,
 			      const std::set<Mesh::point_type>& vertices);
 
-// PROTECTED METHODS ////////////////////////////////////////////////////
-protected :
-
-  /** Copy constructor.
-   *
-   * @param f BruneSlipFn to copy
-   */
-  BruneSlipFn(const BruneSlipFn& m);
-
 // NOT IMPLEMENTED //////////////////////////////////////////////////////
 private :
 
   /// Not implemented
+  BruneSlipFn(const BruneSlipFn& m);
+
+  /// Not implemented
   const BruneSlipFn& operator=(const BruneSlipFn& f);
 
 // PRIVATE METHODS //////////////////////////////////////////////////////

Modified: short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.icc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/libsrc/faults/BruneSlipFn.icc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -17,13 +17,6 @@
 #include <math.h> // USES exp()
 #include <assert.h> // USES assert()
 
-// Create copy of fault.
-inline
-pylith::faults::SlipTimeFn*
-pylith::faults::BruneSlipFn::clone(void) const {
-  return new BruneSlipFn(*this);
-} // clone
-
 // Set spatial database for final slip.
 inline
 void

Modified: short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.cc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.cc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -29,24 +29,15 @@
 // Destructor.
 pylith::faults::EqKinSrc::~EqKinSrc(void)
 { // destructor
-  delete _slipfn; _slipfn = 0;
+  _slipfn = 0; // Don't manage memory for slip fn
 } // destructor
 
 // ----------------------------------------------------------------------
-// Copy constructor.
-pylith::faults::EqKinSrc::EqKinSrc(const EqKinSrc& s) :
-  _slipfn(0)
-{ // copy constructor
-  if (0 != s._slipfn)
-    _slipfn = s._slipfn->clone();
-} // copy constructor
-
-// ----------------------------------------------------------------------
 // Set slip time function.
 void
 pylith::faults::EqKinSrc::slipfn(SlipTimeFn* slipfn)
 { // slipfn
-  delete _slipfn; _slipfn = (0 != slipfn) ? slipfn->clone() : 0;
+  _slipfn = slipfn; // Don't manage memory for slip fn
 } // slipfn
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.hh	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.hh	2007-06-07 00:41:52 UTC (rev 7083)
@@ -60,13 +60,6 @@
   virtual
   ~EqKinSrc(void);
 
-  /** Create copy of fault.
-   *
-   * @returns Copy of fault.
-   */
-  virtual
-  EqKinSrc* clone(void) const;
-
   /** Set slip time function.
    *
    * @param slipfn Slip time function.
@@ -95,19 +88,13 @@
   const ALE::Obj<real_section_type>& slip(const double t,
 			      const std::set<Mesh::point_type>& vertices);
 
-  // PROTECTED METHODS //////////////////////////////////////////////////
-protected :
-
-  /** Copy constructor.
-   *
-   * @param s Source to copy
-   */
-  EqKinSrc(const EqKinSrc& s);
-
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 
   /// Not implemented
+  EqKinSrc(const EqKinSrc& s);
+
+  /// Not implemented
   const EqKinSrc& operator=(const EqKinSrc& s);
 
   // PRIVATE MEMBERS ////////////////////////////////////////////////////

Modified: short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.icc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/libsrc/faults/EqKinSrc.icc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -14,12 +14,5 @@
 #error "EqKinSrc.icc can only be included from EqKinSrc.hh"
 #endif
 
-// Create copy of fault.
-inline
-pylith::faults::EqKinSrc*
-pylith::faults::EqKinSrc::clone(void) const {
-  return new EqKinSrc(*this);
-} // clone
 
-
 // End of file 

Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -42,7 +42,7 @@
 void
 pylith::faults::FaultCohesive::adjustTopology(const ALE::Obj<ALE::Mesh>& mesh)
 { // adjustTopology
-  assert("" != label());
+  assert(std::string("") != label());
 
   // Get group of vertices associated with fault
   const ALE::Obj<int_section_type>& groupField = 

Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveKin.cc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -37,7 +37,7 @@
 // Destructor.
 pylith::faults::FaultCohesiveKin::~FaultCohesiveKin(void)
 { // destructor
-  delete _eqsrc; _eqsrc = 0;
+  _eqsrc = 0; // Don't manage memory for eq source
 } // destructor
 
 // ----------------------------------------------------------------------
@@ -45,7 +45,7 @@
 void
 pylith::faults::FaultCohesiveKin::eqsrc(EqKinSrc* src)
 { // eqsrc
-  delete _eqsrc; _eqsrc = (0 != src) ? src->clone() : 0;
+  _eqsrc = src; // Don't manage memory for eq source
 } // eqsrc
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/libsrc/faults/SlipTimeFn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/SlipTimeFn.hh	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/libsrc/faults/SlipTimeFn.hh	2007-06-07 00:41:52 UTC (rev 7083)
@@ -56,13 +56,6 @@
   virtual
   ~SlipTimeFn(void);
 
-  /** Create copy of fault.
-   *
-   * @returns Copy of fault.
-   */
-  virtual
-  SlipTimeFn* clone(void) const = 0;
-
   /** Initialize slip time function.
    *
    * @param mesh Finite-element mesh.
@@ -85,18 +78,12 @@
   const ALE::Obj<real_section_type>& slip(const double t,
 					  const std::set<Mesh::point_type>& vertices) = 0;
 
-  // PROTECTED METHODS //////////////////////////////////////////////////
-protected :
-
-  /** Copy constructor.
-   *
-   * @param f SlipTimeFn to copy
-   */
-  SlipTimeFn(const SlipTimeFn& f);
-
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 
+  /// Not implemented.
+  SlipTimeFn(const SlipTimeFn& f);
+
   /// Not implemented
   const SlipTimeFn& operator=(const SlipTimeFn& f);
 

Modified: short/3D/PyLith/trunk/pylith/faults/Fault.py
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/Fault.py	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/pylith/faults/Fault.py	2007-06-07 00:41:52 UTC (rev 7083)
@@ -104,6 +104,7 @@
     """
     Adjust mesh topology for fault implementation.
     """
+    assert(None != self.cppHandle)
     self.cppHandle.id = self.id
     self.cppHandle.label = self.label
     self.cppHandle.adjustTopology(mesh.cppHandle)
@@ -122,6 +123,7 @@
             "Dimensions for quadrature: %d, dimensions for surface: 2" % \
             self.quadrature.cell.cellDim
 
+    assert(None != self.cppHandle)
     self.cppHandle.id = self.id
     self.cppHandle.label = self.label
     self.cppHandle.quadrature = self.quadrature.cppHandle

Modified: short/3D/PyLith/trunk/pylith/faults/FaultCohesive.py
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/FaultCohesive.py	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/pylith/faults/FaultCohesive.py	2007-06-07 00:41:52 UTC (rev 7083)
@@ -39,14 +39,6 @@
     return
 
 
-  def initialize(self, mesh):
-    """
-    Initialize cohesive elements.
-    """
-    Fault.initialize(self, mesh)
-    return
-
-
   # PRIVATE METHODS ////////////////////////////////////////////////////
 
   def _configure(self):

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.cc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.cc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -16,13 +16,40 @@
 
 #include "pylith/faults/BruneSlipFn.hh" // USES BruneSlipFn
 
+#include "pylith/faults/CohesiveTopology.hh" // USES CohesiveTopology
+#include "pylith/meshio/MeshIOAscii.hh" // USES MeshIOAscii
+#include "pylith/topology/FieldsManager.hh" // USES FieldsManager
+
+#include "spatialdata/geocoords/CSCart.hh" // USES CSCart
 #include "spatialdata/spatialdb/SimpleDB.hh" // USES SimpleDB
+#include "spatialdata/spatialdb/SimpleIOAscii.hh" // USES SimpleIOAscii
 
 #include <stdexcept> // TEMPORARY
 // ----------------------------------------------------------------------
 CPPUNIT_TEST_SUITE_REGISTRATION( pylith::faults::TestBruneSlipFn );
 
 // ----------------------------------------------------------------------
+namespace pylith {
+  namespace faults {
+    namespace _TestBruneSlipFn {
+      struct DataStruct {
+	const char* meshFilename;
+	const char* faultLabel;
+	const int faultId;
+	const char* finalSlipFilename;
+	const char* slipTimeFilename;
+	const char* peakRateFilename;
+	const int* constraintPts;
+	const double* finalSlipE;
+	const double* slipTimeE;
+	const double* peakRateE;
+	const int numConstraintPts;
+      }; // DataStruct
+    } // _TestBruneSlipFn
+  } // faults
+} // pylith
+
+// ----------------------------------------------------------------------
 // Test constructor.
 void
 pylith::faults::TestBruneSlipFn::testConstructor(void)
@@ -31,39 +58,6 @@
 } // testConstructor
 
 // ----------------------------------------------------------------------
-// Test clone()
-void
-pylith::faults::TestBruneSlipFn::testClone(void)
-{ // testClone
-  BruneSlipFn slipfn;
-  
-  spatialdata::spatialdb::SimpleDB dbFinalSlip("final slip");
-  slipfn.dbFinalSlip(&dbFinalSlip);
-  spatialdata::spatialdb::SimpleDB dbSlipTime("slip time");
-  slipfn.dbSlipTime(&dbSlipTime);
-  spatialdata::spatialdb::SimpleDB dbPeakRate("peak rate");
-  slipfn.dbPeakRate(&dbPeakRate);
-
-  SlipTimeFn* slipfnCopy = slipfn.clone();
-  CPPUNIT_ASSERT(0 != slipfnCopy);
-
-  BruneSlipFn* bruneCopy = dynamic_cast<BruneSlipFn*>(slipfnCopy);
-  CPPUNIT_ASSERT(0 != bruneCopy);
-
-  CPPUNIT_ASSERT(0 != bruneCopy->_dbFinalSlip);
-  CPPUNIT_ASSERT_EQUAL(std::string("final slip"),
-		       std::string(bruneCopy->_dbFinalSlip->label()));
-  CPPUNIT_ASSERT(0 != bruneCopy->_dbSlipTime);
-  CPPUNIT_ASSERT_EQUAL(std::string("slip time"),
-		       std::string(bruneCopy->_dbSlipTime->label()));
-  CPPUNIT_ASSERT(0 != bruneCopy->_dbPeakRate);
-  CPPUNIT_ASSERT_EQUAL(std::string("peak rate"),
-		       std::string(bruneCopy->_dbPeakRate->label()));
-
-  delete slipfnCopy; slipfnCopy = 0;
-} // testClone
-
-// ----------------------------------------------------------------------
 // Test dbFinalSlip().
 void
 pylith::faults::TestBruneSlipFn::testDbFinalSlip(void)
@@ -122,7 +116,30 @@
 void
 pylith::faults::TestBruneSlipFn::testInitialize1D(void)
 { // testInitialize1D
-  //throw std::logic_error("Unit test not implemented.");
+  const char* meshFilename = "data/line2.mesh";
+  const char* faultLabel = "fault";
+  const int faultId = 2;
+  const char* finalSlipFilename = "data/line2_finalslip.spatialdb";
+  const char* slipTimeFilename = "data/line2_sliptime.spatialdb";
+  const char* peakRateFilename = "data/line2_peakrate.spatialdb";
+  const int constraintPts[] = { 3 };
+  const double finalSlipE[] = { 2.3 };
+  const double slipTimeE[] = { 1.2 };
+  const double peakRateE[] = { 1.4 };
+  const int numConstraintPts = 1;
+
+  _TestBruneSlipFn::DataStruct data = {meshFilename,
+				       faultLabel,
+				       faultId,
+				       finalSlipFilename,
+				       slipTimeFilename,
+				       peakRateFilename,
+				       constraintPts,
+				       finalSlipE,
+				       slipTimeE,
+				       peakRateE,
+				       numConstraintPts};
+  _testInitialize(data);
 } // testInitialize1D
 
 // ----------------------------------------------------------------------
@@ -130,7 +147,31 @@
 void
 pylith::faults::TestBruneSlipFn::testInitialize2D(void)
 { // testInitialize2D
-  //throw std::logic_error("Unit test not implemented.");
+  const char* meshFilename = "data/tri3.mesh";
+  const char* faultLabel = "fault";
+  const int faultId = 2;
+  const char* finalSlipFilename = "data/tri3_finalslip.spatialdb";
+  const char* slipTimeFilename = "data/tri3_sliptime.spatialdb";
+  const char* peakRateFilename = "data/tri3_peakrate.spatialdb";
+  const int constraintPts[] = { 3, 4 };
+  const double finalSlipE[] = { 2.3, 0.1, 
+				2.4, 0.2};
+  const double slipTimeE[] = { 1.2, 1.3 };
+  const double peakRateE[] = { 1.4, 1.5 };
+  const int numConstraintPts = 2;
+
+  _TestBruneSlipFn::DataStruct data = {meshFilename,
+				       faultLabel,
+				       faultId,
+				       finalSlipFilename,
+				       slipTimeFilename,
+				       peakRateFilename,
+				       constraintPts,
+				       finalSlipE,
+				       slipTimeE,
+				       peakRateE,
+				       numConstraintPts};
+  _testInitialize(data);
 } // testInitialize2D
 
 // ----------------------------------------------------------------------
@@ -138,7 +179,32 @@
 void
 pylith::faults::TestBruneSlipFn::testInitialize3D(void)
 { // testInitialize3D
-  //throw std::logic_error("Unit test not implemented.");
+  const char* meshFilename = "data/tet4.mesh";
+  const char* faultLabel = "fault";
+  const int faultId = 2;
+  const char* finalSlipFilename = "data/tet4_finalslip.spatialdb";
+  const char* slipTimeFilename = "data/tet4_sliptime.spatialdb";
+  const char* peakRateFilename = "data/tet4_peakrate.spatialdb";
+  const int constraintPts[] = { 3, 4, 5 };
+  const double finalSlipE[] = { 2.3, -0.7, 0.1,
+				2.4, -0.8, 0.2,
+				2.5, -0.9, 0.3 };
+  const double slipTimeE[] = { 1.2, 1.3, 1.4 };
+  const double peakRateE[] = { 1.5, 1.6, 1.7 };
+  const int numConstraintPts = 3;
+
+  _TestBruneSlipFn::DataStruct data = {meshFilename,
+				       faultLabel,
+				       faultId,
+				       finalSlipFilename,
+				       slipTimeFilename,
+				       peakRateFilename,
+				       constraintPts,
+				       finalSlipE,
+				       slipTimeE,
+				       peakRateE,
+				       numConstraintPts};
+  _testInitialize(data);
 } // testInitialize3D
 
 // ----------------------------------------------------------------------
@@ -146,7 +212,7 @@
 void
 pylith::faults::TestBruneSlipFn::testSlip(void)
 { // testSlip
-  //throw std::logic_error("Unit test not implemented.");
+  throw std::logic_error("Unit test not implemented.");
 } // testSlip
 
 // ----------------------------------------------------------------------
@@ -173,6 +239,111 @@
   CPPUNIT_ASSERT_DOUBLES_EQUAL(finalSlip, slip, tolerance);
 } // testSlipTH
 
+// ----------------------------------------------------------------------
+// Test initialize() in 1-D.
+void
+pylith::faults::TestBruneSlipFn::_testInitialize(const _TestBruneSlipFn::DataStruct& data)
+{ // _testInitialize
+  typedef std::set<Mesh::point_type>::const_iterator vert_iterator;  
 
+  // Setup mesh
+  ALE::Obj<Mesh> mesh;
+  meshio::MeshIOAscii meshIO;
+  meshIO.filename(data.meshFilename);
+  meshIO.debug(false);
+  meshIO.interpolate(false);
+  meshIO.read(&mesh);
+  CPPUNIT_ASSERT(!mesh.isNull());
+  const int spaceDim = mesh->getDimension();
+  spatialdata::geocoords::CSCart cs;
+  cs.setSpaceDim(spaceDim);
 
+  // Create fault mesh
+  ALE::Obj<Mesh> faultMesh;
+  const bool useLagrangeConstraints = true;
+  CohesiveTopology::create(&faultMesh, mesh, 
+			   mesh->getIntSection(data.faultLabel),
+			   data.faultId);
+  CPPUNIT_ASSERT(!faultMesh.isNull());
+
+  // Create set of constraint vertices
+  std::set<Mesh::point_type> eqsrcVertices;
+  for (int i=0; i < data.numConstraintPts; ++i)
+    eqsrcVertices.insert(data.constraintPts[i]);
+  CPPUNIT_ASSERT_EQUAL(data.numConstraintPts, int(eqsrcVertices.size()));
+  
+  // Setup databases
+  spatialdata::spatialdb::SimpleDB dbFinalSlip("final slip");
+  spatialdata::spatialdb::SimpleIOAscii ioFinalSlip;
+  ioFinalSlip.filename(data.finalSlipFilename);
+  dbFinalSlip.ioHandler(&ioFinalSlip);
+  
+  spatialdata::spatialdb::SimpleDB dbSlipTime("slip time");
+  spatialdata::spatialdb::SimpleIOAscii ioSlipTime;
+  ioSlipTime.filename(data.slipTimeFilename);
+  dbSlipTime.ioHandler(&ioSlipTime);
+  
+  spatialdata::spatialdb::SimpleDB dbPeakRate("peak rate");
+  spatialdata::spatialdb::SimpleIOAscii ioPeakRate;
+  ioPeakRate.filename(data.peakRateFilename);
+  dbPeakRate.ioHandler(&ioPeakRate);
+
+  // setup BruneSlipFn
+  BruneSlipFn slipFn;
+  slipFn.dbFinalSlip(&dbFinalSlip);
+  slipFn.dbSlipTime(&dbSlipTime);
+  slipFn.dbPeakRate(&dbPeakRate);
+  
+  slipFn.initialize(mesh, faultMesh, eqsrcVertices, &cs);
+
+  // Check parameter sections
+  const double tolerance = 1.0e-06;
+  CPPUNIT_ASSERT(0 != slipFn._parameters);
+  const ALE::Obj<real_section_type>& finalSlip = 
+    slipFn._parameters->getReal("final slip");
+  const ALE::Obj<real_section_type>& slipTime = 
+    slipFn._parameters->getReal("slip time");
+  const ALE::Obj<real_section_type>& peakRate = 
+    slipFn._parameters->getReal("peak rate");
+  CPPUNIT_ASSERT(!finalSlip.isNull());
+  CPPUNIT_ASSERT(!slipTime.isNull());
+  CPPUNIT_ASSERT(!peakRate.isNull());
+
+  int iPoint = 0;
+  const vert_iterator vBegin = eqsrcVertices.begin();
+  const vert_iterator vEnd = eqsrcVertices.end();
+  for (vert_iterator v_iter=vBegin; v_iter != vEnd; ++v_iter) {
+    { // final slip
+      const int fiberDim = finalSlip->getFiberDimension(*v_iter);
+      CPPUNIT_ASSERT_EQUAL(spaceDim, fiberDim);
+      const real_section_type::value_type* vals = 
+	finalSlip->restrictPoint(*v_iter);
+      for (int iDim=0; iDim < fiberDim; ++iDim)
+	CPPUNIT_ASSERT_DOUBLES_EQUAL(data.finalSlipE[iPoint*spaceDim+iDim],
+				     vals[iDim],
+				     tolerance);
+    } // final slip
+    
+    { // slip time
+      const int fiberDim = slipTime->getFiberDimension(*v_iter);
+      CPPUNIT_ASSERT_EQUAL(1, fiberDim);
+      const real_section_type::value_type* vals = 
+	slipTime->restrictPoint(*v_iter);
+      CPPUNIT_ASSERT_DOUBLES_EQUAL(data.slipTimeE[iPoint], vals[0], tolerance);
+    } // slip time
+
+    { // peak rate
+      const int fiberDim = peakRate->getFiberDimension(*v_iter);
+      CPPUNIT_ASSERT_EQUAL(1, fiberDim);
+      const real_section_type::value_type* vals = 
+	peakRate->restrictPoint(*v_iter);
+      CPPUNIT_ASSERT_DOUBLES_EQUAL(data.peakRateE[iPoint], vals[0], tolerance);
+    } // peak rate
+
+    ++iPoint;
+  } // for
+} // _testInitialize
+
+
+
 // End of file 

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.hh	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.hh	2007-06-07 00:41:52 UTC (rev 7083)
@@ -27,6 +27,10 @@
 namespace pylith {
   namespace faults {
     class TestBruneSlipFn;
+
+    namespace _TestBruneSlipFn {
+      struct DataStruct;
+    } // _BruneSlipTimeFn
   } // faults
 } // pylith
 
@@ -37,7 +41,6 @@
   // CPPUNIT TEST SUITE /////////////////////////////////////////////////
   CPPUNIT_TEST_SUITE( TestBruneSlipFn );
   CPPUNIT_TEST( testConstructor );
-  CPPUNIT_TEST( testClone );
   CPPUNIT_TEST( testDbFinalSlip );
   CPPUNIT_TEST( testDbSlipTime );
   CPPUNIT_TEST( testDbPeakRate );
@@ -54,9 +57,6 @@
   /// Test constructor.
   void testConstructor(void);
 
-  /// Test clone().
-  void testClone(void);
-
   /// Test dbFinalSlip().
   void testDbFinalSlip(void);
 
@@ -81,6 +81,15 @@
   /// Test _slip().
   void testSlipTH(void);
 
+  // PRIVATE METHODS ////////////////////////////////////////////////////
+private :
+
+  /** Test intialize().
+   *
+   * @param data Data for initialization and testing of BruneSlipFn.
+   */
+  void _testInitialize(const _TestBruneSlipFn::DataStruct& data);
+
 }; // class TestBruneSlipFn
 
 #endif // pylith_faults_testbruneslipfn_hh

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -34,8 +34,6 @@
 #include "data/CohesiveDataTet4Lagrange.hh" // USES CohesiveDataTet4Lagrange
 #include "data/CohesiveDataHex8Lagrange.hh" // USES CohesiveDataHex8Lagrange
 
-#include <stdexcept> // TEMPORARY
-
 // ----------------------------------------------------------------------
 CPPUNIT_TEST_SUITE_REGISTRATION( pylith::faults::TestFaultCohesive );
 

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8.cc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8.cc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -92,7 +92,8 @@
   "vertex", "vertex"
 };
 
-const char* pylith::faults::CohesiveDataHex8::_filename = "data/meshHex8A.txt";
+const char* pylith::faults::CohesiveDataHex8::_filename = 
+  "data/hex8.mesh";
 
 pylith::faults::CohesiveDataHex8::CohesiveDataHex8(void)
 { // constructor

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8Lagrange.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8Lagrange.cc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8Lagrange.cc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -96,7 +96,8 @@
   "vertex", "vertex"
 };
 
-const char* pylith::faults::CohesiveDataHex8Lagrange::_filename = "data/meshHex8A.txt";
+const char* pylith::faults::CohesiveDataHex8Lagrange::_filename = 
+  "data/hex8.mesh";
 
 pylith::faults::CohesiveDataHex8Lagrange::CohesiveDataHex8Lagrange(void)
 { // constructor

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2.cc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2.cc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -72,7 +72,7 @@
   "vertex", "vertex"
 };
 
-const char* pylith::faults::CohesiveDataLine2::_filename = "data/meshLine.txt";
+const char* pylith::faults::CohesiveDataLine2::_filename = "data/line2.mesh";
 
 pylith::faults::CohesiveDataLine2::CohesiveDataLine2(void)
 { // constructor

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2Lagrange.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2Lagrange.cc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2Lagrange.cc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -73,7 +73,8 @@
   "vertex", "vertex"
 };
 
-const char* pylith::faults::CohesiveDataLine2Lagrange::_filename = "data/meshLine.txt";
+const char* pylith::faults::CohesiveDataLine2Lagrange::_filename = 
+  "data/line2.mesh";
 
 pylith::faults::CohesiveDataLine2Lagrange::CohesiveDataLine2Lagrange(void)
 { // constructor

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4.cc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4.cc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -97,7 +97,8 @@
   "vertex", "vertex"
 };
 
-const char* pylith::faults::CohesiveDataQuad4::_filename = "data/meshQuad4A.txt";
+const char* pylith::faults::CohesiveDataQuad4::_filename = 
+  "data/quad4.mesh";
 
 pylith::faults::CohesiveDataQuad4::CohesiveDataQuad4(void)
 { // constructor

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4Lagrange.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4Lagrange.cc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4Lagrange.cc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -99,7 +99,8 @@
   "vertex", "vertex"
 };
 
-const char* pylith::faults::CohesiveDataQuad4Lagrange::_filename = "data/meshQuad4A.txt";
+const char* pylith::faults::CohesiveDataQuad4Lagrange::_filename = 
+  "data/quad4.mesh";
 
 pylith::faults::CohesiveDataQuad4Lagrange::CohesiveDataQuad4Lagrange(void)
 { // constructor

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4.cc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4.cc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -83,7 +83,7 @@
   "vertex", "vertex"
 };
 
-const char* pylith::faults::CohesiveDataTet4::_filename = "data/meshTet4A.txt";
+const char* pylith::faults::CohesiveDataTet4::_filename = "data/tet4.mesh";
 
 pylith::faults::CohesiveDataTet4::CohesiveDataTet4(void)
 { // constructor

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4Lagrange.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4Lagrange.cc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4Lagrange.cc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -86,7 +86,8 @@
   "vertex", "vertex"
 };
 
-const char* pylith::faults::CohesiveDataTet4Lagrange::_filename = "data/meshTet4A.txt";
+const char* pylith::faults::CohesiveDataTet4Lagrange::_filename = 
+  "data/tet4.mesh";
 
 pylith::faults::CohesiveDataTet4Lagrange::CohesiveDataTet4Lagrange(void)
 { // constructor

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3.cc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3.cc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -98,7 +98,7 @@
   "vertex", "vertex"
 };
 
-const char* pylith::faults::CohesiveDataTri3::_filename = "data/meshTri3A.txt";
+const char* pylith::faults::CohesiveDataTri3::_filename = "data/tri3.mesh";
 
 pylith::faults::CohesiveDataTri3::CohesiveDataTri3(void)
 { // constructor

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3Lagrange.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3Lagrange.cc	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3Lagrange.cc	2007-06-07 00:41:52 UTC (rev 7083)
@@ -100,7 +100,8 @@
   "vertex", "vertex"
 };
 
-const char* pylith::faults::CohesiveDataTri3Lagrange::_filename = "data/meshTri3A.txt";
+const char* pylith::faults::CohesiveDataTri3Lagrange::_filename = 
+  "data/tri3.mesh";
 
 pylith::faults::CohesiveDataTri3Lagrange::CohesiveDataTri3Lagrange(void)
 { // constructor

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/Makefile.am	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/Makefile.am	2007-06-07 00:41:52 UTC (rev 7083)
@@ -11,11 +11,20 @@
 #
 
 noinst_DATA = \
-	meshLine.txt \
-	meshTri3A.txt \
-	meshQuad4A.txt \
-	meshTet4A.txt \
-	meshHex8A.txt
+	line2.mesh \
+	line2_finalslip.spatialdb \
+	line2_sliptime.spatialdb \
+	line2_peakrate.spatialdb \
+	tri3.mesh \
+	tri3_finalslip.spatialdb \
+	tri3_sliptime.spatialdb \
+	tri3_peakrate.spatialdb \
+	quad4.mesh \
+	tet4.mesh \
+	tet4_finalslip.spatialdb \
+	tet4_sliptime.spatialdb \
+	tet4_peakrate.spatialdb \
+	hex8.mesh
 
 noinst_TMP =
 

Copied: short/3D/PyLith/trunk/unittests/libtests/faults/data/hex8.mesh (from rev 7081, short/3D/PyLith/trunk/unittests/libtests/faults/data/meshHex8A.txt)

Copied: short/3D/PyLith/trunk/unittests/libtests/faults/data/line2.mesh (from rev 7081, short/3D/PyLith/trunk/unittests/libtests/faults/data/meshLine.txt)

Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/line2_finalslip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/line2_finalslip.spatialdb	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/line2_finalslip.spatialdb	2007-06-07 00:41:52 UTC (rev 7083)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip
+  value-units =  m
+  num-locs = 1
+  data-dim = 0
+  space-dim = 1
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 1
+  }
+}
+0.0   2.3

Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/line2_peakrate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/line2_peakrate.spatialdb	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/line2_peakrate.spatialdb	2007-06-07 00:41:52 UTC (rev 7083)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip-rate
+  value-units =  m/s
+  num-locs = 1
+  data-dim = 0
+  space-dim = 1
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 1
+  }
+}
+0.0   1.4

Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/line2_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/line2_sliptime.spatialdb	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/line2_sliptime.spatialdb	2007-06-07 00:41:52 UTC (rev 7083)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip-time
+  value-units =  s
+  num-locs = 1
+  data-dim = 0
+  space-dim = 1
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 1
+  }
+}
+0.0   1.2

Deleted: short/3D/PyLith/trunk/unittests/libtests/faults/data/meshHex8A.txt
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/meshHex8A.txt	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/meshHex8A.txt	2007-06-07 00:41:52 UTC (rev 7083)
@@ -1,58 +0,0 @@
-mesh = {
-  dimension = 3
-  use-index-zero = true
-  vertices = {
-    dimension = 3
-    count = 12
-    coordinates = {
-             0     -2.0 -1.0 -1.0
-             1     -2.0  1.0 -1.0
-             2     -2.0 -1.0  1.0
-             3     -2.0  1.0  1.0
-             4      0.0 -1.0 -1.0
-             5      0.0  1.0 -1.0
-             6      0.0 -1.0  1.0
-             7      0.0  1.0  1.0
-             8      2.0 -1.0 -1.0
-             9      2.0  1.0 -1.0
-            10      2.0 -1.0  1.0
-            11      2.0  1.0  1.0
-    }
-  }
-  cells = {
-    count = 2
-    num-corners = 8
-    simplices = {
-             0       0  2  3  1  4  6  7  5
-             1       4  6  7  5  8 10 11  9
-    }
-    material-ids = {
-             0   0
-             1   0
-    }
-  }
-  group = {
-    name = fault
-    type = vertices
-    count = 4
-    indices = {
-      4
-      5
-      6
-      7
-    }
-  }
-  group = {
-    name = output
-    type = vertices
-    count = 6
-    indices = {
-      2
-      3
-      6
-      7
-     10
-     11
-    }
-  }
-}

Deleted: short/3D/PyLith/trunk/unittests/libtests/faults/data/meshLine.txt
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/meshLine.txt	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/meshLine.txt	2007-06-07 00:41:52 UTC (rev 7083)
@@ -1,42 +0,0 @@
-mesh = {
-  dimension = 1
-  use-index-zero = true
-  vertices = {
-    dimension = 1
-    count = 3
-    coordinates = {
-             0     -1.0
-             1      0.0
-             2      1.0
-    }
-  }
-  cells = {
-    count = 2
-    num-corners = 2
-    simplices = {
-             0       0       1
-             1       1       2
-    }
-    material-ids = {
-             0   0
-             1   0
-    }
-  }
-  group = {
-    name = fault
-    type = vertices
-    count = 1
-    indices = {
-      1
-    }
-  }
-  group = {
-    name = output
-    type = vertices
-    count = 2
-    indices = {
-      0
-      1
-    }
-  }
-}

Deleted: short/3D/PyLith/trunk/unittests/libtests/faults/data/meshQuad4A.txt
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/meshQuad4A.txt	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/meshQuad4A.txt	2007-06-07 00:41:52 UTC (rev 7083)
@@ -1,47 +0,0 @@
-mesh = {
-  dimension = 2
-  use-index-zero = true
-  vertices = {
-    dimension = 2
-    count = 6
-    coordinates = {
-             0     -2.0 -1.0
-             1     -2.0  1.0
-             2      0.0 -1.0
-             3      0.0  1.0
-             4      2.0 -1.0
-             5      2.0  1.0
-    }
-  }
-  cells = {
-    count = 2
-    num-corners = 4
-    simplices = {
-             0       0  2  3  1
-             1       4  5  3  2
-    }
-    material-ids = {
-             0   0
-             1   0
-    }
-  }
-  group = {
-    name = fault
-    type = vertices
-    count = 2
-    indices = {
-      2
-      3
-    }
-  }
-  group = {
-    name = output
-    type = vertices
-    count = 3
-    indices = {
-      1
-      3
-      5
-    }
-  }
-}

Deleted: short/3D/PyLith/trunk/unittests/libtests/faults/data/meshTet4A.txt
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/meshTet4A.txt	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/meshTet4A.txt	2007-06-07 00:41:52 UTC (rev 7083)
@@ -1,47 +0,0 @@
-mesh = {
-  dimension = 3
-  use-index-zero = true
-  vertices = {
-    dimension = 3
-    count = 5
-    coordinates = {
-             0     -1.0  0.0  0.0
-             1      0.0 -1.0  0.0
-             2      0.0  0.0  1.0
-             3      0.0  1.0  0.0
-             4      1.0  0.0  0.0
-    }
-  }
-  cells = {
-    count = 2
-    num-corners = 4
-    simplices = {
-             0       1  2  3  0
-             1       1  3  2  4
-    }
-    material-ids = {
-             0   0
-             1   0
-    }
-  }
-  group = {
-    name = fault
-    type = vertices
-    count = 3
-    indices = {
-      1
-      2
-      3
-    }
-  }
-  group = {
-    name = output
-    type = vertices
-    count = 3
-    indices = {
-      0
-      2
-      3
-    }
-  }
-}

Deleted: short/3D/PyLith/trunk/unittests/libtests/faults/data/meshTri3A.txt
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/meshTri3A.txt	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/meshTri3A.txt	2007-06-07 00:41:52 UTC (rev 7083)
@@ -1,45 +0,0 @@
-mesh = {
-  dimension = 2
-  use-index-zero = true
-  vertices = {
-    dimension = 2
-    count = 4
-    coordinates = {
-             0     -1.0  0.0
-             1      0.0  1.0
-             2      0.0 -1.0
-             3      1.0  0.0
-    }
-  }
-  cells = {
-    count = 2
-    num-corners = 3
-    simplices = {
-             0       0  2  1
-             1       1  2  3
-    }
-    material-ids = {
-             0   0
-             1   0
-    }
-  }
-  group = {
-    name = fault
-    type = vertices
-    count = 2
-    indices = {
-      1
-      2
-    }
-  }
-  group = {
-    name = output
-    type = vertices
-    count = 3
-    indices = {
-      1
-      2
-      3
-    }
-  }
-}

Copied: short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4.mesh (from rev 7081, short/3D/PyLith/trunk/unittests/libtests/faults/data/meshQuad4A.txt)

Copied: short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4.mesh (from rev 7081, short/3D/PyLith/trunk/unittests/libtests/faults/data/meshTet4A.txt)

Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4_finalslip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4_finalslip.spatialdb	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4_finalslip.spatialdb	2007-06-07 00:41:52 UTC (rev 7083)
@@ -0,0 +1,16 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 3
+  value-names =  left-lateral-slip  reverse-slip  fault-opening
+  value-units =  m   m   m
+  num-locs = 3
+  data-dim = 2
+  space-dim = 3
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 3
+  }
+}
+0.0  -1.0  0.0    2.3  -0.7  0.1
+0.0   0.0  1.0    2.4  -0.8  0.2
+0.0   1.0  0.0    2.5  -0.9  0.3

Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4_peakrate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4_peakrate.spatialdb	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4_peakrate.spatialdb	2007-06-07 00:41:52 UTC (rev 7083)
@@ -0,0 +1,16 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip-rate
+  value-units =  m/s
+  num-locs = 3
+  data-dim = 2
+  space-dim = 3
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 3
+  }
+}
+0.0  -1.0  0.0    1.5
+0.0   0.0  1.0    1.6
+0.0   1.0  0.0    1.7

Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4_sliptime.spatialdb	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4_sliptime.spatialdb	2007-06-07 00:41:52 UTC (rev 7083)
@@ -0,0 +1,16 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip-time
+  value-units =  s
+  num-locs = 3
+  data-dim = 2
+  space-dim = 3
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 3
+  }
+}
+0.0  -1.0  0.0    1.2
+0.0   0.0  1.0    1.3
+0.0   1.0  0.0    1.4

Copied: short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3.mesh (from rev 7081, short/3D/PyLith/trunk/unittests/libtests/faults/data/meshTri3A.txt)

Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_finalslip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_finalslip.spatialdb	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_finalslip.spatialdb	2007-06-07 00:41:52 UTC (rev 7083)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 2
+  value-names =  slip fault-opening
+  value-units =  m   m
+  num-locs = 2
+  data-dim = 1
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  +1.0   2.3   0.1
+0.0  -1.0   2.4   0.2

Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_peakrate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_peakrate.spatialdb	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_peakrate.spatialdb	2007-06-07 00:41:52 UTC (rev 7083)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip-rate
+  value-units =  m/s
+  num-locs = 2
+  data-dim = 1
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  +1.0   1.4
+0.0  -1.0   1.5

Added: short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_sliptime.spatialdb	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_sliptime.spatialdb	2007-06-07 00:41:52 UTC (rev 7083)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip-time
+  value-units =  s
+  num-locs = 2
+  data-dim = 1
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  +1.0    1.2
+0.0  -1.0    1.3

Modified: short/3D/PyLith/trunk/unittests/pytests/faults/TestFault.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/TestFault.py	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/TestFault.py	2007-06-07 00:41:52 UTC (rev 7083)
@@ -33,12 +33,4 @@
     return
 
 
-  def test_initialize(self):
-    """
-    Test initialize().
-    """
-    raise NotImplementedError("Need to implement unit test.")
-    return
-  
-
 # End of file 

Modified: short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesive.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesive.py	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesive.py	2007-06-07 00:41:52 UTC (rev 7083)
@@ -33,12 +33,4 @@
     return
 
 
-  def test_adjustTopology(self):
-    """
-    Test initialize().
-    """
-    raise NotImplementedError("Need to implement unit test.")
-    return
-  
-
 # End of file 

Modified: short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveKin.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveKin.py	2007-06-07 00:41:26 UTC (rev 7082)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveKin.py	2007-06-07 00:41:52 UTC (rev 7083)
@@ -33,4 +33,20 @@
     return
 
 
+  def test_initialize(self):
+    """
+    Test initialize().
+    """
+    raise NotImplementedError("Unit test not implemented.")
+    return
+
+
+  def test_adjustTopology(self):
+    """
+    Test adjustTopology().
+    """
+    raise NotImplementedError("Unit test not implemented.")
+    return
+
+
 # End of file 



More information about the cig-commits mailing list