Commit 73477be5 authored by berenger-bramas's avatar berenger-bramas
Browse files

Improve FMB P2P about 5% (not it is closed to the C original version).

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@240 2616d619-271b-44dc-8df4-d4a8f33a7222
parent 1f790f0d
......@@ -1342,7 +1342,7 @@ public:
typename ContainerClass::BasicIterator iterTarget(*targets);
while( iterTarget.hasNotFinished() ){
ParticleClass& target = iterTarget.data();
ParticleClass target( iterTarget.data() );
for(int idxDirectNeighbors = 0 ; idxDirectNeighbors < size ; ++idxDirectNeighbors){
if(inCurrentIndex < inNeighborsIndex[idxDirectNeighbors] ){
......@@ -1365,9 +1365,11 @@ public:
//printf("\t P2P fx = %e \t fy = %e \t fz = %e \n",iterTarget.data()->getForces().getX(),iterTarget.data()->getForces().getY(),iterTarget.data()->getForces().getZ());
//printf("\t potential = %e \n",iterTarget.data()->getPotential());
iterTarget.data() = target;
iterTarget.gotoNext();
}
}
......@@ -1421,7 +1423,7 @@ public:
typename ContainerClass::BasicIterator iterTarget(*targets);
while( iterTarget.hasNotFinished() ){
ParticleClass& target = iterTarget.data();
ParticleClass target( iterTarget.data() );
for(int idxDirectNeighbors = 0 ; idxDirectNeighbors < size ; ++idxDirectNeighbors){
typename ContainerClass::ConstBasicIterator iterSource(*directNeighbors[idxDirectNeighbors]);
......@@ -1445,9 +1447,11 @@ public:
//printf("\t P2P fx = %e \t fy = %e \t fz = %e \n",iterTarget.data()->getForces().getX(),iterTarget.data()->getForces().getY(),iterTarget.data()->getForces().getZ());
//printf("\t potential = %e \n",iterTarget.data()->getPotential());
iterTarget.data() = target;
iterTarget.gotoNext();
}
}
......
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