diff --git a/python/dune/perftool/sumfact/tabulation.py b/python/dune/perftool/sumfact/tabulation.py index 5309fa832c7b805d4dc7e3d31213a2a70c0c2087..99107c9cd8f6a4429965985fb8fbbdcbd3e898e9 100644 --- a/python/dune/perftool/sumfact/tabulation.py +++ b/python/dune/perftool/sumfact/tabulation.py @@ -402,9 +402,7 @@ def define_theta(name, tabmat, additional_indices=(), width=None): bound = tabmat.quadrature_size if tabmat.slice_size is not None: bound *= tabmat.slice_size - qp = name_oned_quadrature_points(bound) - qw = name_oned_quadrature_weights(bound) - sort_quadrature_points_weights(qp, qw, bound) + degree = tabmat.basis_size - 1 polynomials = name_polynomials(degree) @@ -433,9 +431,15 @@ def define_theta(name, tabmat, additional_indices=(), width=None): if tabmat.slice_size is not None: inames[0] = tabmat.slice_size * inames[0] + tabmat.slice_index - args = [inames[1], prim.Subscript(prim.Variable(qp), (inames[0],))] - if tabmat.face is not None: - args[1] = tabmat.face + args = [inames[1]] + + if tabmat.face is None: + qp = name_oned_quadrature_points(bound) + qw = name_oned_quadrature_weights(bound) + sort_quadrature_points_weights(qp, qw, bound) + args.append(prim.Subscript(prim.Variable(qp), (inames[0],))) + else: + args.append(tabmat.face) instruction(assignee=prim.Subscript(prim.Variable(name), (i, j) + additional_indices), expression=prim.Call(PolynomialLookup(polynomials, tabmat.derivative), tuple(args)),