Commit 9591d3fb authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Merge branch '4-glls-fails' into 'master'

Remove radixglls tests of interim results

Closes #4

See merge request !4
parents 683d61af 7829b873
Pipeline #7848 passed with stages
in 19 minutes and 31 seconds
......@@ -219,45 +219,12 @@ TEST (GLLSSolver, Problem2)
glls_model.apply_econ(a, b, acheck, bcheck, yi, vti, vtn);
ASSERT_EQ (acheck.nrows(), 4);
ASSERT_EQ (acheck.ncols(), 3);
EXPECT_NEAR (acheck[0][0], 25.705591972126072, 2.570559197212607e-06);
EXPECT_NEAR (acheck[0][1], 0.5135577355601272, 5.135577355601271e-08);
EXPECT_NEAR (acheck[0][2], -0.5232356459731659, 5.232356459731658e-08);
EXPECT_NEAR (acheck[1][0], 65677.80043778266, 0.006567780043778265);
EXPECT_NEAR (acheck[1][1], 2294.8534538505123, 0.0002294853453850512);
EXPECT_NEAR (acheck[1][2], -2565.633032993495, 0.00025656330329934947);
EXPECT_NEAR (acheck[2][0], 2850.6519015642234, 0.00028506519015642233);
EXPECT_NEAR (acheck[2][1], -24439.097477358217, 0.0024439097477358214);
EXPECT_NEAR (acheck[2][2], 23748.340986059404, 0.0023748340986059404);
EXPECT_NEAR (acheck[3][0], 9000.211886775229, 0.0009000211886775228);
EXPECT_NEAR (acheck[3][1], -99767.85690977951, 0.00997678569097795);
EXPECT_NEAR (acheck[3][2], 96863.97125993339, 0.009686397125993338);
ASSERT_EQ (bcheck.size(), 4);
EXPECT_NEAR (bcheck[0], 319.26910240003156, 3.1926910240003155e-05);
EXPECT_NEAR (bcheck[1], 818259.2824659096, 0.08182592824659096);
EXPECT_NEAR (bcheck[2], 18090.302093222737, 0.0018090302093222736);
EXPECT_NEAR (bcheck[3], 41248.69650465691, 0.004124869650465691);
ASSERT_EQ (yi.size(), 1);
EXPECT_NEAR (fabs(yi[0]), 0.7071067811865475, 7.071067811865474e-08);
ASSERT_EQ (vti.nrows(), 1);
ASSERT_EQ (vti.ncols(), 4);
EXPECT_NEAR (vti[0][0], 0.0, 0.0);
EXPECT_NEAR (vti[0][1], 0.0, 0.0);
EXPECT_NEAR (fabs(vti[0][2]), 0.7071067811865475, 7.071067811865474e-08);
EXPECT_NEAR (fabs(vti[0][3]), 0.7071067811865475, 7.071067811865474e-08);
ASSERT_EQ (vtn.nrows(), 3);
ASSERT_EQ (vtn.ncols(), 4);
EXPECT_NEAR (vtn[0][0], 0.0, 0.0);
EXPECT_NEAR (vtn[0][1], 1.0, 1e-07);
EXPECT_NEAR (vtn[0][2], 0.0, 0.0);
EXPECT_NEAR (vtn[0][3], 0.0, 0.0);
EXPECT_NEAR (vtn[1][0], -0.7071067811865475, 7.071067811865474e-08);
EXPECT_NEAR (vtn[1][1], 0.0, 0.0);
EXPECT_NEAR (vtn[1][2], 0.5000000000000001, 5.000000000000001e-08);
EXPECT_NEAR (vtn[1][3], -0.4999999999999999, 4.9999999999999985e-08);
EXPECT_NEAR (vtn[2][0], -0.7071067811865475, 7.071067811865474e-08);
EXPECT_NEAR (vtn[2][1], 0.0, 0.0);
EXPECT_NEAR (vtn[2][2], -0.4999999999999999, 4.9999999999999985e-08);
EXPECT_NEAR (vtn[2][3], 0.5000000000000001, 5.000000000000001e-08);
//
// the system helper
GllsMatrix lhs;
......@@ -265,19 +232,7 @@ TEST (GLLSSolver, Problem2)
glls_model.system(acheck, bcheck, lhs, rhs);
ASSERT_EQ (lhs.nrows(), 3);
ASSERT_EQ (lhs.ncols(), 3);
EXPECT_NEAR (lhs[0][0], 158596424.37685227, 15.859642437685226);
EXPECT_NEAR (lhs[0][1], 5200484.089224444, 0.5200484089224443);
EXPECT_NEAR (lhs[0][2], -5775439.003354293, 0.5775439003354293);
EXPECT_NEAR (lhs[1][0], 5200484.089224444, 0.5200484089224443);
EXPECT_NEAR (lhs[1][1], 417805.66391019546, 0.04178056639101954);
EXPECT_NEAR (lhs[1][2], -430762.33716496115, 0.04307623371649611);
EXPECT_NEAR (lhs[2][0], -5775439.003354292, 0.5775439003354292);
EXPECT_NEAR (lhs[2][1], -430762.33716496115, 0.04307623371649611);
EXPECT_NEAR (lhs[2][2], 446258.9709613549, 0.044625897096135486);
ASSERT_EQ (rhs.size(), 3);
EXPECT_NEAR (rhs[0], 1975069947.543801, 197.5069947543801);
EXPECT_NEAR (rhs[1], 64946693.95477287, 6.4946693954772865);
EXPECT_NEAR (rhs[2], -72104600.96840864, 7.2104600968408645);
//
// the integral solve function
GllsResult glls_result = glls_model.solve();
......@@ -556,45 +511,12 @@ TEST (GLLSSolver, Problem4)
glls_model.apply_econ(a, b, acheck, bcheck, yi, vti, vtn);
ASSERT_EQ (acheck.nrows(), 4);
ASSERT_EQ (acheck.ncols(), 3);
EXPECT_NEAR (acheck[0][0], -0.6273898705007706, 6.273898705007705e-08);
EXPECT_NEAR (acheck[0][1], -0.5600070844046032, 5.600070844046032e-08);
EXPECT_NEAR (acheck[0][2], -0.5862028000487609, 5.8620280004876086e-08);
EXPECT_NEAR (acheck[1][0], -2815.858056193987, 0.0002815858056193987);
EXPECT_NEAR (acheck[1][1], -2526.0209411453934, 0.00025260209411453934);
EXPECT_NEAR (acheck[1][2], -2631.113523042207, 0.0002631113523042207);
EXPECT_NEAR (acheck[2][0], 32533.281751472936, 0.0032533281751472936);
EXPECT_NEAR (acheck[2][1], -311.7022081622499, 3.1170220816224993e-05);
EXPECT_NEAR (acheck[2][2], -215.14251764753135, 2.1514251764753133e-05);
EXPECT_NEAR (acheck[3][0], 134170.23431989586, 0.013417023431989585);
EXPECT_NEAR (acheck[3][1], -15025.322605249363, 0.0015025322605249363);
EXPECT_NEAR (acheck[3][2], -7214.152203546604, 0.0007214152203546604);
ASSERT_EQ (bcheck.size(), 4);
EXPECT_NEAR (bcheck[0], -0.2609160046769739, 2.609160046769739e-08);
EXPECT_NEAR (bcheck[1], -1170.140432710783, 0.00011701404327107829);
EXPECT_NEAR (bcheck[2], 19691.284645329582, 0.0019691284645329582);
EXPECT_NEAR (bcheck[3], 83024.96859017253, 0.008302496859017253);
ASSERT_EQ (yi.size(), 1);
EXPECT_NEAR (fabs(yi[0]), 0.5, 5e-08);
ASSERT_EQ (vti.nrows(), 1);
ASSERT_EQ (vti.ncols(), 4);
EXPECT_NEAR (fabs(vti[0][0]), 0.5, 5e-08);
EXPECT_NEAR (fabs(vti[0][1]), 0.5, 5e-08);
EXPECT_NEAR (fabs(vti[0][2]), 0.5, 5e-08);
EXPECT_NEAR (fabs(vti[0][3]), 0.5, 5e-08);
ASSERT_EQ (vtn.nrows(), 3);
ASSERT_EQ (vtn.ncols(), 4);
EXPECT_NEAR (vtn[0][0], -0.5, 5e-08);
EXPECT_NEAR (vtn[0][1], 0.8333333333333334, 8.333333333333334e-08);
EXPECT_NEAR (vtn[0][2], -0.16666666666666666, 1.6666666666666664e-08);
EXPECT_NEAR (vtn[0][3], -0.16666666666666666, 1.6666666666666664e-08);
EXPECT_NEAR (vtn[1][0], -0.5, 5e-08);
EXPECT_NEAR (vtn[1][1], -0.16666666666666666, 1.6666666666666664e-08);
EXPECT_NEAR (vtn[1][2], 0.8333333333333334, 8.333333333333334e-08);
EXPECT_NEAR (vtn[1][3], -0.16666666666666666, 1.6666666666666664e-08);
EXPECT_NEAR (vtn[2][0], -0.5, 5e-08);
EXPECT_NEAR (vtn[2][1], -0.16666666666666666, 1.6666666666666664e-08);
EXPECT_NEAR (vtn[2][2], -0.16666666666666666, 1.6666666666666664e-08);
EXPECT_NEAR (vtn[2][3], 0.8333333333333334, 8.333333333333334e-08);
//
// the system helper
GllsMatrix lhs;
......@@ -602,19 +524,7 @@ TEST (GLLSSolver, Problem4)
glls_model.system(acheck, bcheck, lhs, rhs);
ASSERT_EQ (lhs.nrows(), 3);
ASSERT_EQ (lhs.ncols(), 3);
EXPECT_NEAR (lhs[0][0], 210447753.51583984, 21.044775351583983);
EXPECT_NEAR (lhs[0][1], 186454341.46344712, 18.645434146344712);
EXPECT_NEAR (lhs[0][2], 194759824.38823426, 19.475982438823426);
EXPECT_NEAR (lhs[1][0], 186454341.46344706, 18.645434146344705);
EXPECT_NEAR (lhs[1][1], 166968395.17333433, 16.696839517333434);
EXPECT_NEAR (lhs[1][2], 174337726.80952343, 17.43377268095234);
EXPECT_NEAR (lhs[2][0], 194759824.38823426, 19.475982438823426);
EXPECT_NEAR (lhs[2][1], 174337726.80952343, 17.43377268095234);
EXPECT_NEAR (lhs[2][2], 182037465.503814, 18.2037465503814);
ASSERT_EQ (rhs.size(), 3);
EXPECT_NEAR (rhs[0], 87868304.14135939, 8.786830414135938);
EXPECT_NEAR (rhs[1], 77487080.40909456, 7.748708040909455);
EXPECT_NEAR (rhs[2], 80952322.00316277, 8.095232200316277);
//
// the integral solve function
GllsResult glls_result = glls_model.solve();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment