From 566b983019bdaaffbd90be3906c4b88e598b2e3c Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Sat, 29 Jan 2022 10:45:41 +0100 Subject: [PATCH] Make sure tests do not depend on SIMD: disable linear polynomial --- .../matrix_free/tensor_product_evaluate_05.cc | 8 +++-- .../tensor_product_evaluate_05.output | 31 ------------------- .../matrix_free/tensor_product_evaluate_06.cc | 8 +++-- .../tensor_product_evaluate_06.output | 31 ------------------- 4 files changed, 10 insertions(+), 68 deletions(-) diff --git a/tests/matrix_free/tensor_product_evaluate_05.cc b/tests/matrix_free/tensor_product_evaluate_05.cc index 745013c9a5..d3efbfb790 100644 --- a/tests/matrix_free/tensor_product_evaluate_05.cc +++ b/tests/matrix_free/tensor_product_evaluate_05.cc @@ -93,10 +93,12 @@ main() initlog(); deallog << std::setprecision(9); - for (unsigned int degree = 1; degree < 5; ++degree) + // We need at least degree 2 to correctly represent the Hessian of a + // quadratic function + for (unsigned int degree = 2; degree < 5; ++degree) test<1>(degree); - for (unsigned int degree = 1; degree < 5; ++degree) + for (unsigned int degree = 2; degree < 5; ++degree) test<2>(degree); - for (unsigned int degree = 1; degree < 5; ++degree) + for (unsigned int degree = 2; degree < 5; ++degree) test<3>(degree); } diff --git a/tests/matrix_free/tensor_product_evaluate_05.output b/tests/matrix_free/tensor_product_evaluate_05.output index 731cec2af8..ea4d8c9ef6 100644 --- a/tests/matrix_free/tensor_product_evaluate_05.output +++ b/tests/matrix_free/tensor_product_evaluate_05.output @@ -1,9 +1,4 @@ -DEAL::Evaluate in 1d with polynomial degree 1 -DEAL::Hessian error 8.80000000 -DEAL::Hessian error 8.80000000 -DEAL::Hessian error 8.80000000 -DEAL::Hessian error 8.80000000 DEAL::Evaluate in 1d with polynomial degree 2 DEAL::Hessian error 0.00000000 DEAL::Hessian error 0.00000000 @@ -19,23 +14,6 @@ DEAL::Hessian error 1.99840144e-14 DEAL::Hessian error 3.55271368e-15 DEAL::Hessian error 7.10542736e-15 DEAL::Hessian error 2.70894418e-14 -DEAL::Evaluate in 2d with polynomial degree 1 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 DEAL::Evaluate in 2d with polynomial degree 2 DEAL::Hessian error 4.88498131e-15 DEAL::Hessian error 5.77315973e-15 @@ -87,15 +65,6 @@ DEAL::Hessian error 3.14415161e-13 DEAL::Hessian error 2.36477504e-13 DEAL::Hessian error 2.56905608e-13 DEAL::Hessian error 1.26387789e-12 -DEAL::Evaluate in 3d with polynomial degree 1 -DEAL::Hessian error 33.6000000 -DEAL::Hessian error 33.6000000 -DEAL::Hessian error 33.6000000 -DEAL::Hessian error 33.6000000 -DEAL::Hessian error 33.6000000 -DEAL::Hessian error 33.6000000 -DEAL::Hessian error 33.6000000 -DEAL::Hessian error 33.6000000 DEAL::Evaluate in 3d with polynomial degree 2 DEAL::Hessian error 4.84057239e-14 DEAL::Hessian error 3.81916720e-14 diff --git a/tests/matrix_free/tensor_product_evaluate_06.cc b/tests/matrix_free/tensor_product_evaluate_06.cc index 883736fe75..a2172935c8 100644 --- a/tests/matrix_free/tensor_product_evaluate_06.cc +++ b/tests/matrix_free/tensor_product_evaluate_06.cc @@ -90,10 +90,12 @@ main() initlog(); deallog << std::setprecision(9); - for (unsigned int degree = 1; degree < 5; ++degree) + // We need at least degree 2 to correctly represent the Hessian of a + // quadratic function + for (unsigned int degree = 2; degree < 5; ++degree) test<1>(degree); - for (unsigned int degree = 1; degree < 5; ++degree) + for (unsigned int degree = 2; degree < 5; ++degree) test<2>(degree); - for (unsigned int degree = 1; degree < 5; ++degree) + for (unsigned int degree = 2; degree < 5; ++degree) test<3>(degree); } diff --git a/tests/matrix_free/tensor_product_evaluate_06.output b/tests/matrix_free/tensor_product_evaluate_06.output index 731cec2af8..ea4d8c9ef6 100644 --- a/tests/matrix_free/tensor_product_evaluate_06.output +++ b/tests/matrix_free/tensor_product_evaluate_06.output @@ -1,9 +1,4 @@ -DEAL::Evaluate in 1d with polynomial degree 1 -DEAL::Hessian error 8.80000000 -DEAL::Hessian error 8.80000000 -DEAL::Hessian error 8.80000000 -DEAL::Hessian error 8.80000000 DEAL::Evaluate in 1d with polynomial degree 2 DEAL::Hessian error 0.00000000 DEAL::Hessian error 0.00000000 @@ -19,23 +14,6 @@ DEAL::Hessian error 1.99840144e-14 DEAL::Hessian error 3.55271368e-15 DEAL::Hessian error 7.10542736e-15 DEAL::Hessian error 2.70894418e-14 -DEAL::Evaluate in 2d with polynomial degree 1 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 -DEAL::Hessian error 20.0000000 DEAL::Evaluate in 2d with polynomial degree 2 DEAL::Hessian error 4.88498131e-15 DEAL::Hessian error 5.77315973e-15 @@ -87,15 +65,6 @@ DEAL::Hessian error 3.14415161e-13 DEAL::Hessian error 2.36477504e-13 DEAL::Hessian error 2.56905608e-13 DEAL::Hessian error 1.26387789e-12 -DEAL::Evaluate in 3d with polynomial degree 1 -DEAL::Hessian error 33.6000000 -DEAL::Hessian error 33.6000000 -DEAL::Hessian error 33.6000000 -DEAL::Hessian error 33.6000000 -DEAL::Hessian error 33.6000000 -DEAL::Hessian error 33.6000000 -DEAL::Hessian error 33.6000000 -DEAL::Hessian error 33.6000000 DEAL::Evaluate in 3d with polynomial degree 2 DEAL::Hessian error 4.84057239e-14 DEAL::Hessian error 3.81916720e-14 -- 2.39.5