diff --git a/sumpy/fmm.py b/sumpy/fmm.py index 4c9b8360cb8aee3fe0b9dfd2364f3089abe7c257..3d313f258b421a9f51e2905e66661c1d4b831df1 100644 --- a/sumpy/fmm.py +++ b/sumpy/fmm.py @@ -326,6 +326,7 @@ class SumpyExpansionWrangler(object): mpoles): tree = self.tree + evt = None # 2 is the last relevant source_level. # 1 is the last relevant target_level. # (Nobody needs a multipole on level 0, i.e. for the root box.) @@ -362,7 +363,8 @@ class SumpyExpansionWrangler(object): assert mpoles_res is target_mpoles_view - mpoles.add_event(evt) + if evt is not None: + mpoles.add_event(evt) return mpoles