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

Take into account non-square blocks in the jacobian!

parent 940fee2e
No related branches found
No related tags found
No related merge requests found
......@@ -228,12 +228,16 @@ def _realize_sum_factorization_kernel(sf):
direct_output = "{}x{}".format(direct_output, sf.trial_element_index)
rowsize = sum(tuple(s for s in _local_sizes(sf.trial_element)))
element = sf.trial_element
if element.num_sub_elements() > 0:
element = element.extract_component(sf.trial_element_index)[1]
other_shape = tuple(element.degree() + 1 for e in range(sf.length))
from pytools import product
manual_strides = tuple("stride:{}".format(rowsize * product(output_shape[:i])) for i in range(sf.length))
dim_tags = "{},{}".format(novec_ftags, ",".join(manual_strides))
globalarg(direct_output,
dtype=np.float64,
shape=output_shape + output_shape,
shape=other_shape + output_shape,
offset=rowsize * _dof_offset(sf.test_element, sf.test_element_index) + _dof_offset(sf.trial_element, sf.trial_element_index),
dim_tags=dim_tags,
)
......
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