Skip to content

Commit 0bc3d24

Browse files
committed
Support distributed pytential
1 parent f537396 commit 0bc3d24

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
@@ -382,16 +382,17 @@ def fmm_level_to_order(tree, level): # noqa pylint:disable=function-redefined
382382
# It's not super bad because the dipole vectors are typically geometry
383383
# normals and thus change about at the same time as the tree... but there's
384384
# still no reason for them to be here.
385-
self.use_dipoles = dipole_vec is not None
386-
if self.use_dipoles:
387-
assert dipole_vec.shape == (self.dim, self.tree.nsources)
385+
if not hasattr(self, "use_dipoles"):
386+
self.use_dipoles = dipole_vec is not None
387+
if self.use_dipoles:
388+
assert dipole_vec.shape == (self.dim, self.tree.nsources)
388389

389-
if not dipoles_already_reordered:
390-
dipole_vec = self.reorder_sources(dipole_vec)
390+
if not dipoles_already_reordered:
391+
dipole_vec = self.reorder_sources(dipole_vec)
391392

392-
self.dipole_vec = dipole_vec.copy(order="F")
393-
else:
394-
self.dipole_vec = None
393+
self.dipole_vec = dipole_vec.copy(order="F")
394+
else:
395+
self.dipole_vec = None
395396

396397
# }}}
397398

0 commit comments

Comments
 (0)