Commit 3e12cd1e authored by Quentin Khan's avatar Quentin Khan

Replace deprecated getWPosition by getPosition

  - FAbstractSphericalKernel,
  - testOctreeRearrange,
  - testOctreeRearrangePeriodic,
  - testOctreeRearrangeProc,
  - testOctreeRearrangeTsm,
parent 3ebd26e3
......@@ -691,9 +691,9 @@ public:
*
*/
void updatePosition(ContainerClass*const FRestrict inParticles, const FReal DT){
FReal*const positionsX = inParticles->getWPositions()[0];
FReal*const positionsY = inParticles->getWPositions()[1];
FReal*const positionsZ = inParticles->getWPositions()[2];
FReal*const positionsX = inParticles->getPositions()[0];
FReal*const positionsY = inParticles->getPositions()[1];
FReal*const positionsZ = inParticles->getPositions()[2];
FVector<FPoint<FReal>>& velocities = inParticles->getVelocities();
for(FSize idxPart = 0 ; idxPart < inParticles->getNbParticles() ; ++idxPart){
......
......@@ -116,9 +116,9 @@ int main(int argc, char ** argv){
do{
ContainerClass* particles = octreeIterator.getCurrentListTargets();
for(FSize idxPart = 0; idxPart < particles->getNbParticles() ; ++idxPart){
particles->getWPositions()[0][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles->getWPositions()[1][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles->getWPositions()[2][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles->getPositions()[0][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles->getPositions()[1][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles->getPositions()[2][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
}
} while(octreeIterator.moveRight());
}
......@@ -156,9 +156,9 @@ int main(int argc, char ** argv){
ContainerClass* particles = octreeIterator.getCurrentListTargets();
for(FSize idxPart = 0; idxPart < particles->getNbParticles() ; ++idxPart){
const FPoint<FReal> particlePosition( particles->getWPositions()[0][idxPart],
particles->getWPositions()[1][idxPart],
particles->getWPositions()[2][idxPart]);
const FPoint<FReal> particlePosition( particles->getPositions()[0][idxPart],
particles->getPositions()[1][idxPart],
particles->getPositions()[2][idxPart]);
const MortonIndex particleIndex = tree.getMortonFromPosition( particlePosition );
if( leafIndex != particleIndex){
......
......@@ -117,9 +117,9 @@ int main(int argc, char ** argv){
do{
ContainerClass* particles = octreeIterator.getCurrentListTargets();
for(FSize idxPart = 0; idxPart < particles->getNbParticles() ; ++idxPart){
particles->getWPositions()[0][idxPart] = (FReal(drand48()))*BoxWidth*4 + (BoxCenter-(BoxWidth/2));
particles->getWPositions()[1][idxPart] = (FReal(drand48()))*BoxWidth*4 + (BoxCenter-(BoxWidth/2));
particles->getWPositions()[2][idxPart] = (FReal(drand48()))*BoxWidth*4 + (BoxCenter-(BoxWidth/2));
particles->getPositions()[0][idxPart] = (FReal(drand48()))*BoxWidth*4 + (BoxCenter-(BoxWidth/2));
particles->getPositions()[1][idxPart] = (FReal(drand48()))*BoxWidth*4 + (BoxCenter-(BoxWidth/2));
particles->getPositions()[2][idxPart] = (FReal(drand48()))*BoxWidth*4 + (BoxCenter-(BoxWidth/2));
}
} while(octreeIterator.moveRight());
}
......@@ -157,9 +157,9 @@ int main(int argc, char ** argv){
ContainerClass* particles = octreeIterator.getCurrentListTargets();
for(FSize idxPart = 0; idxPart < particles->getNbParticles() ; ++idxPart){
const FPoint<FReal> particlePosition( particles->getWPositions()[0][idxPart],
particles->getWPositions()[1][idxPart],
particles->getWPositions()[2][idxPart]);
const FPoint<FReal> particlePosition( particles->getPositions()[0][idxPart],
particles->getPositions()[1][idxPart],
particles->getPositions()[2][idxPart]);
const MortonIndex particleIndex = tree.getMortonFromPosition( particlePosition );
if( leafIndex != particleIndex){
......
......@@ -4,13 +4,13 @@
// This software is a computer program whose purpose is to compute the FMM.
//
// This software is governed by the CeCILL-C and LGPL licenses and
// abiding by the rules of distribution of free software.
//
// abiding by the rules of distribution of free software.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public and CeCILL-C Licenses for more details.
// "http://www.cecill.info".
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
......@@ -161,9 +161,9 @@ int main(int argc, char ** argv){
do{
ContainerClass* particles = octreeIterator.getCurrentListTargets();
for(FSize idxPart = 0; idxPart < particles->getNbParticles() ; ++idxPart){
particles->getWPositions()[0][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles->getWPositions()[1][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles->getWPositions()[2][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles->getPositions()[0][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles->getPositions()[1][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles->getPositions()[2][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
}
} while(octreeIterator.moveRight());
}
......@@ -203,9 +203,9 @@ int main(int argc, char ** argv){
ContainerClass* particles = octreeIterator.getCurrentListTargets();
for(FSize idxPart = 0; idxPart < particles->getNbParticles() ; ++idxPart){
const FPoint<FReal> particlePosition( particles->getWPositions()[0][idxPart],
particles->getWPositions()[1][idxPart],
particles->getWPositions()[2][idxPart]);
const FPoint<FReal> particlePosition( particles->getPositions()[0][idxPart],
particles->getPositions()[1][idxPart],
particles->getPositions()[2][idxPart]);
const MortonIndex particleIndex = tree.getMortonFromPosition( particlePosition );
if( leafIndex != particleIndex){
......@@ -274,6 +274,3 @@ int main(int argc, char ** argv){
return 0;
}
......@@ -131,14 +131,14 @@ int main(int argc, char ** argv){
ContainerClass* particles_sources = octreeIterator.getCurrentListTargets();
ContainerClass* particles_targets = octreeIterator.getCurrentListSrc();
for(FSize idxPart = 0; idxPart < particles_sources->getNbParticles() ; ++idxPart){
particles_sources->getWPositions()[0][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles_sources->getWPositions()[1][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles_sources->getWPositions()[2][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles_sources->getPositions()[0][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles_sources->getPositions()[1][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles_sources->getPositions()[2][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
}
for(FSize idxPart = 0; idxPart < particles_targets->getNbParticles() ; ++idxPart){
particles_targets->getWPositions()[0][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles_targets->getWPositions()[1][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles_targets->getWPositions()[2][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles_targets->getPositions()[0][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles_targets->getPositions()[1][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
particles_targets->getPositions()[2][idxPart] = (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2));
}
} while(octreeIterator.moveRight());
}
......@@ -178,9 +178,9 @@ int main(int argc, char ** argv){
ContainerClass* particles_sources = octreeIterator.getCurrentLeaf()->getSrc();;
//Check for current sources
for(FSize idxPart = 0; idxPart < particles_sources->getNbParticles() ; ++idxPart){
const FPoint<FReal> particlePosition( particles_sources->getWPositions()[0][idxPart],
particles_sources->getWPositions()[1][idxPart],
particles_sources->getWPositions()[2][idxPart]);
const FPoint<FReal> particlePosition( particles_sources->getPositions()[0][idxPart],
particles_sources->getPositions()[1][idxPart],
particles_sources->getPositions()[2][idxPart]);
const MortonIndex particleIndex = tree.getMortonFromPosition( particlePosition );
if( leafIndex != particleIndex){
std::cout << "Index problem, should be " << leafIndex <<
......@@ -190,9 +190,9 @@ int main(int argc, char ** argv){
}
//Check for current targets
for(FSize idxPart = 0; idxPart < particles_targets->getNbParticles() ; ++idxPart){
const FPoint<FReal> particlePosition( particles_targets->getWPositions()[0][idxPart],
particles_targets->getWPositions()[1][idxPart],
particles_targets->getWPositions()[2][idxPart]);
const FPoint<FReal> particlePosition( particles_targets->getPositions()[0][idxPart],
particles_targets->getPositions()[1][idxPart],
particles_targets->getPositions()[2][idxPart]);
const MortonIndex particleIndex = tree.getMortonFromPosition( particlePosition );
if( leafIndex != particleIndex){
......
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