diff --git a/sumpy/expansion/__init__.py b/sumpy/expansion/__init__.py index d3dfbccb1de7edfd262f7daa5eb920b24ca937da..17264e8e791b974529578e5de10719aaa71698ea 100644 --- a/sumpy/expansion/__init__.py +++ b/sumpy/expansion/__init__.py @@ -196,7 +196,8 @@ class ExpansionTermsWrangler(object): if self.max_mi is None: return res - return [mi for mi in res if all(mi[i] <= self.max_mi[i])] + return [mi for mi in res if + all(mi[i] <= self.max_mi[i] for i in range(self.dim))] def copy(self, **kwargs): new_kwargs = dict( diff --git a/sumpy/expansion/local.py b/sumpy/expansion/local.py index 6080f646d29afdcb318e97e318a567f5389e42f8..3acdfea0d6c954d0db8cc937be5211ab53edd53e 100644 --- a/sumpy/expansion/local.py +++ b/sumpy/expansion/local.py @@ -240,6 +240,10 @@ class VolumeTaylorLocalExpansionBase(LocalExpansionBase): from sumpy.tools import add_mi + # Calculate a elementwise maximum multi-index because the number + # of multi-indices needed is much less than + # gnitstam(src_order + tgt order) when PDE conforming expansions + # are used. For full Taylor, there's no difference. max_mi = [0]*self.dim for i in range(self.dim): max_mi[i] = max(mi[i] for mi in