diff --git a/python/dune/perftool/options.py b/python/dune/perftool/options.py index d3d361c843338415b176591ccf6450133788364b..49e6941a443493ac7d82294bc461a2a79b5c6c1d 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 0dc09f00446b2aa1a4226226841a31b1a1ae11fa..13fbcf658c988d10f9eab1a9629b1b716f67e792 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 b204af8bab8ad34ec8f010986d6a75847901bf39..d3ca5cbe7dd27153b4aedd30d56792a514c4c0b8 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())