diff --git a/finat/finiteelementbase.py b/finat/finiteelementbase.py index dd497a46..72fc83c6 100644 --- a/finat/finiteelementbase.py +++ b/finat/finiteelementbase.py @@ -277,7 +277,11 @@ def dual_evaluation(self, fn): # ignoring any shape indices to avoid hitting the sum- # factorisation index limit (this is a bit of a hack). # Really need to do a more targeted job here. - evaluation = gem.optimise.contraction(evaluation, shape_indices) + try: + evaluation = gem.optimise.contraction(evaluation, shape_indices) + except NotImplementedError as e: + if str(e) != "Too many indices for sum factorisation!": + raise return evaluation, basis_indices @abstractproperty