Skip to content
Snippets Groups Projects
Commit 39c2b65f authored by René Heß's avatar René Heß
Browse files

Revert "Use loopy for evaluation of basis gradient"

This reverts commit d0a87348.
parent 76d25677
No related branches found
No related tags found
No related merge requests found
...@@ -290,22 +290,18 @@ def evaluate_basis_gradient(leaf_element, name, restriction): ...@@ -290,22 +290,18 @@ def evaluate_basis_gradient(leaf_element, name, restriction):
jac = name_jacobian_inverse_transposed(restriction) jac = name_jacobian_inverse_transposed(restriction)
index = lfs_iname(leaf_element, restriction, context='transformgrads') index = lfs_iname(leaf_element, restriction, context='transformgrads')
reference_gradients = name_reference_gradient(leaf_element, restriction) reference_gradients = name_reference_gradient(leaf_element, restriction)
instruction(inames=(index,
# Evaluate product of jacobianInvereseTransposed and gradient on reference element with loopy quadrature_iname(),
dimindex_0 = dimension_iname(context='gradient_transformation', count=0) ),
dimindex_1 = dimension_iname(context='gradient_transformation', count=1) code='{}.mv({}[{}][0], {}[{}]);'.format(jac,
reduction_expr = Product(( reference_gradients,
Subscript(Variable(jac), (Variable(dimindex_0), Variable(dimindex_1))), index,
Subscript(Variable(reference_gradients), (Variable(index), 0, Variable(dimindex_1))))) name,
assignee = Subscript(Variable(name), (Variable(index), Variable(dimindex_0))) index,
),
# Create exrpession instruction assignees=frozenset({name}),
forced_iname_deps = frozenset({quadrature_iname()}).union(frozenset({index, dimindex_0})) read_variables=frozenset({reference_gradients}),
instruction( )
expression=Reduction("sum", dimindex_1, reduction_expr, allow_simultaneous=True),
assignee=assignee,
forced_iname_deps=forced_iname_deps,
forced_iname_deps_is_final=True)
@symbol @symbol
......
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