Commit efca5efb authored by berenger-bramas's avatar berenger-bramas
Browse files

Update P2P.

The Fmm is in charge of dispatching the leafs compution.
Anyway, this is in the kernel that the optimization can be done.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@46 2616d619-271b-44dc-8df4-d4a8f33a7222
parent a894af66
......@@ -297,20 +297,21 @@ public:
while( iterTarget.isValide() ){
for(int idxDirectNeighbors = 0 ; idxDirectNeighbors < size ; ++idxDirectNeighbors){
if(directNeighbors[idxDirectNeighbors] < sources){
if(directNeighbors[idxDirectNeighbors] < targets){
typename FList<ParticleClass*>::BasicIterator iterSource(*directNeighbors[idxDirectNeighbors]);
while( iterSource.isValide() ){
DIRECT_COMPUTATION_NO_MUTUAL_SOFT(&iterTarget.value(),
DIRECT_COMPUTATION_MUTUAL_SOFT(&iterTarget.value(),
&iterSource.value());
iterSource.progress();
}
}
}
typename FList<ParticleClass*>::BasicIterator iterSameBox(*targets);
typename FList<ParticleClass*>::BasicIterator iterSameBox = iterTarget;//(*targets);
iterSameBox.progress();
while( iterSameBox.isValide() ){
if(iterSameBox.value() < iterTarget.value()){
DIRECT_COMPUTATION_NO_MUTUAL_SOFT(&iterTarget.value(),
DIRECT_COMPUTATION_MUTUAL_SOFT(&iterTarget.value(),
&iterSameBox.value());
}
iterSameBox.progress();
......@@ -324,7 +325,7 @@ public:
}
FTRACE( FTrace::Controller.leaveFunction(FTrace::KERNELS) );
}
void DIRECT_COMPUTATION_NO_MUTUAL_SOFT(ParticleClass** const target, ParticleClass** const source){
void DIRECT_COMPUTATION_MUTUAL_SOFT(ParticleClass** const target, ParticleClass** const source){
FTRACE( FTrace::Controller.enterFunction(FTrace::KERNELS, __FUNCTION__ , __FILE__ , __LINE__) );
const FReal dx = (*target)->getPosition().getX() - (*source)->getPosition().getX();
const FReal dy = (*target)->getPosition().getY() - (*source)->getPosition().getY();
......
......@@ -22,6 +22,7 @@
#include "../Sources/Components/FSimpleLeaf.hpp"
#include "../Sources/Fmb/FFmbKernelsPotentialForcesTsm.hpp"
#include "../Sources/Fmb/FFmbKernelsPotentialForces.hpp"
#include "../Sources/Fmb/FFmbKernelsForces.hpp"
#include "../Sources/Fmb/FFmbKernelsPotential.hpp"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment