Skip to content
Snippets Groups Projects
Commit e8fc58f3 authored by Matteo Cicuttin's avatar Matteo Cicuttin
Browse files

trivial fixes in tests.

parent 6ac047bc
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment