[cig-commits] r20053 - in short/3D/PyLith/branches/v1.7-trunk: libsrc/pylith/faults libsrc/pylith/problems unittests/libtests/faults unittests/libtests/faults/data

brad at geodynamics.org brad at geodynamics.org
Tue May 8 14:31:05 PDT 2012


Author: brad
Date: 2012-05-08 14:31:04 -0700 (Tue, 08 May 2012)
New Revision: 20053

Added:
   short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestTractPerturbation.cc
   short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestTractPerturbation.hh
   short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/tri3_changetract.spatialdb
Modified:
   short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/TractPerturbation.cc
   short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/problems/Solver.cc
   short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/Makefile.am
   short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/Makefile.am
Log:
Added C++ unit testing for TractPerturbation. Fixed bugs.

Modified: short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/TractPerturbation.cc
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/TractPerturbation.cc	2012-05-08 18:16:01 UTC (rev 20052)
+++ short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/TractPerturbation.cc	2012-05-08 21:31:04 UTC (rev 20053)
@@ -108,7 +108,7 @@
     _parameters->add("change", "change_traction", spaceDim, topology::FieldBase::VECTOR, pressureScale);
     _parameters->add("change time", "change_traction_time", 1, topology::FieldBase::SCALAR, timeScale);
   } // if
-  _parameters->allocate(topology::FieldBase::VERTICES_FIELD, 1);
+  _parameters->allocate(topology::FieldBase::VERTICES_FIELD, 0);
   const ALE::Obj<SubRealUniformSection>& parametersSection = _parameters->section();
   assert(!parametersSection.isNull());
 
@@ -247,22 +247,17 @@
   const SieveSubMesh::label_sequence::iterator verticesEnd = vertices->end();
 
   // Get sections
-  scalar_array tractionsVertex(spaceDim);
-  const ALE::Obj<SubRealUniformSection>& parametersSection =
-    _parameters->section();
+  const ALE::Obj<SubRealUniformSection>& parametersSection = _parameters->section();
   assert(!parametersSection.isNull());
   const int parametersFiberDim = _parameters->fiberDim();
   const int valueIndex = _parameters->sectionIndex("value");
   const int valueFiberDim = _parameters->sectionFiberDim("value");
-  assert(valueFiberDim == tractionsVertex.size());
   assert(valueIndex+valueFiberDim <= parametersFiberDim);
 
   const ALE::Obj<RealSection>& tractionSection = tractionField->section();
   assert(!tractionSection.isNull());
 
-  for (SieveSubMesh::label_sequence::iterator v_iter=verticesBegin;
-       v_iter != verticesEnd;
-       ++v_iter) {
+  for (SieveSubMesh::label_sequence::iterator v_iter=verticesBegin; v_iter != verticesEnd; ++v_iter) {
     assert(parametersFiberDim == parametersSection->getFiberDimension(*v_iter));
     const PylithScalar* parametersVertex = parametersSection->restrictPoint(*v_iter);
     assert(parametersVertex);
@@ -270,8 +265,8 @@
     assert(tractionVertex);
 
     // Update field
-    assert(spaceDim == tractionSection->getFiberDimension(*v_iter));
-    tractionSection->updateAddPoint(*v_iter, &tractionsVertex[0]);
+    assert(valueFiberDim == tractionSection->getFiberDimension(*v_iter));
+    tractionSection->updateAddPoint(*v_iter, tractionVertex);
   } // for
 
 } // traction
@@ -359,8 +354,8 @@
   scalar_array coordsVertexGlobal(spaceDim);
 
   // Get sections.
-  const ALE::Obj<RealSection>& coordinates = sieveMesh->getRealSection("coordinates");
-  assert(!coordinates.isNull());
+  const ALE::Obj<RealSection>& coordsSection = sieveMesh->getRealSection("coordinates");
+  assert(!coordsSection.isNull());
 
   const ALE::Obj<SubRealUniformSection>& parametersSection = _parameters->section();
   assert(!parametersSection.isNull());
@@ -372,6 +367,8 @@
 
   // Loop over cells in boundary mesh and perform queries.
   for (SieveSubMesh::label_sequence::iterator v_iter = verticesBegin; v_iter != verticesEnd; ++v_iter) {
+    assert(spaceDim == coordsSection->getFiberDimension(*v_iter));
+    coordsSection->restrictPoint(*v_iter, &coordsVertexGlobal[0], coordsVertexGlobal.size());
     normalizer.dimensionalize(&coordsVertexGlobal[0], coordsVertexGlobal.size(), lengthScale);
     
     valuesVertex = 0.0;

Modified: short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/problems/Solver.cc
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/problems/Solver.cc	2012-05-08 18:16:01 UTC (rev 20052)
+++ short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/problems/Solver.cc	2012-05-08 21:31:04 UTC (rev 20053)
@@ -253,7 +253,7 @@
 
   if (formulation->splitFields() && 
       formulation->useCustomConstraintPC() &&
-      solutionSection->getNumSpaces() > sieveMesh->getDimension()) {
+      numSpaces > spaceDim) {
     // We have split fields with a custom constraint preconditioner
     // and constraints exist.
 

Modified: short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/Makefile.am
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/Makefile.am	2012-05-08 18:16:01 UTC (rev 20052)
+++ short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/Makefile.am	2012-05-08 21:31:04 UTC (rev 20053)
@@ -57,6 +57,7 @@
 	TestFaultCohesiveDynQuad4.cc \
 	TestFaultCohesiveDynTet4.cc \
 	TestFaultCohesiveDynHex8.cc \
+	TestTractPerturbation.cc \
 	TestFaultCohesiveImpulses.cc \
 	TestFaultCohesiveImpulsesCases.cc \
 	test_faults.cc
@@ -93,6 +94,7 @@
 	TestFaultCohesiveDynQuad4.hh \
 	TestFaultCohesiveDynTet4.hh \
 	TestFaultCohesiveDynHex8.hh \
+	TestTractPerturbation.hh \
 	TestFaultCohesiveImpulses.hh \
 	TestFaultCohesiveImpulsesCases.hh
 

Added: short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestTractPerturbation.cc
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestTractPerturbation.cc	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestTractPerturbation.cc	2012-05-08 21:31:04 UTC (rev 20053)
@@ -0,0 +1,302 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestTractPerturbation.hh" // Implementation of class methods
+
+#include "pylith/faults/TractPerturbation.hh" // USES TractPerturbation
+
+#include "pylith/faults/CohesiveTopology.hh" // USES CohesiveTopology
+#include "pylith/topology/Mesh.hh" // USES Mesh
+#include "pylith/topology/SubMesh.hh" // USES SubMesh
+#include "pylith/topology/Field.hh" // USES Field
+#include "pylith/topology/FieldsNew.hh" // USES FieldsNew
+#include "pylith/meshio/MeshIOAscii.hh" // USES MeshIOAscii
+
+#include "spatialdata/geocoords/CSCart.hh" // USES CSCart
+#include "spatialdata/spatialdb/SimpleDB.hh" // USES SimpleDB
+#include "spatialdata/spatialdb/SimpleIOAscii.hh" // USES SimpleIOAscii
+#include "spatialdata/units/Nondimensional.hh" // USES Nondimensional
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::faults::TestTractPerturbation );
+
+// ----------------------------------------------------------------------
+typedef pylith::topology::Mesh::SieveMesh SieveMesh;
+typedef pylith::topology::Mesh::SieveSubMesh SieveSubMesh;
+typedef pylith::topology::Mesh::RealSection RealSection;
+typedef pylith::topology::Mesh::RealUniformSection RealUniformSection;
+
+// ----------------------------------------------------------------------
+// Test constructor.
+void
+pylith::faults::TestTractPerturbation::testConstructor(void)
+{ // testConstructor
+  TractPerturbation eqsrc;
+} // testConstructor
+
+// ----------------------------------------------------------------------
+// Test label().
+void
+pylith::faults::TestTractPerturbation::testLabel(void)
+{ // testLabel
+  const std::string& label = "nucleation";
+
+  TractPerturbation tract;
+  tract.label(label.c_str());
+  CPPUNIT_ASSERT_EQUAL(label, tract._label);
+} // testLabel
+
+// ----------------------------------------------------------------------
+// Test initialize() using 2-D mesh.
+void
+pylith::faults::TestTractPerturbation::testInitialize(void)
+{ // testInitialize
+  topology::Mesh mesh;
+  topology::SubMesh faultMesh;
+  TractPerturbation tract;
+  _initialize(&mesh, &faultMesh, &tract);
+  
+  // Rely on testTraction() for verification of results.
+} // testInitialize
+
+// ----------------------------------------------------------------------
+// Test traction() using 2-D mesh().
+void
+pylith::faults::TestTractPerturbation::testTraction(void)
+{ // testTraction
+  const PylithScalar tractionE[4] = { 
+    -1.0*(-2.0+1.0), -1.0*(1.0-0.5), // initial + change
+    -1.0*(-2.1), -1.0*(1.1), // initial
+  };
+
+  topology::Mesh mesh;
+  topology::SubMesh faultMesh;
+  TractPerturbation tract;
+  _initialize(&mesh, &faultMesh, &tract);
+  
+  const spatialdata::geocoords::CoordSys* cs = faultMesh.coordsys();
+  CPPUNIT_ASSERT(cs);
+
+  const int spaceDim = cs->spaceDim();
+  const ALE::Obj<SieveSubMesh>& faultSieveMesh = faultMesh.sieveMesh();
+  CPPUNIT_ASSERT(!faultSieveMesh.isNull());
+  const ALE::Obj<SieveMesh::label_sequence>& vertices = faultSieveMesh->depthStratum(0);
+  const SieveMesh::label_sequence::iterator verticesEnd = vertices->end();
+  topology::Field<topology::SubMesh> traction(faultMesh);
+  traction.newSection(vertices, spaceDim);
+  traction.allocate();
+
+  const PylithScalar t = 2.134;
+  tract.traction(&traction, t);
+
+  //traction.view("TRACTION"); // DEBUGGING
+
+  const PylithScalar tolerance = 1.0e-06;
+  int iPoint = 0;
+
+  const ALE::Obj<RealSection>& tractionSection = traction.section();
+  CPPUNIT_ASSERT(!tractionSection.isNull());
+  for (SieveMesh::label_sequence::iterator v_iter=vertices->begin(); v_iter != verticesEnd; ++v_iter, ++iPoint) {
+    const int fiberDim = tractionSection->getFiberDimension(*v_iter);
+    CPPUNIT_ASSERT_EQUAL(spaceDim, fiberDim);
+    const PylithScalar* vals = tractionSection->restrictPoint(*v_iter);
+    CPPUNIT_ASSERT(vals);
+
+    for (int iDim=0; iDim < fiberDim; ++iDim) {
+      const PylithScalar valueE = tractionE[iPoint*spaceDim+iDim];
+      CPPUNIT_ASSERT_DOUBLES_EQUAL(valueE, vals[iDim], tolerance);
+    } // for
+  } // for
+} // testTraction
+
+// ----------------------------------------------------------------------
+// Test parameterFields() using 2-D mesh.
+void
+pylith::faults::TestTractPerturbation::testParameterFields(void)
+{ // testParameterFields
+  const int fiberDimE = 7;
+  const PylithScalar parametersE[2*fiberDimE] = {
+    0.0, 0.0,   2.0, -1.0,   -1.0, 0.5, 1.5,
+    0.0, 0.0,   2.1, -1.1,   -0.8, 0.7, 2.5,
+  };
+
+  topology::Mesh mesh;
+  topology::SubMesh faultMesh;
+  TractPerturbation tract;
+  _initialize(&mesh, &faultMesh, &tract);
+  
+  const topology::FieldsNew<topology::SubMesh>* parameters = tract.parameterFields();
+  const ALE::Obj<RealUniformSection>& parametersSection = parameters->section();
+  CPPUNIT_ASSERT(!parametersSection.isNull());
+
+  const ALE::Obj<SieveSubMesh>& faultSieveMesh = faultMesh.sieveMesh();
+  CPPUNIT_ASSERT(!faultSieveMesh.isNull());
+  const ALE::Obj<SieveMesh::label_sequence>& vertices = faultSieveMesh->depthStratum(0);
+  const SieveMesh::label_sequence::iterator verticesEnd = vertices->end();
+
+  const PylithScalar tolerance = 1.0e-06;
+  int iPoint = 0;
+  for (SieveMesh::label_sequence::iterator v_iter=vertices->begin(); v_iter != verticesEnd; ++v_iter, ++iPoint) {
+    const int fiberDim = parametersSection->getFiberDimension(*v_iter);
+    CPPUNIT_ASSERT_EQUAL(fiberDimE, fiberDim);
+    const PylithScalar* vals = parametersSection->restrictPoint(*v_iter);
+    CPPUNIT_ASSERT(vals);
+
+    for (int iDim=0; iDim < fiberDim; ++iDim) {
+      const PylithScalar valueE = parametersE[iPoint*fiberDim+iDim];
+      CPPUNIT_ASSERT_DOUBLES_EQUAL(valueE, vals[iDim], tolerance);
+    } // for
+  } // for
+} // testParameterFields
+
+// ----------------------------------------------------------------------
+// Test vertexField() using 2-D mesh.
+void
+pylith::faults::TestTractPerturbation::testVertexField(void)
+{ // testVertexField
+  const int fiberDimE = 1;
+  const PylithScalar fieldE[2*fiberDimE] = {
+    1.5,
+    2.5,
+  };
+  const char* label = "change-start-time";
+
+  topology::Mesh mesh;
+  topology::SubMesh faultMesh;
+  TractPerturbation tract;
+  _initialize(&mesh, &faultMesh, &tract);
+
+  const topology::Field<topology::SubMesh>& field = tract.vertexField(label);
+  const ALE::Obj<RealSection>& section = field.section();
+  CPPUNIT_ASSERT(!section.isNull());
+
+  const ALE::Obj<SieveSubMesh>& faultSieveMesh = faultMesh.sieveMesh();
+  CPPUNIT_ASSERT(!faultSieveMesh.isNull());
+  const ALE::Obj<SieveMesh::label_sequence>& vertices = faultSieveMesh->depthStratum(0);
+  const SieveMesh::label_sequence::iterator verticesEnd = vertices->end();
+
+  const PylithScalar tolerance = 1.0e-06;
+  int iPoint = 0;
+  for (SieveMesh::label_sequence::iterator v_iter=vertices->begin(); v_iter != verticesEnd; ++v_iter, ++iPoint) {
+    const int fiberDim = section->getFiberDimension(*v_iter);
+    CPPUNIT_ASSERT_EQUAL(fiberDimE, fiberDim);
+    const PylithScalar* vals = section->restrictPoint(*v_iter);
+    CPPUNIT_ASSERT(vals);
+
+    for (int iDim=0; iDim < fiberDim; ++iDim) {
+      const PylithScalar valueE = fieldE[iPoint*fiberDim+iDim];
+      CPPUNIT_ASSERT_DOUBLES_EQUAL(valueE, vals[iDim], tolerance);
+    } // for
+  } // for
+} // testVertexField
+
+// ----------------------------------------------------------------------
+// Initialize TractPerturbation.
+void
+pylith::faults::TestTractPerturbation::_initialize(topology::Mesh* mesh,
+						   topology::SubMesh* faultMesh,
+						   TractPerturbation* tract)
+{ // _initialize
+  CPPUNIT_ASSERT(mesh);
+  CPPUNIT_ASSERT(faultMesh);
+  CPPUNIT_ASSERT(tract);
+
+  const char* meshFilename = "data/tri3.mesh";
+  const char* faultLabel = "fault";
+  const int faultId = 2;
+  const char* initialFilename = "data/tri3_initialtract.spatialdb";
+  const char* changeFilename = "data/tri3_changetract.spatialdb";
+  const PylithScalar orientationVertex[4] = {
+      0.0, -1.0,  -1.0, 0.0,
+  };
+
+  meshio::MeshIOAscii meshIO;
+  meshIO.filename(meshFilename);
+  meshIO.debug(false);
+  meshIO.interpolate(false);
+  meshIO.read(mesh);
+
+  // Set up coordinates
+  spatialdata::geocoords::CSCart cs;
+  cs.setSpaceDim(mesh->dimension());
+  cs.initialize();
+  mesh->coordsys(&cs);
+  const int spaceDim = cs.spaceDim();
+
+  // Create fault mesh
+  int firstFaultVertex = 0;
+  int firstLagrangeVertex = mesh->sieveMesh()->getIntSection(faultLabel)->size();
+  int firstFaultCell = mesh->sieveMesh()->getIntSection(faultLabel)->size();
+  const bool useLagrangeConstraints = true;
+  if (useLagrangeConstraints) {
+    firstFaultCell += mesh->sieveMesh()->getIntSection(faultLabel)->size();
+  } // if
+  ALE::Obj<SieveFlexMesh> faultBoundary = 0;
+  const ALE::Obj<SieveMesh>& sieveMesh = mesh->sieveMesh();
+  CPPUNIT_ASSERT(!sieveMesh.isNull());
+  CohesiveTopology::createFault(faultMesh, faultBoundary,
+                                *mesh, sieveMesh->getIntSection(faultLabel));
+  CohesiveTopology::create(mesh, *faultMesh, faultBoundary, 
+                           sieveMesh->getIntSection(faultLabel),
+                           faultId,
+                           firstFaultVertex, firstLagrangeVertex, firstFaultCell,
+                           useLagrangeConstraints);
+  // Need to copy coordinates from mesh to fault mesh since we are
+  // using create() instead of createParallel().
+  const ALE::Obj<SieveSubMesh>& faultSieveMesh = faultMesh->sieveMesh();
+  CPPUNIT_ASSERT(!faultSieveMesh.isNull());
+  faultSieveMesh->setRealSection("coordinates", 
+				 sieveMesh->getRealSection("coordinates"));
+
+  // Setup databases
+  spatialdata::spatialdb::SimpleDB dbInitial("initial traction");
+  spatialdata::spatialdb::SimpleIOAscii ioInitial;
+  ioInitial.filename(initialFilename);
+  dbInitial.ioHandler(&ioInitial);
+  
+  spatialdata::spatialdb::SimpleDB dbChange("traction change");
+  spatialdata::spatialdb::SimpleIOAscii ioChange;
+  ioChange.filename(changeFilename);
+  dbChange.ioHandler(&ioChange);
+
+  // Setup fault orientation
+  const ALE::Obj<SieveMesh::label_sequence>& vertices = faultSieveMesh->depthStratum(0);
+  const SieveMesh::label_sequence::iterator verticesEnd = vertices->end();
+  topology::Field<topology::SubMesh> faultOrientation(*faultMesh);
+  faultOrientation.newSection(vertices, spaceDim*spaceDim);
+  faultOrientation.allocate();
+  const ALE::Obj<RealSection>& orientationSection = faultOrientation.section();
+  CPPUNIT_ASSERT(!orientationSection.isNull());
+  for (SieveMesh::label_sequence::iterator v_iter=vertices->begin(); v_iter != verticesEnd; ++v_iter) {
+    CPPUNIT_ASSERT_EQUAL(spaceDim*spaceDim, orientationSection->getFiberDimension(*v_iter));
+    orientationSection->updatePoint(*v_iter, orientationVertex);
+  } // for
+  
+  spatialdata::units::Nondimensional normalizer;
+
+  // setup TractPerturbation
+  tract->dbInitial(&dbInitial);
+  tract->dbChange(&dbChange);
+  
+  tract->initialize(*faultMesh, faultOrientation, normalizer);
+} // _initialize
+
+
+// End of file 

Added: short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestTractPerturbation.hh
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestTractPerturbation.hh	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestTractPerturbation.hh	2012-05-08 21:31:04 UTC (rev 20053)
@@ -0,0 +1,98 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/faults/TestTractPerturbation.hh
+ *
+ * @brief C++ TestTractPerturbation object
+ *
+ * C++ unit testing for TractPerturbation.
+ */
+
+#if !defined(pylith_faults_testtractperturbation_hh)
+#define pylith_faults_testtractperturbation_hh
+
+#include "pylith/faults/faultsfwd.hh" // USES TractPerturbation
+#include "pylith/topology/topologyfwd.hh" // USES Mesh
+
+#include <cppunit/extensions/HelperMacros.h>
+
+/// Namespace for pylith package
+namespace pylith {
+  namespace faults {
+    class TestTractPerturbation;
+  } // faults
+} // pylith
+
+/// C++ unit testing for TractPerturbation
+class pylith::faults::TestTractPerturbation : public CppUnit::TestFixture
+{ // class TestTractPerturbation
+
+  // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+  CPPUNIT_TEST_SUITE( TestTractPerturbation );
+
+  CPPUNIT_TEST( testConstructor );
+  CPPUNIT_TEST( testLabel );
+  CPPUNIT_TEST( testInitialize );
+  CPPUNIT_TEST( testTraction );
+  CPPUNIT_TEST( testParameterFields );
+  CPPUNIT_TEST( testVertexField );
+
+  CPPUNIT_TEST_SUITE_END();
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+  /// Test constructor.
+  void testConstructor(void);
+
+  /// Test label().
+  void testLabel(void);
+
+  /// Test initialize() with 2-D mesh.
+  void testInitialize(void);
+
+  /// Test traction() with 2-D mesh.
+  void testTraction(void);
+
+  /// Test parameterFields() with 2-D mesh.
+  void testParameterFields(void);
+
+  /// Test VertexField() with 2-D mesh.
+  void testVertexField(void);
+
+  // PRIVATE METHODS ////////////////////////////////////////////////////
+private :
+
+  /** Initialize TractPerturbation.
+   *
+   * @param mesh Finite-element mesh of domain.
+   * @param faultMesh Finite-element mesh of fault.
+   * @param tract Traction perturbation.
+   */
+  static
+  void _initialize(topology::Mesh* mesh,
+		   topology::SubMesh* faultMesh,
+		   TractPerturbation* tract);
+
+}; // class TestTractPerturbation
+
+#endif // pylith_faults_testtractperturbation_hh
+
+
+// End of file 

Modified: short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/Makefile.am
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/Makefile.am	2012-05-08 18:16:01 UTC (rev 20052)
+++ short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/Makefile.am	2012-05-08 21:31:04 UTC (rev 20053)
@@ -40,6 +40,7 @@
 	tri3d_sliptime.spatialdb \
 	tri3d_risetime.spatialdb \
 	tri3_initialtract.spatialdb \
+	tri3_changetract.spatialdb \
 	tri3d_initialtract.spatialdb \
 	tri3_impulses.spatialdb \
 	quad4.mesh \

Added: short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/tri3_changetract.spatialdb
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/tri3_changetract.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/tri3_changetract.spatialdb	2012-05-08 21:31:04 UTC (rev 20053)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 3
+  value-names =  traction-shear traction-normal  change-start-time
+  value-units =  Pa   Pa   s
+  num-locs = 2
+  data-dim = 1
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  +1.0   -0.5   +1.0   1.5
+0.0  -1.0   -0.7   +0.8   2.5



More information about the CIG-COMMITS mailing list