From b284ef8cc513dae0aa22558d6d79259b3d7b01f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ren=C3=A9=20He=C3=9F?= <rene.hess@iwr.uni-heidelberg.de>
Date: Tue, 19 Jun 2018 15:20:44 +0200
Subject: [PATCH] Rename pymbolic_quadrature_position in sumfact path

Rename the function and remove the backend switch. Reasoning:

- This function was only called once without the backend switching
  mechanism.
- The function takes different arguments than the pdelab
  pymbolic_quadrature_position.
- It returns only one component of the quadrature point.
---
 python/dune/perftool/sumfact/__init__.py   | 1 -
 python/dune/perftool/sumfact/geometry.py   | 4 ++--
 python/dune/perftool/sumfact/quadrature.py | 3 +--
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/python/dune/perftool/sumfact/__init__.py b/python/dune/perftool/sumfact/__init__.py
index fa28b0f4..33d3e2d6 100644
--- a/python/dune/perftool/sumfact/__init__.py
+++ b/python/dune/perftool/sumfact/__init__.py
@@ -5,7 +5,6 @@ from dune.perftool.pdelab.argument import (name_applycontainer,
                                            )
 from dune.perftool.sumfact.quadrature import (quadrature_inames,
                                               quadrature_weight,
-                                              pymbolic_quadrature_position,
                                               )
 
 from dune.perftool.sumfact.basis import (lfs_inames,
diff --git a/python/dune/perftool/sumfact/geometry.py b/python/dune/perftool/sumfact/geometry.py
index 1da61dc9..0f0f25e8 100644
--- a/python/dune/perftool/sumfact/geometry.py
+++ b/python/dune/perftool/sumfact/geometry.py
@@ -173,8 +173,8 @@ def pymbolic_spatial_coordinate_axiparallel(do_predicates, visitor):
         iindex = index
         if face is not None and index > face:
             iindex = iindex - 1
-        from dune.perftool.sumfact.quadrature import pymbolic_quadrature_position
-        x = pymbolic_quadrature_position(iindex, visitor)
+        from dune.perftool.sumfact.quadrature import pymbolic_indexed_quadrature_position
+        x = pymbolic_indexed_quadrature_position(iindex, visitor)
 
     visitor.indices = None
     return prim.Subscript(prim.Variable(lowcorner), (index,)) + x * prim.Subscript(prim.Variable(meshwidth), (index,))
diff --git a/python/dune/perftool/sumfact/quadrature.py b/python/dune/perftool/sumfact/quadrature.py
index cfd7fbb5..5b73c8fd 100644
--- a/python/dune/perftool/sumfact/quadrature.py
+++ b/python/dune/perftool/sumfact/quadrature.py
@@ -192,8 +192,7 @@ def define_quadrature_position(name, index):
                 )
 
 
-@backend(interface="quad_pos", name="sumfact")
-def pymbolic_quadrature_position(index, visitor):
+def pymbolic_indexed_quadrature_position(index, visitor):
     # Return the non-precomputed version
     if not get_form_option("precompute_quadrature_info"):
         name = 'pos'
-- 
GitLab