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

[skip ci] Use correct matrix sequence in interface after splitting

parent fa93ccf1
No related branches found
No related tags found
No related merge requests found
......@@ -102,6 +102,9 @@ class AccumulationOutput(SumfactKernelInterfaceBase, ImmutableRecord):
trial_element_index=None,
):
# See comment regarding get_keyword_arguments why we assert that matrix_sequence is not None
assert matrix_sequence is not None
# Note: The function sumfact_quadrature_permutation_strategy does not
# work anymore after the visiting process since get_facedir and
# get_facemod are not well defined. But we need the
......@@ -131,6 +134,19 @@ class AccumulationOutput(SumfactKernelInterfaceBase, ImmutableRecord):
def __repr__(self):
return ImmutableRecord.__repr__(self)
def get_keyword_arguments(self):
"""Get dictionary of keyword arguments needed to initialize this classIFIERS
Extract keyword arguments from the ImmutableRecord and modify
accordingly. You need to set the correct matrix sequence before using
this dict to create an interface.
"""
dict = self.get_copy_kwargs()
del dict['_cost_permutation']
del dict['_quadrature_permutation']
dict['matrix_sequence'] = None
return dict
@property
def quadrature_permutation(self):
return self._quadrature_permutation
......
......@@ -94,6 +94,19 @@ class LFSSumfactKernelInput(SumfactKernelInterfaceBase, ImmutableRecord):
def __str__(self):
return repr(self)
def get_keyword_arguments(self):
"""Get dictionary of keyword arguments needed to initialize this classIFIERS
Extract keyword arguments from the ImmutableRecord and modify
accordingly. You need to set the correct matrix sequence before using
this dict to create an interface.
"""
dict = self.get_copy_kwargs()
del dict['_cost_permutation']
del dict['_quadrature_permutation']
dict['matrix_sequence'] = None
return dict
@property
def quadrature_permutation(self):
return self._quadrature_permutation
......
......@@ -103,6 +103,19 @@ class GeoCornersInput(SumfactKernelInterfaceBase, ImmutableRecord):
def __str__(self):
return repr(self)
def get_keyword_arguments(self):
"""Get dictionary of keyword arguments needed to initialize this classIFIERS
Extract keyword arguments from the ImmutableRecord and modify
accordingly. You need to set the correct matrix sequence before using
this dict to create an interface.
"""
dict = self.get_copy_kwargs()
del dict['_cost_permutation']
del dict['_quadrature_permutation']
dict['matrix_sequence'] = None
return dict
@property
def quadrature_permutation(self):
return self._quadrature_permutation
......
......@@ -459,7 +459,12 @@ def get_vectorization_dict(sumfacts, vertical, horizontal, qp):
seq = list(sf.matrix_sequence_quadrature_permuted)
seq[slice_direction] = oldtab.copy(slice_size=vertical,
slice_index=i)
kernels.append(sf.copy(matrix_sequence=tuple(seq)))
# Create new sf kernel with new interface
kwargs = sf.interface.get_keyword_arguments()
kwargs.update({'matrix_sequence': tuple(seq)})
newinterface = type(sf.interface)(**kwargs)
kernels.append(sf.copy(matrix_sequence=tuple(seq), interface=newinterface))
# Join the new kernels into a sum factorization node
buffer = get_counted_variable("joined_buffer")
......
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