diff --git a/python/dune/perftool/pdelab/localoperator.py b/python/dune/perftool/pdelab/localoperator.py index 3dc64c1a9802ef23d431f63e14e8dd4362de8543..e11f3e636e7e3951622a987f886fbb0417dc0078 100644 --- a/python/dune/perftool/pdelab/localoperator.py +++ b/python/dune/perftool/pdelab/localoperator.py @@ -7,13 +7,19 @@ from dune.perftool.cgen.clazz import BaseClass, ClassMember from pytools import memoize +@symbol +def name_initree_constructor_param(): + return "iniParams" + + @class_member("operator") def define_initree(name): + param_name = name_initree_constructor_param() include_file('dune/common/parametertree.hh', filetag="operatorfile") - constructor_parameter("const Dune::ParameterTree&", "iniParams", classtag="operator", constructortag="iniconstructor") - initializer_list("_iniParams", ["iniParams"], classtag="operator") + constructor_parameter("const Dune::ParameterTree&", param_name, classtag="operator", constructortag="iniconstructor") + initializer_list(name, [param_name], classtag="operator") - return ("const Dune::ParameterTree&", "_iniParams") + return ("const Dune::ParameterTree&", name) @symbol @@ -42,8 +48,9 @@ def measure_specific_details(measure): # Add the initializer list for that base class ini = name_initree_member() + ini_constructor = name_initree_constructor_param() initializer_list("Dune::PDELab::NumericalJacobian{}<{}>".format(which, loptype), - ["{}.get(\"numerical_epsilon.{}\", 1e-9)".format(ini, which.lower())], + ["{}.get<double>(\"numerical_epsilon.{}\", 1e-9)".format(ini_constructor, ini, which.lower())], classtag="operator") if measure == "cell":