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

brad at geodynamics.org brad at geodynamics.org
Thu May 10 09:18:47 PDT 2007


Author: brad
Date: 2007-05-10 09:18:47 -0700 (Thu, 10 May 2007)
New Revision: 6838

Modified:
   short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc
Log:
Fixed bug in orient3D.

Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc	2007-05-10 04:34:44 UTC (rev 6837)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesive.cc	2007-05-10 16:18:47 UTC (rev 6838)
@@ -127,12 +127,12 @@
   const int cellDim = 2;
   const int spaceDim = 3;
   for (int iLoc=0; iLoc < numLocs; ++iLoc) {
-    const double j00 = jacobian[iLoc*spaceDim  ];
-    const double j10 = jacobian[iLoc*spaceDim+1];
-    const double j20 = jacobian[iLoc*spaceDim+2];
-    const double j01 = jacobian[iLoc*spaceDim+3];
-    const double j11 = jacobian[iLoc*spaceDim+4];
-    const double j21 = jacobian[iLoc*spaceDim+5];
+    const double j00 = jacobian[iLoc*spaceDim*cellDim  ];
+    const double j10 = jacobian[iLoc*spaceDim*cellDim+1];
+    const double j20 = jacobian[iLoc*spaceDim*cellDim+2];
+    const double j01 = jacobian[iLoc*spaceDim*cellDim+3];
+    const double j11 = jacobian[iLoc*spaceDim*cellDim+4];
+    const double j21 = jacobian[iLoc*spaceDim*cellDim+5];
 
     // Compute normal using Jacobian
     double r0 =  j10*j21 - j20*j11;

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc	2007-05-10 04:34:44 UTC (rev 6837)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesive.cc	2007-05-10 16:18:47 UTC (rev 6838)
@@ -236,6 +236,7 @@
 
   const double jacobianVals[] = {
     2.0, 1.0, 0.5,   -0.5, -0.2, 2.0,
+    -1.0, -3.0, -0.3,   2.0, -0.2, 0.3,
   };
   double_array jacobian(jacobianVals, numLocs*spaceDim*(spaceDim-1));
   const double jacobianDetVals[] = {
@@ -250,10 +251,10 @@
     1.1654847299258313, -0.012145479112634533, 0.57575848378190342, 
     0.57588657243394026, 0.024580136299379406, -1.1652255028919474, 
     0.0, 1.2997108540889502, 0.027417070656281111,
-    
-    -0.063065020894967128, 0.68889496382717197, -0.10698846644884991, 
-    -0.6957991174916025, -0.0688894963827172, -0.033433895765265592, 
-    -0.043432605694620839, 0.10333424457407581, 0.69096717914882233
+
+    0.20879249519516274, 0.65951433797689429, -0.10698846644884991,
+    -0.66813598462452073, 0.20609823061777949, -0.033433895765265592,
+    0.0, 0.11209084413599232, 0.69096717914882233
   };
 
   FaultCohesive::_orient3D(&orientation, 



More information about the cig-commits mailing list