From 2a9828b15b1cc427ded7b3eda29cf3ff6f780cf3 Mon Sep 17 00:00:00 2001
From: Rene Milk <rene.milk@wwu.de>
Date: Fri, 22 Jul 2016 13:54:15 +0200
Subject: [PATCH] [test.projection] adjust tolerances for ALU

---
 dune/gdt/test/operators__weighted_l2__localizable_product.cc | 4 ++--
 dune/gdt/test/projections__l2__cg_fem.cc                     | 5 ++++-
 dune/gdt/test/projections__l2__cg_pdelab.cc                  | 5 ++++-
 dune/gdt/test/projections__l2_global__cg_fem.cc              | 5 ++++-
 dune/gdt/test/projections__l2_global__cg_pdelab.cc           | 4 ++--
 dune/gdt/test/projections__l2_global_localizable__cg_fem.cc  | 4 ++--
 .../test/projections__l2_global_localizable__cg_pdelab.cc    | 4 ++--
 dune/gdt/test/projections__l2_local_localizable__dg_fem.cc   | 4 ++--
 .../gdt/test/projections__l2_local_localizable__dg_pdelab.cc | 2 +-
 dune/gdt/test/projections__l2_localizable__cg_fem.cc         | 5 +++--
 dune/gdt/test/projections__l2_localizable__cg_pdelab.cc      | 4 ++--
 dune/gdt/test/projections__l2_localizable__dg_fem.cc         | 2 +-
 dune/gdt/test/projections__l2_localizable__dg_pdelab.cc      | 4 ++--
 dune/gdt/test/projections__lagrange_localizable__cg_fem.cc   | 2 +-
 14 files changed, 32 insertions(+), 22 deletions(-)

diff --git a/dune/gdt/test/operators__weighted_l2__localizable_product.cc b/dune/gdt/test/operators__weighted_l2__localizable_product.cc
index 3b004d42a..64e6587ca 100644
--- a/dune/gdt/test/operators__weighted_l2__localizable_product.cc
+++ b/dune/gdt/test/operators__weighted_l2__localizable_product.cc
@@ -34,9 +34,9 @@ TYPED_TEST(WeightedL2LocalizableProductTest, correct_for_constant_arguments)
 }
 TYPED_TEST(WeightedL2LocalizableProductTest, correct_for_linear_arguments)
 {
-  this->correct_for_linear_arguments(this->dimDomain == 3 ? 5.33e-15 : 1.78e-15);
+  this->correct_for_linear_arguments(this->dimDomain == 3 ? 5.33e-15 : 3.57e-15);
 }
 TYPED_TEST(WeightedL2LocalizableProductTest, correct_for_quadratic_arguments)
 {
-  this->correct_for_quadratic_arguments(1.78e-15);
+  this->correct_for_quadratic_arguments(3.57e-15);
 }
diff --git a/dune/gdt/test/projections__l2__cg_fem.cc b/dune/gdt/test/projections__l2__cg_fem.cc
index c38fe386c..1053f567b 100644
--- a/dune/gdt/test/projections__l2__cg_fem.cc
+++ b/dune/gdt/test/projections__l2__cg_fem.cc
@@ -38,7 +38,10 @@ TYPED_TEST(L2ProjectionOperatorTest, free_function_callable)
 }
 TYPED_TEST(L2ProjectionOperatorTest, produces_correct_results)
 {
-  this->produces_correct_results();
+  typedef typename TypeParam::GridViewType::Grid Grid;
+  const auto tolerance = Dune::Stuff::Grid::is_alugrid<Grid>::value ? L2ProjectionLocalizableOperator_alugrid_tolerance
+                                                                    : LocalizableProjectionOperator_default_tolerance;
+  this->produces_correct_results(tolerance);
 }
 
 
diff --git a/dune/gdt/test/projections__l2__cg_pdelab.cc b/dune/gdt/test/projections__l2__cg_pdelab.cc
index babe6e493..85e09f40b 100644
--- a/dune/gdt/test/projections__l2__cg_pdelab.cc
+++ b/dune/gdt/test/projections__l2__cg_pdelab.cc
@@ -38,7 +38,10 @@ TYPED_TEST(L2ProjectionOperatorTest, free_function_callable)
 }
 TYPED_TEST(L2ProjectionOperatorTest, produces_correct_results)
 {
-  this->produces_correct_results();
+  typedef typename TypeParam::GridViewType::Grid Grid;
+  const auto tolerance = Dune::Stuff::Grid::is_alugrid<Grid>::value ? L2ProjectionLocalizableOperator_alugrid_tolerance
+                                                                    : LocalizableProjectionOperator_default_tolerance;
+  this->produces_correct_results(tolerance);
 }
 
 
diff --git a/dune/gdt/test/projections__l2_global__cg_fem.cc b/dune/gdt/test/projections__l2_global__cg_fem.cc
index 356813aa1..8d7fa7452 100644
--- a/dune/gdt/test/projections__l2_global__cg_fem.cc
+++ b/dune/gdt/test/projections__l2_global__cg_fem.cc
@@ -34,7 +34,10 @@ TYPED_TEST(L2GlobalProjectionOperatorTest, constructible_by_factory)
 }
 TYPED_TEST(L2GlobalProjectionOperatorTest, produces_correct_results)
 {
-  this->produces_correct_results();
+  typedef typename TypeParam::GridViewType::Grid Grid;
+  const auto tolerance = Dune::Stuff::Grid::is_alugrid<Grid>::value ? L2ProjectionLocalizableOperator_alugrid_tolerance
+                                                                    : LocalizableProjectionOperator_default_tolerance;
+  this->produces_correct_results(tolerance);
 }
 
 
diff --git a/dune/gdt/test/projections__l2_global__cg_pdelab.cc b/dune/gdt/test/projections__l2_global__cg_pdelab.cc
index 8bb7a7397..c251ff30e 100644
--- a/dune/gdt/test/projections__l2_global__cg_pdelab.cc
+++ b/dune/gdt/test/projections__l2_global__cg_pdelab.cc
@@ -34,8 +34,8 @@ TYPED_TEST(L2GlobalProjectionOperatorTest, constructible_by_factory)
 TYPED_TEST(L2GlobalProjectionOperatorTest, produces_correct_results)
 {
   typedef typename TypeParam::GridViewType::Grid Grid;
-  const auto tolerance =
-      Dune::Stuff::Grid::is_alugrid<Grid>::value ? 3.8e-11 : LocalizableProjectionOperator_default_tolerance;
+  const auto tolerance = Dune::Stuff::Grid::is_alugrid<Grid>::value ? LocalizableProjectionOperator_alugrid_tolerance
+                                                                    : LocalizableProjectionOperator_default_tolerance;
   this->produces_correct_results(tolerance);
 }
 
diff --git a/dune/gdt/test/projections__l2_global_localizable__cg_fem.cc b/dune/gdt/test/projections__l2_global_localizable__cg_fem.cc
index 56460f3cd..f068ccb80 100644
--- a/dune/gdt/test/projections__l2_global_localizable__cg_fem.cc
+++ b/dune/gdt/test/projections__l2_global_localizable__cg_fem.cc
@@ -35,8 +35,8 @@ TYPED_TEST(L2GlobalProjectionLocalizableOperatorTest, constructible_by_factory)
 TYPED_TEST(L2GlobalProjectionLocalizableOperatorTest, produces_correct_results)
 {
   typedef typename TypeParam::GridViewType::Grid Grid;
-  const auto tolerance =
-      Dune::Stuff::Grid::is_alugrid<Grid>::value ? 3.8e-11 : LocalizableProjectionOperator_default_tolerance;
+  const auto tolerance = Dune::Stuff::Grid::is_alugrid<Grid>::value ? LocalizableProjectionOperator_alugrid_tolerance
+                                                                    : LocalizableProjectionOperator_default_tolerance;
   this->produces_correct_results(tolerance);
 }
 
diff --git a/dune/gdt/test/projections__l2_global_localizable__cg_pdelab.cc b/dune/gdt/test/projections__l2_global_localizable__cg_pdelab.cc
index f40b5115d..0666ce744 100644
--- a/dune/gdt/test/projections__l2_global_localizable__cg_pdelab.cc
+++ b/dune/gdt/test/projections__l2_global_localizable__cg_pdelab.cc
@@ -35,8 +35,8 @@ TYPED_TEST(L2GlobalProjectionLocalizableOperatorTest, constructible_by_factory)
 TYPED_TEST(L2GlobalProjectionLocalizableOperatorTest, produces_correct_results)
 {
   typedef typename TypeParam::GridViewType::Grid Grid;
-  const auto tolerance =
-      Dune::Stuff::Grid::is_alugrid<Grid>::value ? 3.8e-11 : LocalizableProjectionOperator_default_tolerance;
+  const auto tolerance = Dune::Stuff::Grid::is_alugrid<Grid>::value ? LocalizableProjectionOperator_alugrid_tolerance
+                                                                    : LocalizableProjectionOperator_default_tolerance;
   this->produces_correct_results(tolerance);
 }
 
diff --git a/dune/gdt/test/projections__l2_local_localizable__dg_fem.cc b/dune/gdt/test/projections__l2_local_localizable__dg_fem.cc
index d8d5ec7dc..c0d482ec3 100644
--- a/dune/gdt/test/projections__l2_local_localizable__dg_fem.cc
+++ b/dune/gdt/test/projections__l2_local_localizable__dg_fem.cc
@@ -35,8 +35,8 @@ TYPED_TEST(L2LocalProjectionLocalizableOperatorTest, constructible_by_factory)
 TYPED_TEST(L2LocalProjectionLocalizableOperatorTest, produces_correct_results)
 {
   typedef typename TypeParam::GridViewType::Grid Grid;
-  const auto tolerance =
-      Dune::Stuff::Grid::is_alugrid<Grid>::value ? 3.8e-11 : LocalizableProjectionOperator_default_tolerance;
+  const auto tolerance = Dune::Stuff::Grid::is_alugrid<Grid>::value ? LocalizableProjectionOperator_alugrid_tolerance
+                                                                    : LocalizableProjectionOperator_default_tolerance;
   this->produces_correct_results(tolerance);
 }
 
diff --git a/dune/gdt/test/projections__l2_local_localizable__dg_pdelab.cc b/dune/gdt/test/projections__l2_local_localizable__dg_pdelab.cc
index 02a349e78..3ee21ace1 100644
--- a/dune/gdt/test/projections__l2_local_localizable__dg_pdelab.cc
+++ b/dune/gdt/test/projections__l2_local_localizable__dg_pdelab.cc
@@ -34,7 +34,7 @@ TYPED_TEST(L2LocalProjectionLocalizableOperatorTest, constructible_by_factory)
 }
 TYPED_TEST(L2LocalProjectionLocalizableOperatorTest, produces_correct_results)
 {
-  this->produces_correct_results();
+  this->produces_correct_results(LocalizableProjectionOperator_default_tolerance);
 }
 
 
diff --git a/dune/gdt/test/projections__l2_localizable__cg_fem.cc b/dune/gdt/test/projections__l2_localizable__cg_fem.cc
index 3d0022497..7d5ef7552 100644
--- a/dune/gdt/test/projections__l2_localizable__cg_fem.cc
+++ b/dune/gdt/test/projections__l2_localizable__cg_fem.cc
@@ -35,8 +35,9 @@ TYPED_TEST(L2ProjectionLocalizableOperatorTest, constructible_by_factory)
 TYPED_TEST(L2ProjectionLocalizableOperatorTest, produces_correct_results)
 {
   typedef typename TypeParam::GridViewType::Grid Grid;
-  const auto tolerance =
-      Dune::Stuff::Grid::is_alugrid<Grid>::value ? 1e-11 : LocalizableProjectionOperator_default_tolerance;
+  const auto tolerance = Dune::Stuff::Grid::is_alugrid<Grid>::value ? L2ProjectionLocalizableOperator_alugrid_tolerance
+                                                                    : LocalizableProjectionOperator_default_tolerance;
+
   this->produces_correct_results(tolerance);
 }
 
diff --git a/dune/gdt/test/projections__l2_localizable__cg_pdelab.cc b/dune/gdt/test/projections__l2_localizable__cg_pdelab.cc
index 7d40e3bc4..787ebe8a3 100644
--- a/dune/gdt/test/projections__l2_localizable__cg_pdelab.cc
+++ b/dune/gdt/test/projections__l2_localizable__cg_pdelab.cc
@@ -35,8 +35,8 @@ TYPED_TEST(L2ProjectionLocalizableOperatorTest, constructible_by_factory)
 TYPED_TEST(L2ProjectionLocalizableOperatorTest, produces_correct_results)
 {
   typedef typename TypeParam::GridViewType::Grid Grid;
-  const auto tolerance =
-      Dune::Stuff::Grid::is_alugrid<Grid>::value ? 3.8e-11 : LocalizableProjectionOperator_default_tolerance;
+  const auto tolerance = Dune::Stuff::Grid::is_alugrid<Grid>::value ? LocalizableProjectionOperator_alugrid_tolerance
+                                                                    : LocalizableProjectionOperator_default_tolerance;
   this->produces_correct_results(tolerance);
 }
 
diff --git a/dune/gdt/test/projections__l2_localizable__dg_fem.cc b/dune/gdt/test/projections__l2_localizable__dg_fem.cc
index 940939937..8008e61fd 100644
--- a/dune/gdt/test/projections__l2_localizable__dg_fem.cc
+++ b/dune/gdt/test/projections__l2_localizable__dg_fem.cc
@@ -34,7 +34,7 @@ TYPED_TEST(L2ProjectionLocalizableOperatorTest, constructible_by_factory)
 }
 TYPED_TEST(L2ProjectionLocalizableOperatorTest, produces_correct_results)
 {
-  this->produces_correct_results();
+  this->produces_correct_results(LocalizableProjectionOperator_default_tolerance);
 }
 
 
diff --git a/dune/gdt/test/projections__l2_localizable__dg_pdelab.cc b/dune/gdt/test/projections__l2_localizable__dg_pdelab.cc
index 7646dade7..20460b5a3 100644
--- a/dune/gdt/test/projections__l2_localizable__dg_pdelab.cc
+++ b/dune/gdt/test/projections__l2_localizable__dg_pdelab.cc
@@ -35,8 +35,8 @@ TYPED_TEST(L2ProjectionLocalizableOperatorTest, constructible_by_factory)
 TYPED_TEST(L2ProjectionLocalizableOperatorTest, produces_correct_results)
 {
   typedef typename TypeParam::GridViewType::Grid Grid;
-  const auto tolerance =
-      Dune::Stuff::Grid::is_alugrid<Grid>::value ? 3.8e-11 : LocalizableProjectionOperator_default_tolerance;
+  const auto tolerance = Dune::Stuff::Grid::is_alugrid<Grid>::value ? LocalizableProjectionOperator_alugrid_tolerance
+                                                                    : LocalizableProjectionOperator_default_tolerance;
   this->produces_correct_results(tolerance);
 }
 
diff --git a/dune/gdt/test/projections__lagrange_localizable__cg_fem.cc b/dune/gdt/test/projections__lagrange_localizable__cg_fem.cc
index a7be9c417..2df0a883e 100644
--- a/dune/gdt/test/projections__lagrange_localizable__cg_fem.cc
+++ b/dune/gdt/test/projections__lagrange_localizable__cg_fem.cc
@@ -34,7 +34,7 @@ TYPED_TEST(LagrangeProjectionLocalizableOperatorTest, constructible_by_factory)
 }
 TYPED_TEST(LagrangeProjectionLocalizableOperatorTest, produces_correct_results)
 {
-  this->produces_correct_results();
+  this->produces_correct_results(LocalizableProjectionOperator_default_tolerance);
 }
 
 
-- 
GitLab