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

[bugfix] fix splitting of jacobian skeleton terms

parent e77b05de
No related branches found
No related tags found
No related merge requests found
......@@ -427,7 +427,7 @@ def generate_kernel(integrals):
# Generate code for the LFS trees present in the form
from dune.perftool.ufl.modified_terminals import extract_modified_arguments
test_ma = extract_modified_arguments(integrand,)
test_ma = extract_modified_arguments(integrand, argnumber=0)
trial_ma = extract_modified_arguments(integrand, coeffcount=0)
apply_ma = extract_modified_arguments(integrand, coeffcount=1)
......
......@@ -144,7 +144,7 @@ class _ModifiedArgumentExtractor(MultiFunction):
reference_value = pass_on
def argument(self, o):
if self.argnumber is None or o.number() == self.argnumber:
if o.number() == self.argnumber:
return o
def coefficient(self, o):
......
......@@ -61,10 +61,10 @@ def split_into_accumulation_terms(expr):
# TODO Some jacobian terms can be joined
replacement = {ma.expr: Zero() for ma in all_jacobian_args}
replacement[jac_arg.expr] = jac_arg.expr
replace_expr = replace_expression(replace_expr, replacemap=replacement)
jac_expr = replace_expression(replace_expr, replacemap=replacement)
if not isinstance(replace_expr, Zero):
ret.append(AccumulationTerm(replace_expr, test_arg))
if not isinstance(jac_expr, Zero):
ret.append(AccumulationTerm(jac_expr, test_arg))
else:
if not isinstance(replace_expr, Zero):
ret.append(AccumulationTerm(replace_expr, test_arg))
......
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