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

Document and cleanup

parent f80ca52e
No related branches found
No related tags found
No related merge requests found
......@@ -176,11 +176,21 @@ class AccumulationOutput(SumfactKernelInterfaceBase, ImmutableRecord):
def accumulate_output(self, sf, result, insn_dep, inames=None, additional_inames=()):
trial_leaf_element = get_leaf(self.trial_element, self.trial_element_index) if self.trial_element is not None else None
# Note: Using matrix_sequence_quadrature_permuted is ok in this place since:
#
# - If the grid is unstructured we assume that the polynomial degree
# for each direction is the same.
#
# - If the grid is structured the quadrature permuted matrix sequence
# is the same as the original one. We still need to call this one
# since VectorizedSumfactKernels do not have the matrix_sequence
# attribute.
basis_size = tuple(mat.basis_size for mat in sf.matrix_sequence_quadrature_permuted)
if get_option('grid_unstructured'):
assert len(set(basis_size)) == 1
if inames is None:
inames = tuple(accum_iname(trial_leaf_element, mat.rows, i)
for i, mat in enumerate(sf.matrix_sequence_quadrature_permuted))
inames = tuple(accum_iname(trial_leaf_element, size, i) for i, size in enumerate(basis_size))
# Determine the expression to accumulate with. This depends on the vectorization strategy!
from dune.codegen.tools import maybe_wrap_subscript
......
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