From 96a5b5faa0e80eff2deaf6fd70af856c69284c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Del=20Pino?= <stephane.delpino44@gmail.com> Date: Mon, 8 Jul 2024 17:09:12 +0200 Subject: [PATCH] Reduce few tests tolerances benefiting of preconditioning --- tests/test_PolynomialReconstruction.cpp | 40 ++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/test_PolynomialReconstruction.cpp b/tests/test_PolynomialReconstruction.cpp index ada21453a..2f25f0168 100644 --- a/tests/test_PolynomialReconstruction.cpp +++ b/tests/test_PolynomialReconstruction.cpp @@ -153,7 +153,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") max_mean_error = std::max(max_mean_error, frobeniusNorm(dpk_Ah[cell_id](xj[cell_id]) - R3x3_affine(xj[cell_id]))); } - REQUIRE(parallel::allReduceMax(max_mean_error) == Catch::Approx(0).margin(1E-13)); + REQUIRE(parallel::allReduceMax(max_mean_error) == Catch::Approx(0).margin(1E-14)); } { @@ -212,7 +212,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") max_mean_error = std::max(max_mean_error, std::abs(dpk_Vh(cell_id, i)(xj[cell_id]) - vector[i])); } } - REQUIRE(parallel::allReduceMax(max_mean_error) == Catch::Approx(0).margin(1E-13)); + REQUIRE(parallel::allReduceMax(max_mean_error) == Catch::Approx(0).margin(1E-14)); } { @@ -227,7 +227,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") max_slope_error = std::max(max_slope_error, std::abs(reconstructed_slope - slope[i])); } } - REQUIRE(parallel::allReduceMax(max_slope_error) == Catch::Approx(0).margin(1E-13)); + REQUIRE(parallel::allReduceMax(max_slope_error) == Catch::Approx(0).margin(1E-14)); } } } @@ -344,7 +344,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") max_mean_error = std::max(max_mean_error, frobeniusNorm(dpk_Ah[cell_id](xj[cell_id]) - R3x3_affine(xj[cell_id]))); } - REQUIRE(parallel::allReduceMax(max_mean_error) == Catch::Approx(0).margin(1E-13)); + REQUIRE(parallel::allReduceMax(max_mean_error) == Catch::Approx(0).margin(1E-14)); } { @@ -373,7 +373,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") max_mean_error = std::max(max_mean_error, std::abs(dpk_Vh(cell_id, i)(xj[cell_id]) - vector[i])); } } - REQUIRE(parallel::allReduceMax(max_mean_error) == Catch::Approx(0).margin(1E-13)); + REQUIRE(parallel::allReduceMax(max_mean_error) == Catch::Approx(0).margin(1E-14)); } { @@ -388,7 +388,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") max_slope_error = std::max(max_slope_error, std::abs(reconstructed_slope - slope[i])); } } - REQUIRE(parallel::allReduceMax(max_slope_error) == Catch::Approx(0).margin(1E-13)); + REQUIRE(parallel::allReduceMax(max_slope_error) == Catch::Approx(0).margin(1E-14)); } } } @@ -544,7 +544,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") max_mean_error = std::max(max_mean_error, frobeniusNorm(dpk_Ah[cell_id](xj[cell_id]) - R2x2_affine(xj[cell_id]))); } - REQUIRE(parallel::allReduceMax(max_mean_error) == Catch::Approx(0).margin(1E-13)); + REQUIRE(parallel::allReduceMax(max_mean_error) == Catch::Approx(0).margin(1E-14)); } { @@ -557,7 +557,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") std::max(max_x_slope_error, frobeniusNorm(reconstructed_slope - R2x2{+1.7, +2.1, // -0.6, -2.3})); } - REQUIRE(parallel::allReduceMax(max_x_slope_error) == Catch::Approx(0).margin(1E-12)); + REQUIRE(parallel::allReduceMax(max_x_slope_error) == Catch::Approx(0).margin(1E-13)); } { @@ -570,7 +570,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") std::max(max_y_slope_error, frobeniusNorm(reconstructed_slope - R2x2{+1.2, -2.2, // -2.1, +1.3})); } - REQUIRE(parallel::allReduceMax(max_y_slope_error) == Catch::Approx(0).margin(1E-12)); + REQUIRE(parallel::allReduceMax(max_y_slope_error) == Catch::Approx(0).margin(1E-13)); } } } @@ -614,7 +614,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") max_mean_error = std::max(max_mean_error, std::abs(dpk_Vh(cell_id, i)(xj[cell_id]) - vector[i])); } } - REQUIRE(parallel::allReduceMax(max_mean_error) == Catch::Approx(0).margin(1E-13)); + REQUIRE(parallel::allReduceMax(max_mean_error) == Catch::Approx(0).margin(1E-14)); } { @@ -628,7 +628,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") max_x_slope_error = std::max(max_x_slope_error, std::abs(reconstructed_slope - slope[i])); } } - REQUIRE(parallel::allReduceMax(max_x_slope_error) == Catch::Approx(0).margin(1E-12)); + REQUIRE(parallel::allReduceMax(max_x_slope_error) == Catch::Approx(0).margin(1E-14)); } { @@ -642,7 +642,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") max_y_slope_error = std::max(max_y_slope_error, std::abs(reconstructed_slope - slope[i])); } } - REQUIRE(parallel::allReduceMax(max_y_slope_error) == Catch::Approx(0).margin(1E-12)); + REQUIRE(parallel::allReduceMax(max_y_slope_error) == Catch::Approx(0).margin(1E-14)); } } } @@ -819,7 +819,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") max_mean_error = std::max(max_mean_error, frobeniusNorm(dpk_Ah[cell_id](xj[cell_id]) - R2x2_affine(xj[cell_id]))); } - REQUIRE(parallel::allReduceMax(max_mean_error) == Catch::Approx(0).margin(1E-13)); + REQUIRE(parallel::allReduceMax(max_mean_error) == Catch::Approx(0).margin(1E-14)); } { @@ -831,7 +831,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") max_x_slope_error = std::max(max_x_slope_error, frobeniusNorm(reconstructed_slope - R2x2{+1.7, 2.1, // -2.3, +3.1})); } - REQUIRE(parallel::allReduceMax(max_x_slope_error) == Catch::Approx(0).margin(1E-12)); + REQUIRE(parallel::allReduceMax(max_x_slope_error) == Catch::Approx(0).margin(1E-13)); } { @@ -844,7 +844,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") std::max(max_y_slope_error, frobeniusNorm(reconstructed_slope - R2x2{+1.2, -2.2, // 1.3, +0.8})); } - REQUIRE(parallel::allReduceMax(max_y_slope_error) == Catch::Approx(0).margin(1E-12)); + REQUIRE(parallel::allReduceMax(max_y_slope_error) == Catch::Approx(0).margin(1E-13)); } { @@ -857,7 +857,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") std::max(max_z_slope_error, frobeniusNorm(reconstructed_slope - R2x2{-1.3, -2.4, // +1.4, -1.8})); } - REQUIRE(parallel::allReduceMax(max_z_slope_error) == Catch::Approx(0).margin(1E-12)); + REQUIRE(parallel::allReduceMax(max_z_slope_error) == Catch::Approx(0).margin(1E-13)); } } } @@ -902,7 +902,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") max_mean_error = std::max(max_mean_error, std::abs(dpk_Vh(cell_id, i)(xj[cell_id]) - vector[i])); } } - REQUIRE(parallel::allReduceMax(max_mean_error) == Catch::Approx(0).margin(1E-13)); + REQUIRE(parallel::allReduceMax(max_mean_error) == Catch::Approx(0).margin(1E-14)); } { @@ -916,7 +916,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") max_x_slope_error = std::max(max_x_slope_error, std::abs(reconstructed_slope - slope[i])); } } - REQUIRE(parallel::allReduceMax(max_x_slope_error) == Catch::Approx(0).margin(1E-12)); + REQUIRE(parallel::allReduceMax(max_x_slope_error) == Catch::Approx(0).margin(1E-13)); } { @@ -930,7 +930,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") max_y_slope_error = std::max(max_y_slope_error, std::abs(reconstructed_slope - slope[i])); } } - REQUIRE(parallel::allReduceMax(max_y_slope_error) == Catch::Approx(0).margin(1E-12)); + REQUIRE(parallel::allReduceMax(max_y_slope_error) == Catch::Approx(0).margin(1E-13)); } { @@ -944,7 +944,7 @@ TEST_CASE("PolynomialReconstruction", "[scheme]") max_z_slope_error = std::max(max_z_slope_error, std::abs(reconstructed_slope - slope[i])); } } - REQUIRE(parallel::allReduceMax(max_z_slope_error) == Catch::Approx(0).margin(1E-12)); + REQUIRE(parallel::allReduceMax(max_z_slope_error) == Catch::Approx(0).margin(1E-13)); } } } -- GitLab