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

knepley at geodynamics.org knepley at geodynamics.org
Sat Nov 10 12:16:29 PST 2012


Author: knepley
Date: 2012-11-10 12:16:28 -0800 (Sat, 10 Nov 2012)
New Revision: 21011

Modified:
   short/3D/PyLith/trunk/libsrc/pylith/faults/CohesiveTopology.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/TractPerturbation.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKin.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataHex8.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataQuad4.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataQuad4e.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataTet4.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataTet4e.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataTet4f.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataTri3d.cc
Log:
Now CohesiveKin* tests work (except splitting)

Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/CohesiveTopology.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/CohesiveTopology.cc	2012-11-10 15:56:40 UTC (rev 21010)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/CohesiveTopology.cc	2012-11-10 20:16:28 UTC (rev 21011)
@@ -1160,7 +1160,7 @@
     const PetscInt faultPoint = p_iter->second;
     PetscInt       dmPoint    = convertSieveToDMPointNumbering(sievePoint, numNormalCells, numCohesiveCells, numNormalVertices, numShadowVertices, numLagrangeVertices);
     renum[faultPoint] = dmPoint;
-    std::cout << "renum["<<faultPoint<<"]: "<<dmPoint<<std::endl;
+    //std::cout << "renum["<<faultPoint<<"]: "<<dmPoint<<std::endl;
   }
   for(PetscInt p = 1; p < pEnd-pStart; ++p) {
     if (renum[p-1] == -1) continue;

Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/TractPerturbation.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/TractPerturbation.cc	2012-11-10 15:56:40 UTC (rev 21010)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/TractPerturbation.cc	2012-11-10 20:16:28 UTC (rev 21011)
@@ -111,9 +111,9 @@
   _parameters->get("value").allocate();
   if (_dbInitial) {
     _parameters->add("initial", "traction_initial", topology::FieldBase::VERTICES_FIELD, spaceDim);
-    _parameters->get("value").vectorFieldType(topology::FieldBase::VECTOR);
-    _parameters->get("value").scale(pressureScale);
-    _parameters->get("value").allocate();
+    _parameters->get("initial").vectorFieldType(topology::FieldBase::VECTOR);
+    _parameters->get("initial").scale(pressureScale);
+    _parameters->get("initial").allocate();
   }
   if (_dbRate) {
     _parameters->add("rate", "traction_rate", topology::FieldBase::VERTICES_FIELD, spaceDim);

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKin.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKin.cc	2012-11-10 15:56:40 UTC (rev 21010)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKin.cc	2012-11-10 20:16:28 UTC (rev 21011)
@@ -156,7 +156,7 @@
 
     err = PetscFindInt(_data->verticesLagrange[v-vStart], numPoints, points, &faultPoint);CHECK_PETSC_ERROR(err);
     CPPUNIT_ASSERT(faultPoint >= 0);
-    CPPUNIT_ASSERT_EQUAL(faultPoint, v);
+    CPPUNIT_ASSERT_EQUAL(faultPoint, _data->verticesFault[v-vStart]);
   } // for
   err = ISRestoreIndices(subpointMap, &points);CHECK_PETSC_ERROR(err);
   CPPUNIT_ASSERT_EQUAL(_data->numFaultVertices, vEnd-vStart);

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataHex8.cc	2012-11-10 15:56:40 UTC (rev 21010)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataHex8.cc	2012-11-10 20:16:28 UTC (rev 21011)
@@ -178,16 +178,16 @@
 
 const int pylith::faults::CohesiveKinDataHex8::_numFaultVertices = 4;
 const int pylith::faults::CohesiveKinDataHex8::_verticesFault[] = {
-  3, 4, 2, 1
+   3,  4,  2,  1
 };
 const int pylith::faults::CohesiveKinDataHex8::_verticesLagrange[] = {
-  20, 21, 19, 18
+  21, 22, 20, 19
 };
 const int pylith::faults::CohesiveKinDataHex8::_verticesNegative[] = {
-  8, 9, 7, 6
+   9, 10,  8,  7
 };
 const int pylith::faults::CohesiveKinDataHex8::_verticesPositive[] = {
-  16, 17, 15, 14
+  17, 18, 16, 15
 };
 
 const int pylith::faults::CohesiveKinDataHex8::_numCohesiveCells = 1;
@@ -195,7 +195,7 @@
   0
 };
 const int pylith::faults::CohesiveKinDataHex8::_cellMappingCohesive[] = {
-  22
+  2
 };
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataQuad4.cc	2012-11-10 15:56:40 UTC (rev 21010)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataQuad4.cc	2012-11-10 20:16:28 UTC (rev 21011)
@@ -33,18 +33,18 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,10 vertices are 2-9.
+ * Cells are 0-1,2 vertices are 3-8,9-12.
  *
- *       3 -------- 5 -11-- 9 -------- 7
+ *       4 -------- 6 -12--10 -------- 8
  *       |          |       |          |
  *       |          |       |          |
  *       |          |       |          |
+ *       |          |   2   |          |
  *       |          |       |          |
  *       |          |       |          |
  *       |          |       |          |
  *       |          |       |          |
- *       |          |       |          |
- *       2 -------- 4 -10-- 8 -------- 6
+ *       3 -------- 5 -11-- 9 -------- 7
  */
 
 #include "CohesiveKinDataQuad4.hh"
@@ -137,16 +137,16 @@
 
 const int pylith::faults::CohesiveKinDataQuad4::_numFaultVertices = 2;
 const int pylith::faults::CohesiveKinDataQuad4::_verticesFault[] = {
-  1, 2
+   1,  2
 };
 const int pylith::faults::CohesiveKinDataQuad4::_verticesLagrange[] = {
-  10, 11
+  11, 12
 };
 const int pylith::faults::CohesiveKinDataQuad4::_verticesNegative[] = {
-  4, 5
+   5,  6
 };
 const int pylith::faults::CohesiveKinDataQuad4::_verticesPositive[] = {
-  8, 9
+   9, 10
 };
 
 const int pylith::faults::CohesiveKinDataQuad4::_numCohesiveCells = 1;
@@ -154,7 +154,7 @@
   0
 };
 const int pylith::faults::CohesiveKinDataQuad4::_cellMappingCohesive[] = {
-  12
+  2
 };
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataQuad4e.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataQuad4e.cc	2012-11-10 15:56:40 UTC (rev 21010)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataQuad4e.cc	2012-11-10 20:16:28 UTC (rev 21011)
@@ -42,9 +42,9 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-3,16-17 vertices are 4-15.
+ * Cells are 0-3,4-5 vertices are 6-20.
  *
- *      10 --------11-18-15 --------12
+ *      12 --------13-20-17 --------14
  *       |          |     |          |
  *       |          |     |          |
  *       |          |     |          |
@@ -53,7 +53,7 @@
  *       |          |     |          |
  *       |          |     |          |
  *       |          |     |          |
- *       5 -------- 7-17-14 -------- 9
+ *       7 -------- 9-19-16 --------11
  *       |          |     |          |
  *       |          |     |          |
  *       |          |     |          |
@@ -62,7 +62,7 @@
  *       |          |     |          |
  *       |          |     |          |
  *       |          |     |          |
- *       4 -------- 6-16-13 -------- 8
+ *       6 -------- 8-18-15 --------10
  */
 
 
@@ -187,16 +187,16 @@
 
 const int pylith::faults::CohesiveKinDataQuad4e::_numFaultVertices = 3;
 const int pylith::faults::CohesiveKinDataQuad4e::_verticesFault[] = {
-  3, 2, 4
+   3,  2,  4
 };
 const int pylith::faults::CohesiveKinDataQuad4e::_verticesLagrange[] = {
-  17, 16, 18
+  19, 18, 20
 };
 const int pylith::faults::CohesiveKinDataQuad4e::_verticesNegative[] = {
-  7, 6, 11
+   9,  8, 13
 };
 const int pylith::faults::CohesiveKinDataQuad4e::_verticesPositive[] = {
-  14, 13, 15
+  16, 15, 17
 };
 
 const int pylith::faults::CohesiveKinDataQuad4e::_numCohesiveCells = 2;
@@ -204,7 +204,7 @@
   0, 1
 };
 const int pylith::faults::CohesiveKinDataQuad4e::_cellMappingCohesive[] = {
-  19, 20
+  4, 5
 };
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataTet4.cc	2012-11-10 15:56:40 UTC (rev 21010)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataTet4.cc	2012-11-10 20:16:28 UTC (rev 21011)
@@ -26,10 +26,10 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-1,13, vertices are 2-9.
+ * Cells are 0-1,2, vertices are 3-13.
  *
- * 2   3,4,5  7,8,9   6
- *             10,11,12
+ * 3   4,5,6  8,9,10   7
+ *             11,12,13
  *     ^^^^^^^^^^^^ Cohesive element in x-y plane.
  */
 
@@ -137,16 +137,16 @@
 
 const int pylith::faults::CohesiveKinDataTet4::_numFaultVertices = 3;
 const int pylith::faults::CohesiveKinDataTet4::_verticesFault[] = {
-  2, 1, 3
+   2,  1,  3
 };
 const int pylith::faults::CohesiveKinDataTet4::_verticesLagrange[] = {
-  11, 10, 12
+  12, 11, 13
 };
 const int pylith::faults::CohesiveKinDataTet4::_verticesNegative[] = {
-  4, 3, 5
+   5,  4,  6
 };
 const int pylith::faults::CohesiveKinDataTet4::_verticesPositive[] = {
-  8, 7, 9
+   9,  8, 10
 };
 
 const int pylith::faults::CohesiveKinDataTet4::_numCohesiveCells = 1;
@@ -154,7 +154,7 @@
   0
 };
 const int pylith::faults::CohesiveKinDataTet4::_cellMappingCohesive[] = {
-  13
+  2
 };
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataTet4e.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataTet4e.cc	2012-11-10 15:56:40 UTC (rev 21010)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataTet4e.cc	2012-11-10 20:16:28 UTC (rev 21011)
@@ -161,16 +161,16 @@
 
 const int pylith::faults::CohesiveKinDataTet4e::_numFaultVertices = 4;
 const int pylith::faults::CohesiveKinDataTet4e::_verticesFault[] = {
-  3, 2, 4, 5
+   3,  2,  4,  5
 };
 const int pylith::faults::CohesiveKinDataTet4e::_verticesLagrange[] = {
-  15, 14, 16, 17
+  17, 16, 18, 19
 };
 const int pylith::faults::CohesiveKinDataTet4e::_verticesNegative[] = {
-  6, 5, 7, 8
+   8,  7,  9, 10
 };
 const int pylith::faults::CohesiveKinDataTet4e::_verticesPositive[] = {
-  11, 10, 12, 13
+  13, 12, 14, 15
 };
 
 const int pylith::faults::CohesiveKinDataTet4e::_numCohesiveCells = 2;
@@ -178,7 +178,7 @@
   0, 1
 };
 const int pylith::faults::CohesiveKinDataTet4e::_cellMappingCohesive[] = {
-  18, 19
+  4, 5
 };
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataTet4f.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataTet4f.cc	2012-11-10 15:56:40 UTC (rev 21010)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataTet4f.cc	2012-11-10 20:16:28 UTC (rev 21011)
@@ -150,16 +150,16 @@
 
 const int pylith::faults::CohesiveKinDataTet4f::_numFaultVertices = 3;
 const int pylith::faults::CohesiveKinDataTet4f::_verticesFault[] = {
-  3, 1, 2
+   3,  1,  2
 };
 const int pylith::faults::CohesiveKinDataTet4f::_verticesLagrange[] = {
-  12, 10, 11
+  13, 11, 12
 };
 const int pylith::faults::CohesiveKinDataTet4f::_verticesNegative[] = {
-  5, 3, 4
+   6,  4,  5
 };
 const int pylith::faults::CohesiveKinDataTet4f::_verticesPositive[] = {
-  9, 7, 8
+  10,  8,  9
 };
 
 const int pylith::faults::CohesiveKinDataTet4f::_numCohesiveCells = 1;
@@ -167,7 +167,7 @@
   0
 };
 const int pylith::faults::CohesiveKinDataTet4f::_cellMappingCohesive[] = {
-  13
+  2
 };
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataTri3d.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataTri3d.cc	2012-11-10 15:56:40 UTC (rev 21010)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveKinDataTri3d.cc	2012-11-10 20:16:28 UTC (rev 21011)
@@ -41,27 +41,27 @@
  *
  * After adding cohesive elements
  *
- * Cells are 0-3, 13-14, vertices are 4-12.
+ * Cells are 0-3, 4-5, vertices are 6-14,15-17.
  *
- *         9
+ *        11
  *        / \
  *       /   \
  *      /     \
  *     /       \
- *    8---------  5
- * 15 |        13/|
- *   12--------10 |
+ *   10---------  7
+ * 17 |        15/|
+ *   14--------12 |
  *     \       /| |\
  *      \     / | | \
  *       \   /  | |  \
  *        \ /   | |   \
- *         4    | |    7
+ *         6    | |    9
  *          \   | |   /
  *           \  | |  /
  *            \ | | /
  *             \| |/
- *             11-6
- *               14
+ *             13-8
+ *               16
  */
 
 
@@ -174,16 +174,16 @@
 
 const int pylith::faults::CohesiveKinDataTri3d::_numFaultVertices = 3;
 const int pylith::faults::CohesiveKinDataTri3d::_verticesFault[] = {
-  4, 2, 3
+   4,  2,  3
 };
 const int pylith::faults::CohesiveKinDataTri3d::_verticesLagrange[] = {
-  15, 13, 14
+  17, 15, 16
 };
 const int pylith::faults::CohesiveKinDataTri3d::_verticesNegative[] = {
-  8, 5, 6
+  10,  7,  8
 };
 const int pylith::faults::CohesiveKinDataTri3d::_verticesPositive[] = {
-  12, 10, 11
+  14, 12, 13
 };
 
 const int pylith::faults::CohesiveKinDataTri3d::_numCohesiveCells = 2;
@@ -191,7 +191,7 @@
   0, 1
 };
 const int pylith::faults::CohesiveKinDataTri3d::_cellMappingCohesive[] = {
-  16, 17
+  4, 5
 };
 
 const PylithScalar pylith::faults::CohesiveKinDataTri3d::_residual[] = {



More information about the CIG-COMMITS mailing list