From 2d9322bb69d385bb7495f19e3ba5f98d6a6e8a40 Mon Sep 17 00:00:00 2001
From: bramas <berenger.bramas@inria.fr>
Date: Wed, 16 Oct 2013 16:52:01 +0200
Subject: [PATCH] use remote P2P because source are not target

---
 Src/Core/FFmmAlgorithmThreadTsm.hpp | 3 ++-
 Src/Core/FFmmAlgorithmTsm.hpp       | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Src/Core/FFmmAlgorithmThreadTsm.hpp b/Src/Core/FFmmAlgorithmThreadTsm.hpp
index 21c4da5cc..6340a2bbc 100755
--- a/Src/Core/FFmmAlgorithmThreadTsm.hpp
+++ b/Src/Core/FFmmAlgorithmThreadTsm.hpp
@@ -365,7 +365,8 @@ public:
                 myThreadkernels->L2P(iterArray[idxLeafs].getCurrentCell(), iterArray[idxLeafs].getCurrentListTargets());
                 // need the current particles and neighbors particles
                 const int counter = tree->getLeafsNeighbors(neighbors, iterArray[idxLeafs].getCurrentGlobalCoordinate(),heightMinusOne);
-                myThreadkernels->P2P( iterArray[idxLeafs].getCurrentGlobalCoordinate(), iterArray[idxLeafs].getCurrentListTargets(),
+                neighbors[13] = iterArray[idxLeafs].getCurrentListSrc();
+                myThreadkernels->P2PRemote( iterArray[idxLeafs].getCurrentGlobalCoordinate(), iterArray[idxLeafs].getCurrentListTargets(),
                                       iterArray[idxLeafs].getCurrentListSrc() , neighbors, counter);
             }
         }
diff --git a/Src/Core/FFmmAlgorithmTsm.hpp b/Src/Core/FFmmAlgorithmTsm.hpp
index 4d8191c45..e8c573082 100755
--- a/Src/Core/FFmmAlgorithmTsm.hpp
+++ b/Src/Core/FFmmAlgorithmTsm.hpp
@@ -295,7 +295,8 @@ public:
             kernels->L2P(octreeIterator.getCurrentCell(), octreeIterator.getCurrentListTargets());
             // need the current particles and neighbors particles
             const int counter = tree->getLeafsNeighbors(neighbors, octreeIterator.getCurrentGlobalCoordinate(), heightMinusOne);
-            kernels->P2P( octreeIterator.getCurrentGlobalCoordinate(), octreeIterator.getCurrentListTargets(),
+            neighbors[13] = octreeIterator.getCurrentListSrc();
+            kernels->P2PRemote( octreeIterator.getCurrentGlobalCoordinate(), octreeIterator.getCurrentListTargets(),
                           octreeIterator.getCurrentListSrc() , neighbors, counter);
             FLOG(computationCounter.tac());
             FLOG(totalComputation += computationCounter.elapsed());
-- 
GitLab