Skip to content

Commit 9c9ac14

Browse files
committed
FEAT: dipole quadtree is like sphere quadtree
1 parent 1c2ef28 commit 9c9ac14

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/quadtree.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,19 +514,18 @@ int64_t Quadtree::find_point(arma_vec point) {
514514

515515
if (IsSphere)
516516
wrap_point = wrap_point_sphere(point);
517-
518517
if (IsCubeSphere)
519518
wrap_point = wrap_point_cubesphere(point);
519+
if (IsDipole)
520+
wrap_point = wrap_point_sphere(point);
520521

521522
int64_t iNode = -1;
522523

523524
for (int64_t iRoot = 0; iRoot < nRootNodes; iRoot++) {
524525
iNode = find_point(wrap_point, root_nodes[iRoot]);
525-
526526
if (iNode > -1)
527527
break;
528528
}
529-
530529
return iNode;
531530
}
532531

@@ -542,9 +541,10 @@ int64_t Quadtree::find_root(arma_vec point) {
542541

543542
if (IsSphere)
544543
wrap_point = wrap_point_sphere(point);
545-
546544
if (IsCubeSphere)
547545
wrap_point = wrap_point_cubesphere(point);
546+
if (IsDipole)
547+
wrap_point = wrap_point_cubesphere(point);
548548

549549
int64_t iNode = -1, iRoot;
550550

0 commit comments

Comments
 (0)