[cig-commits] r16481 - in short/3D/PyLith/trunk: playpen/friction/twotri3 unittests/libtests/faults unittests/libtests/faults/data

surendra at geodynamics.org surendra at geodynamics.org
Thu Apr 1 10:59:13 PDT 2010


Author: surendra
Date: 2010-04-01 10:59:12 -0700 (Thu, 01 Apr 2010)
New Revision: 16481

Modified:
   short/3D/PyLith/trunk/playpen/friction/twotri3/shear-stick.cfg
   short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveDyn.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataHex8.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataQuad4.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTet4.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTri3.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/cohesivedyn.py
Log:
Updated FaultCohesiveDyn unit tests to use sensitivity solve

Modified: short/3D/PyLith/trunk/playpen/friction/twotri3/shear-stick.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/friction/twotri3/shear-stick.cfg	2010-03-31 22:55:15 UTC (rev 16480)
+++ short/3D/PyLith/trunk/playpen/friction/twotri3/shear-stick.cfg	2010-04-01 17:59:12 UTC (rev 16481)
@@ -35,7 +35,7 @@
 # The settings below control the mesh generation (importing mesh info).
 # Turn on debugging output for mesh generation.
 [pylithapp.mesh_generator]
-debug = 0
+debug = 1
 
 # This component specification means we are using PyLith ASCII format,
 # and we then specify the filename and number of space dimensions for

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveDyn.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveDyn.cc	2010-03-31 22:55:15 UTC (rev 16480)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveDyn.cc	2010-04-01 17:59:12 UTC (rev 16481)
@@ -357,15 +357,15 @@
       for (int i = 0; i < fiberDimE; ++i) {
         const int index = iVertex * spaceDim + i;
         const double valE = valsE[index];
-#if 0 // DEBUGGING
+#if 1 // DEBUGGING
 	std::cout << "valE: " << valE
 		  << ", val: " << vals[i]
 		  << std::endl;
 #endif // DEBUGGING
-        if (fabs(valE) > tolerance)
-          CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valE, tolerance);
+	if (fabs(valE) > tolerance)
+	  CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valE, tolerance);
         else
-          CPPUNIT_ASSERT_DOUBLES_EQUAL(valE, vals[i], tolerance);
+	  CPPUNIT_ASSERT_DOUBLES_EQUAL(valE, vals[i], tolerance);
       } // for
     } // for
   } // Check solution values
@@ -408,15 +408,15 @@
       for (int i = 0; i < fiberDimE; ++i) {
         const int index = iVertex * spaceDim + i;
         const double valE = valsE[index];
-#if 0 // DEBUGGING
+#if 1 // DEBUGGING
 	std::cout << "valE: " << valE
 		  << ", val: " << vals[i]
 		  << std::endl;
 #endif // DEBUGGING
         if (fabs(valE) > tolerance)
-          CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valE, tolerance);
+	  CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valE, tolerance);
         else
-          CPPUNIT_ASSERT_DOUBLES_EQUAL(valE, vals[i], tolerance);
+	  CPPUNIT_ASSERT_DOUBLES_EQUAL(valE, vals[i], tolerance);
       } // for
     } // for
   } // Check slip values
@@ -480,15 +480,15 @@
       for (int i = 0; i < fiberDimE; ++i) {
         const int index = iVertex * spaceDim + i;
         const double valE = valsE[index];
-#if 0 // DEBUGGING
+#if 1 // DEBUGGING
 	std::cout << "valE: " << valE
 		  << ", val: " << vals[i]
 		  << std::endl;
 #endif // DEBUGGING
         if (fabs(valE) > tolerance)
-          CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valE, tolerance);
+	  CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valE, tolerance);
         else
-          CPPUNIT_ASSERT_DOUBLES_EQUAL(valE, vals[i], tolerance);
+	  CPPUNIT_ASSERT_DOUBLES_EQUAL(valE, vals[i], tolerance);
       } // for
     } // for
   } // Check solution values
@@ -531,15 +531,15 @@
       for (int i = 0; i < fiberDimE; ++i) {
         const int index = iVertex * spaceDim + i;
         const double valE = valsE[index];
-#if 0 // DEBUGGING
+#if 1 // DEBUGGING
 	std::cout << "valE: " << valE
 		  << ", val: " << vals[i]
 		  << std::endl;
 #endif // DEBUGGING
         if (fabs(valE) > tolerance)
-          CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valE, tolerance);
+	  CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valE, tolerance);
         else
-          CPPUNIT_ASSERT_DOUBLES_EQUAL(valE, vals[i], tolerance);
+	  CPPUNIT_ASSERT_DOUBLES_EQUAL(valE, vals[i], tolerance);
       } // for
     } // for
   } // Check slip values

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataHex8.cc	2010-03-31 22:55:15 UTC (rev 16480)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataHex8.cc	2010-04-01 17:59:12 UTC (rev 16481)
@@ -1410,33 +1410,33 @@
 
 // Output
 const double pylith::faults::CohesiveDynDataHex8::_fieldIncrSlipE[] = {
-  5.1, 7.1, 9.1,
-  5.2, 7.2, 9.2,
-  5.3, 7.3, 9.3,
-  5.4, 7.4, 9.4,
-  5.5, 7.5, 9.5, // 6
-  5.6, 7.6, 9.6, // 7
-  5.7, 7.7, 9.7, // 8
-  5.8, 7.8, 9.8, // 9
-  5.9, 7.9, 9.9,
-  5.0, 7.0, 9.0,
-  6.1, 8.1, 10.1,
-  6.2, 8.2, 10.2,
-  6.3, 8.3, 10.3, // 14
-  6.5, 8.5, 10.5, // 15
-  6.7, 8.7, 10.7, // 16
-  6.9, 8.9, 10.9, // 17
-  -5.82426407, -7.82426407,  -10.4, // 18
-  -6.02426407, -8.02426407,  -10.6, // 19
-  -6.22426407, -8.22426407,  -10.8, // 20
-  -5.42426407, -7.42426407,  -10.0, // 21
+  5.100000000000000,   7.100000000000000,   9.100000000000000,
+  5.200000000000000,   7.200000000000000,  9.199999999999999,
+  5.300000000000000,   7.300000000000000,   9.300000000000001,
+  5.400000000000000,   7.400000000000000,   9.400000000000000,
+  5.497852353458395,   7.498145012421456,   9.500000000000000,
+  5.598633150735187,   7.598835934591629,   9.600000000000000,
+  5.699186008483079,   7.699335886446804,   9.699999999999999,
+  5.799600882460798,   7.799716783656151,   9.800000000000001,
+  5.900000000000000,   7.900000000000000,   9.900000000000000,
+  5.000000000000000,   7.000000000000000,   9.000000000000000,
+  6.100000000000000,   8.100000000000000,  10.100000000000000,
+  6.200000000000000,   8.199999999999999,  10.199999999999999,
+  6.302147646541605,   8.301854987578544,  10.300000000000001,
+  6.501366849264812,   8.501164065408370,  10.500000000000000,
+  6.700813991516921,   8.700664113553195,  10.699999999999999,
+  6.900399117539203,   8.900283216343849,  10.900000000000000,
+  -5.824264070000000,  -7.824264070000000, -10.400000000000000,
+  -6.024264069999999, -8.024264069999999, -10.600000000000000,
+  -6.224264070000000,  -8.224264070000000, -10.800000000000001,
+  -5.424264070000000,  -7.424264070000000, -10.000000000000000,
 };
 
 const double pylith::faults::CohesiveDynDataHex8::_slipSlipE[] = {
-  -1.15147186,  -1.15147186,  0.0,
-  -1.15147186,  -1.15147186,  0.0,
-  -1.15147186,  -1.15147186,  0.0,
-  -1.15147186,  -1.15147186,  0.0,
+  0.004295383083209,   0.003709975157088,                   0.0,
+  0.002733698529624,   0.002328130816740,                   0.0,
+  0.001627983033842,   0.001328227106392,                   0.0,
+  0.000798235078404,   0.000566432687698,                   0.0,
 };
 
 // ----------------------------------------------------------------------
@@ -1468,33 +1468,34 @@
 
 // Output
 const double pylith::faults::CohesiveDynDataHex8::_fieldIncrOpenE[] = {
-  5.1, 7.1, 9.1,
-  5.2, 7.2, 9.2,
-  5.3, 7.3, 9.3,
-  5.4, 7.4, 9.4,
-  5.5, 7.5, 9.5, // 6
-  5.6, 7.6, 9.6, // 7
-  5.7, 7.7, 9.7, // 8
-  5.8, 7.8, 9.8, // 9
-  5.9, 7.9, 9.9,
-  5.0, 7.0, 9.0,
-  6.1, 8.1, 10.1,
-  6.2, 8.2, 10.2,
-  6.3, 8.3, 10.3, // 14
-  6.5, 8.5, 10.5, // 15
-  6.7, 8.7, 10.7, // 16
-  6.9, 8.9, 10.9, // 17
-  -5.4, -7.4, -9.4, // 18
-  -5.6, -7.6, -9.6, // 19
-  -5.8, -7.8, -9.8, // 20
-  -5.0, -7.0, -9.0, // 21
+  5.100000000000000,   7.100000000000000,   9.100000000000000,
+  5.200000000000000,   7.200000000000000,   9.199999999999999,
+  5.300000000000000,   7.300000000000000,   9.300000000000001,
+  5.400000000000000,   7.400000000000000,   9.400000000000000,
+  5.479235316138440,   7.506377670059572,   9.560964099926785,
+  5.566675616466609,   7.590571311651349,   9.633724303282460,
+  5.657842717320326,   7.679191979989885,   9.715001379770163,
+  5.739890640676003,   7.759602313469650,   9.789443715897779,
+  5.900000000000000,   7.900000000000000,   9.900000000000000,
+  5.000000000000000,   7.000000000000000,   9.000000000000000,
+  6.100000000000000,   8.100000000000000,  10.100000000000000,
+  6.200000000000000,   8.199999999999999,  10.199999999999999,
+  6.320764683861560,   8.293622329940428,  10.239035900073215,
+  6.533324383533390,   8.509428688348651,  10.466275696717540,
+  6.742157282679674,   8.720808020010114,  10.684998620229836,
+  6.960109359323997,   8.940397686530350,  10.910556284102222,
+  -5.400000000000000,  -7.400000000000000,  -9.400000000000000,
+  -5.600000000000000, -7.600000000000000,  -9.600000000000000,
+  -5.800000000000000,  -7.800000000000001,  -9.800000000000001,
+  -5.000000000000000,  -7.000000000000000,  -9.000000000000000,
+
 };
 
 const double pylith::faults::CohesiveDynDataHex8::_slipOpenE[] = {
-  23.6, 31.6, 39.6,
-  24.4, 32.4, 40.4,
-  25.2, 33.2, 41.2,
-  22.0, 30.0, 38.0,
+  0.041529467723119,  -0.012755340119145,  -0.121928199853569,
+  0.066648767066781,   0.018857376697302,  -0.067448606564919,
+  0.084314565359348,   0.041616040020231,  -0.030002759540328,
+  0.120218718647994,   0.080795373060699,   0.021112568204443,
 };
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataQuad4.cc	2010-03-31 22:55:15 UTC (rev 16480)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataQuad4.cc	2010-04-01 17:59:12 UTC (rev 16481)
@@ -367,22 +367,22 @@
 // Output
 // :TODO: Update Lagrange multiplier values
 const double pylith::faults::CohesiveDynDataQuad4::_fieldIncrSlipE[] = {
-  9.1, 10.1,
-  9.2, 10.2,
-  9.3, 10.3, // 4
-  9.4, 10.4, // 5
-  9.5, 10.5,
-  9.6, 10.6,
-  9.7, 10.7, // 8
-  9.9, 10.9, // 9
-  -9.4, -10.8, // 10
-  -8.6, -10.0, // 11
+  9.100000000000000,  10.100000000000000,
+  9.199999999999999,  10.199999999999999,
+  9.286920998131288,  10.300000000000001,
+  9.394134746089865,  10.400000000000000,
+  9.500000000000000,  10.500000000000000,
+  9.600000000000000,  10.600000000000000,
+  9.713079001868712,  10.699999999999999,
+  9.905865253910136,  10.900000000000000,
+  -9.400000000000000, -10.800000000000001,
+  -8.600000000000000, -10.000000000000000,
 };
 
 // :TODO: Update slip values based on changes in Lagrange multiplier values
 const double pylith::faults::CohesiveDynDataQuad4::_slipSlipE[] = {
-  -0.8, 0.0,
-  -0.8, 0.0,
+  0.026158003737426,                   0.0,
+  0.011730507820273,                   0.0,
 };
 
 // ----------------------------------------------------------------------
@@ -404,21 +404,21 @@
 
 // Output
 const double pylith::faults::CohesiveDynDataQuad4::_fieldIncrOpenE[] = {
-  9.1, 10.1,
-  9.2, 10.2,
-  9.3, 10.3, // 4
-  9.4, 10.4, // 5
-  9.5, 10.5,
-  9.6, 10.6,
-  9.7, 10.7, // 8
-  9.9, 10.9, // 9
-  -8.8, -9.8, // 10
-  -8.0, -9.0, // 11
+  9.100000000000000,  10.100000000000000,
+  9.199999999999999,  10.199999999999999,
+  8.914952803328358,  10.355407708860280,
+  8.623050724474377,   9.867290667695217,
+  9.500000000000000,  10.500000000000000,
+  9.600000000000000,  10.600000000000000,
+  10.085047196671642,  10.644592291139720,
+  10.676949275525624, 11.432709332304784,
+  -8.800000000000001,  -9.800000000000001,
+  -8.000000000000000, -9.000000000000000,
 };
 
 const double pylith::faults::CohesiveDynDataQuad4::_slipOpenE[] = {
-  37.2, 41.2,
-  34.0, 38.0,
+  0.770094393343286,  -0.110815417720561,
+  1.553898551051246,   1.065418664609568,
 };
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTet4.cc	2010-03-31 22:55:15 UTC (rev 16480)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTet4.cc	2010-04-01 17:59:12 UTC (rev 16481)
@@ -523,23 +523,23 @@
 
 // Output
 const double pylith::faults::CohesiveDynDataTet4::_fieldIncrSlipE[] = {
-  8.1, 9.1, 10.1,
-  8.2, 9.2, 10.2, // 3
-  8.3, 9.3, 10.3, // 4
-  8.4, 9.4, 10.4, // 5
-  8.5, 9.5, 10.5,
-  8.6, 9.6, 10.6, // 7
-  8.8, 9.8, 10.8, // 8
-  8.0, 9.0, 10.0, // 9
-  -7.30077769, -8.25209204, -10.7, // 10
-  -7.50020141, -8.45260634, -10.9, // 11
-  -6.70268132, -7.65040255, -10.1, // 12
+  8.100000000000000,   9.100000000000000,  10.100000000000000,
+  8.590767858737991,   9.537826325154031,  10.199999999999999,
+  8.409667711148931,   9.412740703018827,  10.300000000000001,
+  8.346270406998247,   9.362969249432572,  10.400000000000000,
+  8.500000000000000,   9.500000000000000,  10.500000000000000,
+  8.209232141262008,   9.262173674845968,  10.600000000000000,
+  8.690332288851071,   9.687259296981175,  10.800000000000001,
+  8.053729593001753,   9.037030750567428,  10.000000000000000,
+  -7.300777690000000,  -8.252092040000001, -10.699999999999999,
+  -7.500201410000001, -8.452606340000001, -10.900000000000000,
+  -6.702681320000000,  -7.650402550000001, -10.100000000000000,
 };
 
 const double pylith::faults::CohesiveDynDataTet4::_slipSlipE[] = {
-  32.00155537,  35.90418407,  0.0,
-  32.80040282,  36.70521268,  0.0,
-  29.60536264,  33.5008051,  0.0,
+  -0.781536717475984,  -0.675652650308064,                   0.0,
+  -0.219335422297859,  -0.225481406037653,                   0.0,
+  0.107459186003505,   0.074061501134857,                    0.0,
 };
 
 // ----------------------------------------------------------------------
@@ -562,23 +562,23 @@
 
 // Output
 const double pylith::faults::CohesiveDynDataTet4::_fieldIncrOpenE[] = {
-  8.1, 9.1, 10.1,
-  8.2, 9.2, 10.2, // 3
-  8.3, 9.3, 10.3, // 4
-  8.4, 9.4, 10.4, // 5
-  8.5, 9.5, 10.5,
-  8.6, 9.6, 10.6, // 7
-  8.8, 9.8, 10.8, // 8
-  8.0, 9.0, 10.0, // 9
-  -7.7, -8.7, -9.7, // 10
-  -7.9, -8.9, -9.9, // 11
-  -7.1, -8.1, -9.1, // 12
+  8.100000000000000,   9.100000000000000,  10.100000000000000,
+  8.264502727037895,   9.220523127395790,  10.740925816025284,
+  8.100953712938333,   9.107420233949158,  10.308031118959990,
+  8.043696538468437,   9.062440616276596,  10.173176622877268,
+  8.500000000000000,   9.500000000000000,  10.500000000000000,
+  8.535497272962104,   9.579476872604209,  10.059074183974715,
+  8.999046287061669,   9.992579766050843,  10.791968881040011,
+  8.356303461531564,   9.337559383723404,  10.226823377122733,
+  -7.699999999999999,  -8.699999999999999,  -9.699999999999999,
+  -7.900000000000000,  -8.900000000000000,  -9.900000000000000,
+  -7.100000000000000,  -8.100000000000000,  -9.100000000000000,
 };
 
 const double pylith::faults::CohesiveDynDataTet4::_slipOpenE[] = {
-  32.8, 36.8, 40.8,
-  33.6, 37.6, 41.6,
-  30.4, 34.4, 38.4,
+  -0.129005554075791,  -0.041046254791581,  -1.081851632050568,
+  0.398092574123335,  0.385159532101686, -0.016062237919978,
+  0.712606923063127,   0.675118767446806,   0.453646754245465,
 };
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTri3.cc	2010-03-31 22:55:15 UTC (rev 16480)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTri3.cc	2010-04-01 17:59:12 UTC (rev 16481)
@@ -292,19 +292,19 @@
 
 // Output
 const double pylith::faults::CohesiveDynDataTri3::_fieldIncrSlipE[] = {
-  9.1, 10.1,
-  9.2, 10.2, // 3
-  9.3, 10.3, // 4
-  9.4, 10.4,
-  9.5, 10.5, // 6
-  9.7, 10.7, // 7
-  -8.6+1.0*0.6, -10.6, // 8
-  -8.8+1.0*0.6, -10.8, // 9
+  9.100000000000000,  10.100000000000000,
+  10.095813434316561,  10.199999999999999,
+  9.533356619439068,  10.300000000000001,
+  9.400000000000000,  10.400000000000000,
+  8.604186565683438,  10.500000000000000,
+  9.466643380560932,  10.699999999999999,
+  -8.000000000000002, -10.600000000000000,
+  -8.199999999999999, -10.800000000000001,
 };
 
 const double pylith::faults::CohesiveDynDataTri3::_slipSlipE[] = {
-  35.2, 0.0,
-  36.0, 0.0,
+  -1.791626868633122,                   0.0,
+  -0.466713238878134,                   0.0,
 };
 
 // ----------------------------------------------------------------------
@@ -324,19 +324,19 @@
 
 // Output
 const double pylith::faults::CohesiveDynDataTri3::_fieldIncrOpenE[] = {
-  9.1, 10.1,
-  9.2, 10.2, // 3
-  9.3, 10.3, // 4
-  9.4, 10.4,
-  9.5, 10.5, // 6
-  9.7, 10.7, // 7
-  -8.6, -9.6, // 8
-  -8.8, -9.8, // 9
+  9.100000000000000,  10.100000000000000,
+  8.548311056150768,  10.583675543292014,
+  8.112550361510577,   9.408791154844559,
+  9.400000000000000,  10.400000000000000,
+  10.151688943849232,  10.116324456707986,
+  10.887449638489423, 11.591208845155441,
+  -8.600000000000000,  -9.600000000000000,
+  -8.800000000000001,  -9.800000000000001,
 };
 
 const double pylith::faults::CohesiveDynDataTri3::_slipOpenE[] = {
-  36.4, 40.4,
-  37.2, 41.2,
+  1.303377887698464,   -0.767351086584028,
+  2.374899276978848,  1.782417690310881,
 };
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/cohesivedyn.py
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/cohesivedyn.py	2010-03-31 22:55:15 UTC (rev 16480)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/cohesivedyn.py	2010-04-01 17:59:12 UTC (rev 16481)
@@ -1,4 +1,4 @@
-cell = "hex8"
+cell = "tet4"
 dim = "3d"
 
 import numpy



More information about the CIG-COMMITS mailing list