diff --git a/tests/test_basics.cpp b/tests/test_basics.cpp index 96a5423b5c69e2ce3c7290f404839d8b9236f2b5..192298effddb08848e69c3da7220d9e7cf92adc2 100644 --- a/tests/test_basics.cpp +++ b/tests/test_basics.cpp @@ -104,10 +104,12 @@ test_basics(int geometric_order, int approximation_order) { double dj = js[i].determinant(); double dg = dets[i]; - auto relerr = dj/dg - 1; + auto err = dj - dg; - if ( std::abs(relerr) < 3e-14 ) + if ( std::abs(err) > 3e-16 ) { + std::cout << std::abs(err) << std::endl; throw std::logic_error("Something went wrong with determinants"); + } vol_e0_j += dj*rqps[i].weight(); } @@ -125,10 +127,12 @@ test_basics(int geometric_order, int approximation_order) { double dj = js[i].determinant(); double dg = dets[i]; - auto relerr = dj/dg - 1; + auto err = dj - dg ; - if ( std::abs(relerr) < 3e-14 ) + if ( std::abs(err) > 3e-16 ) { + std::cout << std::abs(err) << std::endl; throw std::logic_error("Something went wrong with determinants"); + } vol_e1_j += dj*rqps[i].weight(); } @@ -302,16 +306,16 @@ int main(void) int failed_tests = 0; -/* + std::cout << Bmagentafg << " *** TESTING: BASIC OPERATIONS ***" << reset << std::endl; - for (size_t go = 1; go < 5; go++) + for (size_t go = 1; go < 3; go++) { - for (size_t ao = go; ao < 5; ao++) + for (size_t ao = go; ao < 3; ao++) { failed_tests += test_basics(go, ao); } } -*/ + //std::cout << Bmagentafg << " *** TESTING: NORMAL COMPUTATION ***" << reset << std::endl; //for (size_t i = 1; i < 5; i++) // test_normals(i,i); diff --git a/tests/test_curl.cpp b/tests/test_curl.cpp index 757ae5e22ee2ed98f6dc25a2ae6d84d858d03aeb..558bd6de6f735b489c8b4d59c082421db698ff73 100644 --- a/tests/test_curl.cpp +++ b/tests/test_curl.cpp @@ -243,8 +243,8 @@ int main(void) int failed_tests = 0; std::cout << Bmagentafg << " *** TESTING: CURL ***" << reset << std::endl; - for (size_t go = 1; go < 2; go++) - for (size_t ao = go; ao < 6; ao++) + for (size_t go = 1; go < 3; go++) + for (size_t ao = go; ao < 3; ao++) failed_tests += test_curl_convergence(go, ao); return failed_tests;