Skip to content

Commit c269cad

Browse files
gaohao95inducer
authored andcommitted
Support distributed pytential
1 parent aff225f commit c269cad

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

boxtree/pyfmmlib_integration.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -373,16 +373,17 @@ def fmm_level_to_order(tree, level): # pylint:disable=function-redefined
373373
# It's not super bad because the dipole vectors are typically geometry
374374
# normals and thus change about at the same time as the tree... but there's
375375
# still no reason for them to be here.
376-
self.use_dipoles = dipole_vec is not None
377-
if self.use_dipoles:
378-
assert dipole_vec.shape == (self.dim, self.tree.nsources)
376+
if not hasattr(self, "use_dipoles"):
377+
self.use_dipoles = dipole_vec is not None
378+
if self.use_dipoles:
379+
assert dipole_vec.shape == (self.dim, self.tree.nsources)
379380

380-
if not dipoles_already_reordered:
381-
dipole_vec = self.reorder_sources(dipole_vec)
381+
if not dipoles_already_reordered:
382+
dipole_vec = self.reorder_sources(dipole_vec)
382383

383-
self.dipole_vec = dipole_vec.copy(order="F")
384-
else:
385-
self.dipole_vec = None
384+
self.dipole_vec = dipole_vec.copy(order="F")
385+
else:
386+
self.dipole_vec = None
386387

387388
# }}}
388389

0 commit comments

Comments
 (0)