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

Fix quadvec for sumfact poisson_dg numdiff

parent b58ad193
No related branches found
No related tags found
No related merge requests found
......@@ -138,6 +138,7 @@ def collect_vector_data_rotate(knl):
else:
raise NotImplementedError
elif quantity in knl.temporary_variables:
expr, = quantities[quantity]
if all(get_pymbolic_tag(expr) == 'vector' for expr in quantities[quantity]):
#
# There is a vector quantity to be vectorized! That requires register rotation!
......@@ -165,6 +166,7 @@ def collect_vector_data_rotate(knl):
)
else:
# Add a vector view to this quantity
expr, = quantities[quantity]
knl = add_vector_view(knl, quantity)
replacemap_vec[expr] = prim.Subscript(prim.Variable(get_vector_view_name(quantity)),
(prim.Variable("vec_index"), prim.Variable(new_iname)),
......
......@@ -12,7 +12,9 @@ from dune.perftool.generation import (backend,
temporary_variable,
valuearg,
)
from dune.perftool.options import option_switch
from dune.perftool.options import (get_option,
option_switch,
)
from dune.perftool.pdelab.quadrature import quadrature_preamble
from dune.perftool.tools import get_pymbolic_basename
from ufl.algorithms import MultiFunction
......@@ -260,8 +262,12 @@ def declare_normal(name, shape, shape_impl):
def name_unit_outer_normal():
name = "outer_normal"
temporary_variable(name, shape=(world_dimension(),), decl_method=declare_normal)
evaluate_unit_outer_normal(name)
if not get_option("diagonal_transformation_matrix"):
temporary_variable(name, shape=(world_dimension(),), decl_method=declare_normal)
evaluate_unit_outer_normal(name)
else:
declare_normal(name, None, None)
globalarg(name, shape=(world_dimension(),), dtype=np.float64)
return "outer_normal"
......
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