[cig-commits] r9034 - cs/benchmark/cigma/trunk/src/tests
luis at geodynamics.org
luis at geodynamics.org
Mon Jan 14 21:28:00 PST 2008
Author: luis
Date: 2008-01-14 21:28:00 -0800 (Mon, 14 Jan 2008)
New Revision: 9034
Modified:
cs/benchmark/cigma/trunk/src/tests/TestNumeric.cpp
Log:
Added test of inv3x3() to TestNumeric.cpp
Modified: cs/benchmark/cigma/trunk/src/tests/TestNumeric.cpp
===================================================================
--- cs/benchmark/cigma/trunk/src/tests/TestNumeric.cpp 2008-01-15 05:27:58 UTC (rev 9033)
+++ cs/benchmark/cigma/trunk/src/tests/TestNumeric.cpp 2008-01-15 05:28:00 UTC (rev 9034)
@@ -38,6 +38,30 @@
<< "(" << centroid[0] << ", " << centroid[1] << ", " << centroid[2] << ")"
<< std::endl;
+ double mat[3][3] = {
+ { 0.49387228, 0.38626503, 0.85391322},
+ { 0.76706402, 0.07299347, 0.79921455},
+ { 0.81741773, 0.67283022, 0.52285359}
+ };
+ double invmat[3][3] = {
+ {-2.077549 , 1.54943045, 1.02460651},
+ { 1.04894064, -1.82890268, 1.08248536},
+ { 1.89817274, -0.06883558, -1.08225401}
+ };
+ double inv[3][3];
+ inv3x3(mat, inv);
+ int i,j;
+ std::cout << "trueinv - inv = " << std::endl;
+ for (i = 0; i < 3; i++)
+ {
+ std::cout << " ";
+ for (j = 0; j < 3; j++)
+ {
+ double daij = invmat[i][j] - inv[i][j];
+ std::cerr << daij << " ";
+ }
+ std::cout << std::endl;
+ }
delete reader;
More information about the cig-commits
mailing list