Commit 9d02f752 authored by BRAMAS Berenger's avatar BRAMAS Berenger

debug periodic

parent d7cd999d
...@@ -352,19 +352,19 @@ protected: ...@@ -352,19 +352,19 @@ protected:
for(int idxNeig = 0 ; idxNeig < counter ; ++idxNeig){ for(int idxNeig = 0 ; idxNeig < counter ; ++idxNeig){
if( !offsets[idxNeig].equals(0,0,0) ){ if( !offsets[idxNeig].equals(0,0,0) ){
// Put periodic neighbors into other array // Put periodic neighbors into other array
periodicNeighbors[periodicNeighborsCounter] = neighbors[idxNeig]; FReal*const positionsX = neighbors[idxNeig]->getWPositions()[0];
periodicNeighborPositions[periodicNeighborsCounter] = neighborPositions[idxNeig]; FReal*const positionsY = neighbors[idxNeig]->getWPositions()[1];
++periodicNeighborsCounter; FReal*const positionsZ = neighbors[idxNeig]->getWPositions()[2];
FReal*const positionsX = periodicNeighbors[idxNeig]->getWPositions()[0];
FReal*const positionsY = periodicNeighbors[idxNeig]->getWPositions()[1];
FReal*const positionsZ = periodicNeighbors[idxNeig]->getWPositions()[2];
for(FSize idxPart = 0; idxPart < periodicNeighbors[idxNeig]->getNbParticles() ; ++idxPart){ for(FSize idxPart = 0; idxPart < neighbors[idxNeig]->getNbParticles() ; ++idxPart){
positionsX[idxPart] += boxWidth * FReal(offsets[idxNeig].getX()); positionsX[idxPart] += boxWidth * FReal(offsets[idxNeig].getX());
positionsY[idxPart] += boxWidth * FReal(offsets[idxNeig].getY()); positionsY[idxPart] += boxWidth * FReal(offsets[idxNeig].getY());
positionsZ[idxPart] += boxWidth * FReal(offsets[idxNeig].getZ()); positionsZ[idxPart] += boxWidth * FReal(offsets[idxNeig].getZ());
} }
periodicNeighbors[periodicNeighborsCounter] = neighbors[idxNeig];
periodicNeighborPositions[periodicNeighborsCounter] = neighborPositions[idxNeig];
++periodicNeighborsCounter;
} }
else{ else{
neighbors[idxNeig-periodicNeighborsCounter] = neighbors[idxNeig]; neighbors[idxNeig-periodicNeighborsCounter] = neighbors[idxNeig];
......
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