From 88ba38203ed34ebb6695ef628d8181974aed9ca8 Mon Sep 17 00:00:00 2001
From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de>
Date: Wed, 2 Aug 2017 16:45:27 +0200
Subject: [PATCH] Remove DOF comparison

We never really used or trusted it.
---
 python/dune/perftool/options.py               |  1 -
 .../dune/perftool/pdelab/driver/__init__.py   |  4 +---
 python/dune/perftool/pdelab/driver/error.py   | 19 -------------------
 3 files changed, 1 insertion(+), 23 deletions(-)

diff --git a/python/dune/perftool/options.py b/python/dune/perftool/options.py
index d3d361c8..49e6941a 100644
--- a/python/dune/perftool/options.py
+++ b/python/dune/perftool/options.py
@@ -40,7 +40,6 @@ class PerftoolOptionsArray(ImmutableRecord):
     matrix_free = PerftoolOption(default=False, helpstr="Use iterative solver with matrix free jacobian application")
     explicit_time_stepping = PerftoolOption(default=False, helpstr="use explicit time stepping")
     exact_solution_expression = PerftoolOption(helpstr="name of the exact solution expression in the ufl file")
-    compare_dofs = PerftoolOption(helpstr="maximal allowed maximum error of difference between degrees of freedom vectors of numerical solution and interpolation of exact solution (NOTE: requires --exact-solution-expression)")
     compare_l2errorsquared = PerftoolOption(helpstr="maximal allowed l2 error squared of difference between numerical solution and interpolation of exact solution (NOTE: requires --exact-solution-expression)")
     interactive = PerftoolOption(default=False, helpstr="whether the optimization process should be guided interactively (also useful for debugging)")
     print_transformations = PerftoolOption(default=False, helpstr="print out dot files after ufl tree transformations")
diff --git a/python/dune/perftool/pdelab/driver/__init__.py b/python/dune/perftool/pdelab/driver/__init__.py
index 0dc09f00..13fbcf65 100644
--- a/python/dune/perftool/pdelab/driver/__init__.py
+++ b/python/dune/perftool/pdelab/driver/__init__.py
@@ -267,9 +267,7 @@ def generate_driver(formdatas, data):
         from dune.perftool.pdelab.driver.instationary import solve_instationary
         solve_instationary()
 
-    from dune.perftool.pdelab.driver.error import compare_dofs, compare_L2_squared
-    if get_option("compare_dofs"):
-        compare_dofs()
+    from dune.perftool.pdelab.driver.error import compare_L2_squared
     if get_option("compare_l2errorsquared"):
         compare_L2_squared()
 
diff --git a/python/dune/perftool/pdelab/driver/error.py b/python/dune/perftool/pdelab/driver/error.py
index b204af8b..d3ca5cbe 100644
--- a/python/dune/perftool/pdelab/driver/error.py
+++ b/python/dune/perftool/pdelab/driver/error.py
@@ -38,25 +38,6 @@ def name_exact_solution_gridfunction():
     return name_boundary_function(element, func)
 
 
-@preamble
-def compare_dofs():
-    v = name_vector(get_formdata())
-    solution = name_exact_solution()
-    fail = name_test_fail_variable()
-
-    return ["",
-            "// Maximum norm of difference between dof vectors of the",
-            "// numerical solution and the interpolation of the exact solution",
-            "using Dune::PDELab::Backend::native;",
-            "double maxerror(0.0);",
-            "for (std::size_t i=0; i<native({}).size(); ++i)".format(v),
-            "  if (std::abs(native({})[i]-native({})[i]) > maxerror)".format(v, solution),
-            "    maxerror = std::abs(native({})[i]-native({})[i]);".format(v, solution),
-            "std::cout << std::endl << \"Maxerror: \" << maxerror << std::endl;",
-            "if (maxerror>{})".format(get_option("compare_dofs")),
-            "  {} = true;".format(fail)]
-
-
 def type_discrete_grid_function(gfs):
     return "{}_DGF".format(gfs.upper())
 
-- 
GitLab