diff --git a/python/dune/perftool/pdelab/__init__.py b/python/dune/perftool/pdelab/__init__.py index f994193abd78e941bc6ebc8c4fdc9987573fc582..76aaff919dd3d63045f811ebe9896a5910b529d5 100644 --- a/python/dune/perftool/pdelab/__init__.py +++ b/python/dune/perftool/pdelab/__init__.py @@ -2,10 +2,10 @@ # Trigger some imports that are needed to have all backend implementations visible # to the selection mechanisms -from dune.perftool.pdelab.argument import (name_apply_function, - name_apply_function_gradient, - name_trialfunction, - name_trialfunction_gradient, +from dune.perftool.pdelab.argument import (pymbolic_apply_function, + pymbolic_apply_function_gradient, + pymbolic_trialfunction, + pymbolic_trialfunction_gradient, ) from dune.perftool.pdelab.basis import (name_basis, name_reference_gradient, @@ -57,17 +57,17 @@ class PDELabInterface(object): def name_reference_gradient(self, element, restriction): return name_reference_gradient(element, restriction) - def name_trialfunction_gradient(self, element, restriction, component): - return name_trialfunction_gradient(element, restriction, component) + def pymbolic_trialfunction_gradient(self, element, restriction, component): + return pymbolic_trialfunction_gradient(element, restriction, component) - def name_apply_function_gradient(self, element, restriction, component): - return name_apply_function_gradient(element, restriction, component) + def pymbolic_apply_function_gradient(self, element, restriction, component): + return pymbolic_apply_function_gradient(element, restriction, component) - def name_trialfunction(self, element, restriction, component): - return name_trialfunction(element, restriction, component) + def pymbolic_trialfunction(self, element, restriction, component): + return pymbolic_trialfunction(element, restriction, component) - def name_apply_function(self, element, restriction, component): - return name_apply_function(element, restriction, component) + def pymbolic_apply_function(self, element, restriction, component): + return pymbolic_apply_function(element, restriction, component) # # Parameter function related generator functions diff --git a/python/dune/perftool/pdelab/argument.py b/python/dune/perftool/pdelab/argument.py index b727f373abb9afc24328e4ab9ca48a8a20cdf385..afcb0e956c1597d526251dcf12efdc86def82d8f 100644 --- a/python/dune/perftool/pdelab/argument.py +++ b/python/dune/perftool/pdelab/argument.py @@ -9,7 +9,6 @@ from dune.perftool.options import get_option from dune.perftool.generation import (cached, domain, function_mangler, - get_backend, iname, globalarg, valuearg, @@ -91,36 +90,36 @@ def accumulation_mangler(target, func, dtypes): ) -def name_trialfunction_gradient(element, restriction, component): +def pymbolic_trialfunction_gradient(element, restriction, component): rawname = "gradu" + "_".join(str(c) for c in component) name = restricted_name(rawname, restriction) container = name_coefficientcontainer(restriction) evaluate_coefficient_gradient(element, name, container, restriction, component) - return name + return Variable(name) -def name_trialfunction(element, restriction, component): +def pymbolic_trialfunction(element, restriction, component): rawname = "u" + "_".join(str(c) for c in component) name = restricted_name(rawname, restriction) container = name_coefficientcontainer(restriction) - get_backend("eval_coefficient")(element, name, container, restriction, component) - return name + evaluate_coefficient(element, name, container, restriction, component) + return Variable(name) -def name_apply_function_gradient(element, restriction, component): +def pymbolic_apply_function_gradient(element, restriction, component): rawname = "gradz_func" + "_".join(str(c) for c in component) name = restricted_name(rawname, restriction) container = name_applycontainer(restriction) evaluate_coefficient_gradient(element, name, container, restriction, component) - return name + return Variable(name) -def name_apply_function(element, restriction, component): +def pymbolic_apply_function(element, restriction, component): rawname = "z_func" + "_".join(str(c) for c in component) name = restricted_name(rawname, restriction) container = name_applycontainer(restriction) - get_backend("eval_coefficient")(element, name, container, restriction, component) - return name + evaluate_coefficient(element, name, container, restriction, component) + return Variable(name) def name_coefficientcontainer(restriction): diff --git a/python/dune/perftool/ufl/visitor.py b/python/dune/perftool/ufl/visitor.py index 898a7b46d296b880ff48419660ab7a8bda071fb6..d87c5dcf57f395c6f6ef47359b44825557c776d8 100644 --- a/python/dune/perftool/ufl/visitor.py +++ b/python/dune/perftool/ufl/visitor.py @@ -110,14 +110,14 @@ class UFL2LoopyVisitor(ModifiedTerminalTracker): if self.reference_grad: if o.count() == 0: - return Variable(self.interface.name_trialfunction_gradient(o.ufl_element(), restriction, self.component)) + return self.interface.pymbolic_trialfunction_gradient(o.ufl_element(), restriction, self.component) else: - return Variable(self.interface.name_apply_function_gradient(o.ufl_element(), restriction, self.component)) + return self.interface.pymbolic_apply_function_gradient(o.ufl_element(), restriction, self.component) else: if o.count() == 0: - return Variable(self.interface.name_trialfunction(o.ufl_element(), restriction, self.component)) + return self.interface.pymbolic_trialfunction(o.ufl_element(), restriction, self.component) else: - return Variable(self.interface.name_apply_function(o.ufl_element(), restriction, self.component)) + return self.interface.pymbolic_apply_function(o.ufl_element(), restriction, self.component) # Check if this is a parameter function else: