diff --git a/NEWS.txt b/NEWS.txt index 752f768e441847923e95475c80640ac4af83e865..1377859ef39e8ec3e33bef88ffbcb3e5d5277081 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -7,6 +7,14 @@ This file contains the main features as well as overviews of specific bug fixes (and other actions) for each version of ScalFMM since version 1.1 +2.0 +----- +- New API for Kernels (The same kernel can be used witth all Octree) +- Use scoped enum (FParticleTYpe (target,source), OPM4_Priorities, ... +- StarPU wprks with Duplicate and Let trees with MPI (STF approach) +- Remove all warnings with gcc 7.2 +- std::complex is used for equispaced interpolation +- 1.5 ----- diff --git a/Src/Arranger/FOctreeArranger.hpp b/Src/Arranger/FOctreeArranger.hpp index a41606ed2ce5321b18c051e4edbb1a4441d06b0d..88a06c46cea10aed7e5bef28c7f6af5cfb065e30 100644 --- a/Src/Arranger/FOctreeArranger.hpp +++ b/Src/Arranger/FOctreeArranger.hpp @@ -71,7 +71,7 @@ public: const MortonIndex particuleIndex = tree->getMortonFromPosition(currentPart); if(particuleIndex != currentMortonIndex){ //Need to move this one - interface->removeFromLeafAndKeep(particles,currentPart,idxPart,FParticleType::FParticleTypeSource); + interface->removeFromLeafAndKeep(particles,currentPart,idxPart,FParticleType::source); } else{ //Need to increment idx; @@ -88,7 +88,7 @@ public: const MortonIndex particuleIndex = tree->getMortonFromPosition(currentPart); if(particuleIndex != currentMortonIndex){ //Need to move this one - interface->removeFromLeafAndKeep(particleTargets,currentPart,idxPart, FParticleType::FParticleTypeTarget); + interface->removeFromLeafAndKeep(particleTargets,currentPart,idxPart, FParticleType::target); } else{ //Need to increment idx; diff --git a/Src/Arranger/FParticleTypedIndexedMover.hpp b/Src/Arranger/FParticleTypedIndexedMover.hpp index a8286323d464b1cfb822cfdc5fe2651cddf3ba02..2b55459ae985f05f6e19437fe50b2456a8e8268d 100644 --- a/Src/Arranger/FParticleTypedIndexedMover.hpp +++ b/Src/Arranger/FParticleTypedIndexedMover.hpp @@ -33,11 +33,11 @@ public: for(int idxAttr = 0 ; idxAttr < ContainerClass::NbAttributes ; ++idxAttr){ particleValues[idxAttr] = lf->getAttribute(idxAttr)[idxPart]; } - if(type == FParticleType::FParticleTypeTarget){ - toStoreRemovedTargetParts.push(particlePos,FParticleType::FParticleTypeTarget,lf->getIndexes()[idxPart],particleValues); + if(type == FParticleType::target){ + toStoreRemovedTargetParts.push(particlePos,FParticleType::target,lf->getIndexes()[idxPart],particleValues); } else{ - toStoreRemovedSourceParts.push(particlePos,FParticleType::FParticleTypeSource,lf->getIndexes()[idxPart],particleValues); + toStoreRemovedSourceParts.push(particlePos,FParticleType::source,lf->getIndexes()[idxPart],particleValues); } lf->removeParticles(&idxPart,1); } @@ -53,7 +53,7 @@ public: const FPoint<FReal> particlePos(toStoreRemovedSourceParts.getPositions()[0][idxToInsert], toStoreRemovedSourceParts.getPositions()[1][idxToInsert], toStoreRemovedSourceParts.getPositions()[2][idxToInsert]); - tree->insert(particlePos, FParticleType::FParticleTypeSource, toStoreRemovedSourceParts.getIndexes()[idxToInsert], particleValues); + tree->insert(particlePos, FParticleType::source, toStoreRemovedSourceParts.getIndexes()[idxToInsert], particleValues); } for(FSize idxToInsert = 0; idxToInsert<toStoreRemovedTargetParts.getNbParticles() ; ++idxToInsert){ @@ -64,7 +64,7 @@ public: toStoreRemovedTargetParts.getPositions()[1][idxToInsert], toStoreRemovedTargetParts.getPositions()[2][idxToInsert]); - tree->insert(particlePos, FParticleType::FParticleTypeTarget, toStoreRemovedTargetParts.getIndexes()[idxToInsert], particleValues); + tree->insert(particlePos, FParticleType::target, toStoreRemovedTargetParts.getIndexes()[idxToInsert], particleValues); } toStoreRemovedSourceParts.clear(); diff --git a/Src/Components/FParticleType.hpp b/Src/Components/FParticleType.hpp index 4f55ccec8783cb2dd1de149a56da6a8e8c77c29d..e1a9921b4633627ee9250dfeb8ee961b55537d8b 100644 --- a/Src/Components/FParticleType.hpp +++ b/Src/Components/FParticleType.hpp @@ -6,8 +6,8 @@ * @brief The FParticleType enum is to make a difference between Target and Source (Tsm) */ enum class FParticleType { - FParticleTypeSource, - FParticleTypeTarget + source, + target // FParticleTypeSource = 0, // FParticleTypeTarget = 1 }; diff --git a/Src/Components/FTypedLeaf.hpp b/Src/Components/FTypedLeaf.hpp index 1c8e69594dec29d2fc0aa053dba348c3548a0ac2..545790679015aac0f445fbc11430ecdf40bcfa1a 100644 --- a/Src/Components/FTypedLeaf.hpp +++ b/Src/Components/FTypedLeaf.hpp @@ -37,7 +37,7 @@ public: */ template<typename... Args> void push(const FPoint<FReal>& inParticlePosition, const FParticleType type, Args ... args){ - if(type == FParticleType::FParticleTypeTarget) { + if(type == FParticleType::FParticleType::target) { targets.push(inParticlePosition, args...); // targets.push(inParticlePosition, FParticleType::FParticleTypeTarget, args...); } diff --git a/Src/Files/FFmaTsmLoader.hpp b/Src/Files/FFmaTsmLoader.hpp index 10d10d749f49a020ca74ac3df32dcc6e4083b700..fa36547fc42f987136e2b5eb3c9b2797fc644f83 100644 --- a/Src/Files/FFmaTsmLoader.hpp +++ b/Src/Files/FFmaTsmLoader.hpp @@ -117,8 +117,10 @@ public: inParticlePositions->setPosition(x,y,z); *inPhysicalValue = data; - if(isTarget) (*particleType) = FParticleType::FParticleTypeTarget; - else (*particleType) = FParticleType::FParticleTypeSource; + if(isTarget){ + (*particleType) = FParticleType::target;} + else { + (*particleType) = FParticleType::source;} } }; diff --git a/Src/Files/FRandomLoader.hpp b/Src/Files/FRandomLoader.hpp index be6b4bd00be9d839957813fd10b240fa9a39a2f7..9a5fedd9ed01bdc2a79b8cd9e82441917ce85a02 100644 --- a/Src/Files/FRandomLoader.hpp +++ b/Src/Files/FRandomLoader.hpp @@ -110,8 +110,8 @@ public: void fillParticle(FPoint<FReal>*const inParticlePositions, FParticleType*const isTarget){ FRandomLoader<FReal>::fillParticle(inParticlePositions); - if(FRandomLoader<FReal>::getRandom() > 0.5 ) (*isTarget) = FParticleType::FParticleTypeTarget; - else (*isTarget) = FParticleType::FParticleTypeSource; + if(FRandomLoader<FReal>::getRandom() > 0.5 ) (*isTarget) = FParticleType::target; + else (*isTarget) = FParticleType::source; } }; diff --git a/Tests/Utils/testFmmAlgorithmProcTsm.cpp b/Tests/Utils/testFmmAlgorithmProcTsm.cpp index 6599e17db9a1e08edd94e72dfcec0a2c61c5f827..19e99a572878cbae2edf62a36814e40c589c41fc 100644 --- a/Tests/Utils/testFmmAlgorithmProcTsm.cpp +++ b/Tests/Utils/testFmmAlgorithmProcTsm.cpp @@ -395,7 +395,7 @@ int main(int argc, char ** argv){ for(int idx = 0 ; idx < finalParticles.getSize(); ++idx){ realTree.insert(finalParticles[idx].position, - finalParticles[idx].isSource? FParticleType::FParticleTypeSource: FParticleType::FParticleTypeTarget); + finalParticles[idx].isSource? FParticleType::source: FParticleType::target); } delete[] particles; diff --git a/Tests/Utils/testFmmAlgorithmTsm.cpp b/Tests/Utils/testFmmAlgorithmTsm.cpp index 40a95c87e4fc9f95d51f3e4480fd191c868363b6..2ad838998131dd667964253c7ca0f8d17bf52e6e 100644 --- a/Tests/Utils/testFmmAlgorithmTsm.cpp +++ b/Tests/Utils/testFmmAlgorithmTsm.cpp @@ -5,31 +5,31 @@ #include <cstdio> #include <cstdlib> -#include "../../Src/Utils/FTic.hpp" +#include "Utils/FTic.hpp" -#include "../../Src/Containers/FOctree.hpp" -#include "../../Src/Containers/FVector.hpp" -#include "../../Src/Utils/FParameters.hpp" +#include "Containers/FOctree.hpp" +#include "Containers/FVector.hpp" +#include "Utils/FParameters.hpp" -#include "../../Src/Components/FTypedLeaf.hpp" +#include "Components/FTypedLeaf.hpp" -#include "../../Src/Utils/FPoint.hpp" +#include "Utils/FPoint.hpp" -#include "../../Src/Components/FTestCell.hpp" -#include "../../Src/Components/FTestKernels.hpp" +#include "Components/FTestCell.hpp" +#include "Components/FTestKernels.hpp" -#include "../../Src/Extensions/FExtendCellType.hpp" +#include "Extensions/FExtendCellType.hpp" -#include "../../Src/Core/FFmmAlgorithmTsm.hpp" -#include "../../Src/Core/FFmmAlgorithmThreadTsm.hpp" +#include "Core/FFmmAlgorithmTsm.hpp" +#include "Core/FFmmAlgorithmThreadTsm.hpp" -#include "../../Src/Components/FBasicKernels.hpp" +#include "Components/FBasicKernels.hpp" -#include "../../Src/Files/FRandomLoader.hpp" +#include "Files/FRandomLoader.hpp" -#include "../../Src/Components/FTestParticleContainer.hpp" +#include "Components/FTestParticleContainer.hpp" -#include "../../Src/Utils/FParameterNames.hpp" +#include "Utils/FParameterNames.hpp" /** This program show an example of use of * the fmm basic algo diff --git a/Tests/Utils/testOctreeRearrangeTsm.cpp b/Tests/Utils/testOctreeRearrangeTsm.cpp index d429528b6fb8f52a2c4147e473fa3c9babd69654..fe94392a5d5c96984498f4b7b148951135b7fc75 100644 --- a/Tests/Utils/testOctreeRearrangeTsm.cpp +++ b/Tests/Utils/testOctreeRearrangeTsm.cpp @@ -83,7 +83,7 @@ int main(int argc, char ** argv){ (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2)), (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2)), (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2))); - tree.insert(particleToFill,FParticleType::FParticleTypeSource,idxPart); + tree.insert(particleToFill,FParticleType::source,idxPart); } for(FSize idxPart = 0 ; idxPart < NbPart_Target; ++idxPart){ @@ -91,7 +91,7 @@ int main(int argc, char ** argv){ (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2)), (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2)), (BoxWidth*FReal(drand48())) + (BoxCenter-(BoxWidth/2))); - tree.insert(particleToFill,FParticleType::FParticleTypeTarget,idxPart); + tree.insert(particleToFill,FParticleType::target,idxPart); } } diff --git a/UTests/utestChebyshevDirectTsm.cpp b/UTests/utestChebyshevDirectTsm.cpp index 262ff87e82bb7c2128e9ccaf35653cb097025709..a00cd9f78ca47a23ec24a44ed856ba3f8510ab25 100644 --- a/UTests/utestChebyshevDirectTsm.cpp +++ b/UTests/utestChebyshevDirectTsm.cpp @@ -54,7 +54,7 @@ class TestChebyshevDirectTsm : public FUTester<TestChebyshevDirectTsm> { FPoint<FReal> position; loader.fillParticle(&position); // put in tree - tree.insert(position, FParticleType::FParticleTypeTarget, idxPart, physicalValue); + tree.insert(position, FParticleType::target, idxPart, physicalValue); // get copy particlesTargets[idxPart].setPosition(position); *(particlesTargets[idxPart].setPhysicalValue()) = physicalValue; @@ -69,7 +69,7 @@ class TestChebyshevDirectTsm : public FUTester<TestChebyshevDirectTsm> { FPoint<FReal> position; loader.fillParticle(&position); // put in tree - tree.insert(position, FParticleType::FParticleTypeSource, idxPart, physicalValue); + tree.insert(position, FParticleType::source, idxPart, physicalValue); // get copy particlesSources[idxPart].setPosition(position); *(particlesSources[idxPart].setPhysicalValue()) = physicalValue; diff --git a/UTests/utestRotationDirectTsm.cpp b/UTests/utestRotationDirectTsm.cpp index 0d4c14d55fe63daab88d1c56322953d366a8e2bc..060376a8bc9b64b4fd253ea4971d756c10f5e3ff 100644 --- a/UTests/utestRotationDirectTsm.cpp +++ b/UTests/utestRotationDirectTsm.cpp @@ -53,7 +53,7 @@ class TestRotationDirectTsm : public FUTester<TestRotationDirectTsm> { FPoint<FReal> position; loader.fillParticle(&position); // put in tree - tree.insert(position, FParticleType::FParticleTypeTarget, idxPart, physicalValue); + tree.insert(position, FParticleType::target, idxPart, physicalValue); // get copy particlesTargets[idxPart].setPosition(position); *(particlesTargets[idxPart].setPhysicalValue()) = physicalValue; @@ -68,7 +68,7 @@ class TestRotationDirectTsm : public FUTester<TestRotationDirectTsm> { FPoint<FReal> position; loader.fillParticle(&position); // put in tree - tree.insert(position, FParticleType::FParticleTypeSource, idxPart, physicalValue); + tree.insert(position, FParticleType::source, idxPart, physicalValue); // get copy particlesSources[idxPart].setPosition(position); *(particlesSources[idxPart].setPhysicalValue()) = physicalValue;