[cig-commits] r14602 - in short/3D/PyLith/branches/pylith-swig: . unittests/libtests/faults

brad at geodynamics.org brad at geodynamics.org
Sun Apr 5 21:00:55 PDT 2009


Author: brad
Date: 2009-04-05 21:00:55 -0700 (Sun, 05 Apr 2009)
New Revision: 14602

Modified:
   short/3D/PyLith/branches/pylith-swig/TODO
   short/3D/PyLith/branches/pylith-swig/unittests/libtests/faults/Makefile.am
   short/3D/PyLith/branches/pylith-swig/unittests/libtests/faults/TestStepSlipFn.cc
   short/3D/PyLith/branches/pylith-swig/unittests/libtests/faults/TestStepSlipFn.hh
Log:
More updating fault stuff and some unit tests.

Modified: short/3D/PyLith/branches/pylith-swig/TODO
===================================================================
--- short/3D/PyLith/branches/pylith-swig/TODO	2009-04-06 03:55:49 UTC (rev 14601)
+++ short/3D/PyLith/branches/pylith-swig/TODO	2009-04-06 04:00:55 UTC (rev 14602)
@@ -26,6 +26,7 @@
 
   (4) Faults
     Use visitors in FaultCohesiveKin
+    TestFaultCohesive (FaultCohesiveKin cases)
 
   (5) Add missing unit tests
 

Modified: short/3D/PyLith/branches/pylith-swig/unittests/libtests/faults/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-swig/unittests/libtests/faults/Makefile.am	2009-04-06 03:55:49 UTC (rev 14601)
+++ short/3D/PyLith/branches/pylith-swig/unittests/libtests/faults/Makefile.am	2009-04-06 04:00:55 UTC (rev 14602)
@@ -22,13 +22,13 @@
 # Primary source files
 testfaults_SOURCES = \
 	TestFaultCohesive.cc \
+	TestStepSlipFn.cc \
 	TestEqKinSrc.cc \
 	test_faults.cc
 
 #	TestBruneSlipFn.cc \
 #	TestLiuCosSlipFn.cc \
 #	TestConstRateSlipFn.cc \
-#	TestStepSlipFn.cc \
 #	TestFault.cc \
 #	TestFaultCohesiveKin.cc \
 #	TestFaultCohesiveKinLine2.cc \

Modified: short/3D/PyLith/branches/pylith-swig/unittests/libtests/faults/TestStepSlipFn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-swig/unittests/libtests/faults/TestStepSlipFn.cc	2009-04-06 03:55:49 UTC (rev 14601)
+++ short/3D/PyLith/branches/pylith-swig/unittests/libtests/faults/TestStepSlipFn.cc	2009-04-06 04:00:55 UTC (rev 14602)
@@ -17,8 +17,9 @@
 #include "pylith/faults/StepSlipFn.hh" // USES StepSlipFn
 
 #include "pylith/faults/CohesiveTopology.hh" // USES CohesiveTopology
+#include "pylith/topology/Mesh.hh" // USES Mesh
+#include "pylith/topology/SubMesh.hh" // USES SubMesh
 #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
@@ -48,6 +49,11 @@
 } // pylith
 
 // ----------------------------------------------------------------------
+typedef pylith::topology::Mesh::SieveMesh SieveMesh;
+typedef pylith::topology::Mesh::SieveSubMesh SieveSubMesh;
+typedef pylith::topology::Mesh::RealSection RealSection;
+
+// ----------------------------------------------------------------------
 // Test constructor.
 void
 pylith::faults::TestStepSlipFn::testConstructor(void)
@@ -105,14 +111,14 @@
   const int numConstraintPts = 1;
 
   _TestStepSlipFn::DataStruct data = {meshFilename,
-					   faultLabel,
-					   faultId,
-					   finalSlipFilename,
-					   slipTimeFilename,
-					   constraintPts,
-					   finalSlipE,
-					   slipTimeE,
-					   numConstraintPts};
+				      faultLabel,
+				      faultId,
+				      finalSlipFilename,
+				      slipTimeFilename,
+				      constraintPts,
+				      finalSlipE,
+				      slipTimeE,
+				      numConstraintPts};
   _testInitialize(data);
 } // testInitialize1D
 
@@ -133,14 +139,14 @@
   const int numConstraintPts = 2;
 
   _TestStepSlipFn::DataStruct data = {meshFilename,
-					   faultLabel,
-					   faultId,
-					   finalSlipFilename,
-					   slipTimeFilename,
-					   constraintPts,
-					   finalSlipE,
-					   slipTimeE,
-					   numConstraintPts};
+				      faultLabel,
+				      faultId,
+				      finalSlipFilename,
+				      slipTimeFilename,
+				      constraintPts,
+				      finalSlipE,
+				      slipTimeE,
+				      numConstraintPts};
   _testInitialize(data);
 } // testInitialize2D
 
@@ -162,14 +168,14 @@
   const int numConstraintPts = 3;
 
   _TestStepSlipFn::DataStruct data = {meshFilename,
-					   faultLabel,
-					   faultId,
-					   finalSlipFilename,
-					   slipTimeFilename,
-					   constraintPts,
-					   finalSlipE,
-					   slipTimeE,
-					   numConstraintPts};
+				      faultLabel,
+				      faultId,
+				      finalSlipFilename,
+				      slipTimeFilename,
+				      constraintPts,
+				      finalSlipE,
+				      slipTimeE,
+				      numConstraintPts};
   _testInitialize(data);
 } // testInitialize3D
 
@@ -182,7 +188,8 @@
 			   0.0, 0.0};
   const double originTime = 5.064;
 
-  ALE::Obj<Mesh> faultMesh;
+  topology::Mesh mesh;
+  topology::SubMesh faultMesh;
   StepSlipFn slipfn;
   _initialize(&faultMesh, &slipfn, originTime);
   

Modified: short/3D/PyLith/branches/pylith-swig/unittests/libtests/faults/TestStepSlipFn.hh
===================================================================
--- short/3D/PyLith/branches/pylith-swig/unittests/libtests/faults/TestStepSlipFn.hh	2009-04-06 03:55:49 UTC (rev 14601)
+++ short/3D/PyLith/branches/pylith-swig/unittests/libtests/faults/TestStepSlipFn.hh	2009-04-06 04:00:55 UTC (rev 14602)
@@ -21,19 +21,16 @@
 #if !defined(pylith_faults_teststepslipfn_hh)
 #define pylith_faults_teststepslipfn_hh
 
-#include "pylith/utils/sievetypes.hh" // USES Mesh
-
 #include <cppunit/extensions/HelperMacros.h>
 
 /// Namespace for pylith package
 namespace pylith {
   namespace faults {
     class TestStepSlipFn;
-    class StepSlipFn;
 
     namespace _TestStepSlipFn {
       struct DataStruct;
-    } // _StepSlipTimeFn
+    } // _BruneSlipTimeFn
   } // faults
 } // pylith
 
@@ -87,12 +84,14 @@
 
   /** Initialize StepSlipFn.
    *
-   * @param faultMesh Fault mesh.
+   * @param mesh Finite-element mesh of domain.
+   * @param faultMesh Finite-element mesh of fault.
    * @param slipfn Step slip function.
    * @param originTime Origin time for earthquake rupture.
    */
   static
-  void _initialize(ALE::Obj<Mesh>* faultMesh,
+  void _initialize(topology::Mesh* mesh,
+		   topology::SubMesh* faultMesh,
 		   StepSlipFn* slipfn,
 		   const double originTime);
 



More information about the CIG-COMMITS mailing list