Skip to content
Snippets Groups Projects
Commit 25315096 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Fix the ini tree constructor parameter to the local operator

parent 1ca8a8f5
No related branches found
No related tags found
No related merge requests found
...@@ -7,13 +7,19 @@ from dune.perftool.cgen.clazz import BaseClass, ClassMember ...@@ -7,13 +7,19 @@ from dune.perftool.cgen.clazz import BaseClass, ClassMember
from pytools import memoize from pytools import memoize
@symbol
def name_initree_constructor_param():
return "iniParams"
@class_member("operator") @class_member("operator")
def define_initree(name): def define_initree(name):
param_name = name_initree_constructor_param()
include_file('dune/common/parametertree.hh', filetag="operatorfile") include_file('dune/common/parametertree.hh', filetag="operatorfile")
constructor_parameter("const Dune::ParameterTree&", "iniParams", classtag="operator", constructortag="iniconstructor") constructor_parameter("const Dune::ParameterTree&", param_name, classtag="operator", constructortag="iniconstructor")
initializer_list("_iniParams", ["iniParams"], classtag="operator") initializer_list(name, [param_name], classtag="operator")
return ("const Dune::ParameterTree&", "_iniParams") return ("const Dune::ParameterTree&", name)
@symbol @symbol
...@@ -42,8 +48,9 @@ def measure_specific_details(measure): ...@@ -42,8 +48,9 @@ def measure_specific_details(measure):
# Add the initializer list for that base class # Add the initializer list for that base class
ini = name_initree_member() ini = name_initree_member()
ini_constructor = name_initree_constructor_param()
initializer_list("Dune::PDELab::NumericalJacobian{}<{}>".format(which, loptype), 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") classtag="operator")
if measure == "cell": if measure == "cell":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment