diff --git a/Src/Components/FTestKernels.hpp b/Src/Components/FTestKernels.hpp index d1b91a5db214e5da99db6928ece99d1bfd99a4b9..0a2c4daf2841d717268e8cf56b6d8bfe049f27d1 100644 --- a/Src/Components/FTestKernels.hpp +++ b/Src/Components/FTestKernels.hpp @@ -74,8 +74,8 @@ public: FTRACE( FTrace::Controller.enterFunction(FTrace::KERNELS, __FUNCTION__ , __FILE__ , __LINE__) ); // The particles is impacted by the parent cell typename FList<ParticleClass>::BasicIterator iter(*particles); - while( iter.isValide() ){ - iter.value().setDataDown(iter.value().getDataDown() + local->getDataDown()); + while( iter.hasNotFinished() ){ + iter.data().setDataDown(iter.data().getDataDown() + local->getDataDown()); iter.gotoNext(); } FTRACE( FTrace::Controller.leaveFunction(FTrace::KERNELS) ); @@ -95,8 +95,8 @@ public: } typename FList<ParticleClass>::BasicIterator iter(*targets); - while( iter.isValide() ){ - iter.value().setDataDown(iter.value().getDataDown() + inc); + while( iter.hasNotFinished() ){ + iter.data().setDataDown(iter.data().getDataDown() + inc); iter.gotoNext(); } FTRACE( FTrace::Controller.leaveFunction(FTrace::KERNELS) ); @@ -118,8 +118,8 @@ public: } typename FList<ParticleClass>::BasicIterator iter(*targets); - while( iter.isValide() ){ - iter.value().setDataDown(iter.value().getDataDown() + inc); + while( iter.hasNotFinished() ){ + iter.data().setDataDown(iter.data().getDataDown() + inc); iter.gotoNext(); } FTRACE( FTrace::Controller.leaveFunction(FTrace::KERNELS) ); @@ -178,12 +178,12 @@ void ValidateFMMAlgo(FOctree<ParticleClass, CellClass, LeafClass, TreeHeight , S const bool isUsingTsm = (octreeIterator.getCurrentListTargets() != octreeIterator.getCurrentListSrc()); - while( iter.isValide() ){ + while( iter.hasNotFinished() ){ // If a particles has been impacted by less than NbPart - 1 (the current particle) // there is a problem - if( (!isUsingTsm && iter.value().getDataDown() != NbPart - 1) || - (isUsingTsm && iter.value().getDataDown() != NbPart) ){ - std::cout << "Problem L2P + P2P : " << iter.value().getDataDown() << "\n"; + if( (!isUsingTsm && iter.data().getDataDown() != NbPart - 1) || + (isUsingTsm && iter.data().getDataDown() != NbPart) ){ + std::cout << "Problem L2P + P2P : " << iter.data().getDataDown() << "\n"; } iter.gotoNext(); } diff --git a/Src/Containers/FList.hpp b/Src/Containers/FList.hpp index b0eeddb0bdc7e861e6a34bf723ad25f2cee8da77..040db57a785e7b6eb7d4f5834544e5f905fb9a99 100644 --- a/Src/Containers/FList.hpp +++ b/Src/Containers/FList.hpp @@ -164,8 +164,8 @@ public: * FList<int> values; <br> * // inserting ... <br> * FList<int>::BasicIterator iter(values); <br> - * while( iter.isValide() ){ <br> - * iter.value() += 1; <br> + * while( iter.hasNotFinished() ){ <br> + * iter.data() += 1; <br> * iter.gotoNext(); <br> * } <br> * </code> @@ -189,17 +189,17 @@ public: /** * Current pointed value - * current iterator must be valide (isValide()) to use this function + * current iterator must be valide (hasNotFinished()) to use this function */ - Object& value(){ + Object& data(){ return this->iter->target; } /** * Current pointed value - * current iterator must be valide (isValide()) to use this function + * current iterator must be valide (hasNotFinished()) to use this function */ - const Object& value() const{ + const Object& data() const{ return this->iter->target; } @@ -207,7 +207,7 @@ public: * To know if an iterator is at the end of the list * @return true if the current iterator can gotoNext and access to value, else false */ - bool isValide() const{ + bool hasNotFinished() const{ return iter; } @@ -221,8 +221,8 @@ public: * FList<int> values; <br> * // inserting ... <br> * FList<int>::ConstBasicIterator iter(values); <br> - * while( iter.isValide() ){ <br> - * iter.value() += 1; <br> + * while( iter.hasNotFinished() ){ <br> + * iter.data() += 1; <br> * iter.gotoNext(); <br> * } <br> * </code> @@ -246,17 +246,17 @@ public: /** * Current pointed value - * current iterator must be valide (isValide()) to use this function + * current iterator must be valide (hasNotFinished()) to use this function */ - Object value(){ + Object data(){ return this->iter->target; } /** * Current pointed value - * current iterator must be valide (isValide()) to use this function + * current iterator must be valide (hasNotFinished()) to use this function */ - const Object& value() const{ + const Object& data() const{ return this->iter->target; } @@ -264,7 +264,7 @@ public: * To know if an iterator is at the end of the list * @return true if the current iterator can gotoNext and access to value, else false */ - bool isValide() const{ + bool hasNotFinished() const{ return iter; } }; diff --git a/Src/Containers/FVector.hpp b/Src/Containers/FVector.hpp index 85c125396038bae79db834376a8d6d9e6ea3f58e..ebc67cadf39135b9718c7935465491f50be7e739 100644 --- a/Src/Containers/FVector.hpp +++ b/Src/Containers/FVector.hpp @@ -178,15 +178,15 @@ public: ++this->index; } - bool isValide() const{ + bool hasNotFinished() const{ return this->index < this->vector->index; } - T& value(){ + T& data(){ return this->vector->array[this->index]; } - const T& value() const{ + const T& data() const{ return this->vector->array[this->index]; } @@ -209,11 +209,11 @@ public: ++this->index; } - bool isValide() const{ + bool hasNotFinished() const{ return this->index < this->vector->index; } - const T& value() const{ + const T& data() const{ return this->vector->array[this->index]; } diff --git a/Src/Files/FAbstractLoader.hpp b/Src/Files/FAbstractLoader.hpp index 8852927b9f70ee059232e8de7b443bff5d1a3107..dd298d1b780e3fc28ae491c2e7032914882deedc 100644 --- a/Src/Files/FAbstractLoader.hpp +++ b/Src/Files/FAbstractLoader.hpp @@ -49,7 +49,7 @@ public: * To know if the loader is valide (file opened, etc.) * @return true if file is open */ - virtual bool isValide() const = 0; + virtual bool hasNotFinished() const = 0; /** * Fill the next particle diff --git a/Src/Files/FBasicLoader.hpp b/Src/Files/FBasicLoader.hpp index 610c858e6c69469502320136f2f0a713e5d049f0..2971a9046f3e180d17d279aedba0ab913a95ec7f 100644 --- a/Src/Files/FBasicLoader.hpp +++ b/Src/Files/FBasicLoader.hpp @@ -20,7 +20,7 @@ * .... * <code> * FBasicLoader<FBasicParticle> loader("../FMB++/Tests/particles.basic.txt"); <br> -* if(!loader.isValide()){ <br> +* if(!loader.hasNotFinished()){ <br> * std::cout << "Loader Error\n"; <br> * return 1; <br> * } <br> @@ -46,7 +46,7 @@ public: /** * The constructor need the file name * @param filename the name of the file to open - * you can test if file is successfuly open by calling isValide() + * you can test if file is successfuly open by calling hasNotFinished() */ FBasicLoader(const char* const filename): file(filename,std::ifstream::in){ // test if open @@ -72,7 +72,7 @@ public: * To know if file is open and ready to read * @return true if loader can work */ - bool isValide() const{ + bool hasNotFinished() const{ return this->file.is_open() && !this->file.eof(); } diff --git a/Src/Files/FFmaLoader.hpp b/Src/Files/FFmaLoader.hpp index 8cee2b7857e8dca4e064249ec1a5d85905892d07..3219d839f843dcfad098260c7aae91a5e9539767 100644 --- a/Src/Files/FFmaLoader.hpp +++ b/Src/Files/FFmaLoader.hpp @@ -20,7 +20,7 @@ * .... * <code> * FFmaLoader<FBasicParticle> loader("../FMB++/Tests/particles.basic.txt"); <br> -* if(!loader.isValide()){ <br> +* if(!loader.hasNotFinished()){ <br> * std::cout << "Loader Error\n"; <br> * return 1; <br> * } <br> @@ -48,7 +48,7 @@ public: /** * The constructor need the file name * @param filename the name of the file to open - * you can test if file is successfuly open by calling isValide() + * you can test if file is successfuly open by calling hasNotFinished() */ FFmaLoader(const char* const filename): file(filename,std::ifstream::in){ // test if open @@ -75,7 +75,7 @@ public: * To know if file is open and ready to read * @return true if loader can work */ - bool isValide() const{ + bool hasNotFinished() const{ return this->file.is_open() && !this->file.eof(); } diff --git a/Src/Files/FFmaScanfLoader.hpp b/Src/Files/FFmaScanfLoader.hpp index 424a75f64c79f5f7902a331f2d02688cda98a200..3ea998c3fc72caa32b2e55ace3625ed756dc9d2d 100644 --- a/Src/Files/FFmaScanfLoader.hpp +++ b/Src/Files/FFmaScanfLoader.hpp @@ -20,7 +20,7 @@ * .... * <code> * FFmaScanfLoader<FBasicParticle> loader("../FMB++/Tests/particles.basic.txt"); <br> -* if(!loader.isValide()){ <br> +* if(!loader.hasNotFinished()){ <br> * std::cout << "Loader Error\n"; <br> * return 1; <br> * } <br> @@ -48,7 +48,7 @@ public: /** * The constructor need the file name * @param filename the name of the file to open - * you can test if file is successfuly open by calling isValide() + * you can test if file is successfuly open by calling hasNotFinished() */ FFmaScanfLoader(const char* const filename): file(0){ file = fopen(filename,"r"); @@ -83,7 +83,7 @@ public: * To know if file is open and ready to read * @return true if loader can work */ - bool isValide() const{ + bool hasNotFinished() const{ return this->file != NULL; } diff --git a/Src/Files/FFmaTsmLoader.hpp b/Src/Files/FFmaTsmLoader.hpp index 815648f03f120ad1390d287c27bbbd15f1c7d9e9..4ed5710b0cf40e82459ba961fa068bd688e64691 100644 --- a/Src/Files/FFmaTsmLoader.hpp +++ b/Src/Files/FFmaTsmLoader.hpp @@ -20,7 +20,7 @@ * .... * <code> * FFmaTsmLoader<FBasicParticle> loader("../FMB++/Tests/particles.basic.txt"); <br> -* if(!loader.isValide()){ <br> +* if(!loader.hasNotFinished()){ <br> * std::cout << "Loader Error\n"; <br> * return 1; <br> * } <br> @@ -48,7 +48,7 @@ public: /** * The constructor need the file name * @param filename the name of the file to open - * you can test if file is successfuly open by calling isValide() + * you can test if file is successfuly open by calling hasNotFinished() */ FFmaTsmLoader(const char* const filename): file(filename,std::ifstream::in){ // test if open @@ -75,7 +75,7 @@ public: * To know if file is open and ready to read * @return true if loader can work */ - bool isValide() const{ + bool hasNotFinished() const{ return this->file.is_open() && !this->file.eof(); } diff --git a/Src/Files/FHLoader.hpp b/Src/Files/FHLoader.hpp index 8eb915c202c82e9e6d44924eaa39ffde169c5dc5..eb0732b95f76c4e417342e80b56d3c9e6facfcd4 100644 --- a/Src/Files/FHLoader.hpp +++ b/Src/Files/FHLoader.hpp @@ -20,7 +20,7 @@ * .... * <code> * FHLoader<FBasicParticle> loader("../FMB++/Tests/particles.basic.txt"); <br> -* if(!loader.isValide()){ <br> +* if(!loader.hasNotFinished()){ <br> * std::cout << "Loader Error\n"; <br> * return 1; <br> * } <br> @@ -48,7 +48,7 @@ public: /** * The constructor need the file name * @param filename the name of the file to open - * you can test if file is successfuly open by calling isValide() + * you can test if file is successfuly open by calling hasNotFinished() */ FHLoader(const char* const filename): file(0){ file = fopen(filename,"r"); @@ -86,7 +86,7 @@ public: * To know if file is open and ready to read * @return true if loader can work */ - bool isValide() const{ + bool hasNotFinished() const{ return this->file != NULL; } diff --git a/Src/Fmb/FFmbKernels.hpp b/Src/Fmb/FFmbKernels.hpp index eb52bc1709b5f8d6ea8f1bf94c07b7705f430c09..b7bd211764cff41ad06059b917c110240c8afff3 100644 --- a/Src/Fmb/FFmbKernels.hpp +++ b/Src/Fmb/FFmbKernels.hpp @@ -666,23 +666,23 @@ public: FTRACE( FTrace::Controller.enterFunction(FTrace::KERNELS, __FUNCTION__ , __FILE__ , __LINE__) ); for(typename FList<ParticleClass>::ConstBasicIterator iterParticle(*inParticles); - iterParticle.isValide() ; iterParticle.gotoNext()){ + iterParticle.hasNotFinished() ; iterParticle.gotoNext()){ - //std::cout << "Working on part " << iterParticle.value()->getPhysicalValue() << "\n"; - //F3DPosition tempPos = iterParticle.value()->getPosition() - inPole->getPosition(); + //std::cout << "Working on part " << iterParticle.data()->getPhysicalValue() << "\n"; + //F3DPosition tempPos = iterParticle.data()->getPosition() - inPole->getPosition(); //ok printf("\tpos_rel.x=%e\tpos_rel.y=%e\tpos_rel.z=%e\n",tempPos.getX(),tempPos.getY(),tempPos.getZ()); //ok printf("\tp_center.x=%e\tp_center.y=%e\tp_center.z=%e\n",inPole->getPosition().getX(),inPole->getPosition().getY(),inPole->getPosition().getZ()); - //ok printf("\tbody.x=%e\tbody.y=%e\tbody.z=%e\n",iterParticle.value()->getPosition().getX(),iterParticle.value()->getPosition().getY(),iterParticle.value()->getPosition().getZ()); + //ok printf("\tbody.x=%e\tbody.y=%e\tbody.z=%e\n",iterParticle.data()->getPosition().getX(),iterParticle.data()->getPosition().getY(),iterParticle.data()->getPosition().getZ()); - harmonicInner(positionTsmphere(iterParticle.value().getPosition() - inPole->getPosition()),current_thread_Y); + harmonicInner(positionTsmphere(iterParticle.data().getPosition() - inPole->getPosition()),current_thread_Y); //printf("\tr=%e\tcos_theta=%e\tsin_theta=%e\tphi=%e\n",spherical.r,spherical.cosTheta,spherical.sinTheta,spherical.phi); FComplexe* p_exp_term = inPole->getMultipole(); FComplexe* p_Y_term = current_thread_Y; FReal pow_of_minus_1_j = 1.0;//(-1)^j - const FReal valueParticle = iterParticle.value().getPhysicalValue(); + const FReal valueParticle = iterParticle.data().getPhysicalValue(); for(int j = 0 ; j <= FMB_Info_P ; ++j, pow_of_minus_1_j = -pow_of_minus_1_j ){ for(int k = 0 ; k <= j ; ++k, ++p_Y_term, ++p_exp_term){ @@ -1072,25 +1072,25 @@ public: void L2P(const CellClass* const local, FList<ParticleClass>* const particles){ FTRACE( FTrace::Controller.enterFunction(FTrace::KERNELS, __FUNCTION__ , __FILE__ , __LINE__) ); typename FList<ParticleClass>::BasicIterator iterTarget(*particles); - while( iterTarget.isValide() ){ + while( iterTarget.hasNotFinished() ){ //printf("Morton %lld\n",local->getMortonIndex()); F3DPosition force_vector_in_local_base; Spherical spherical; - spherical = positionTsmphere( iterTarget.value().getPosition() - local->getPosition()); + spherical = positionTsmphere( iterTarget.data().getPosition() - local->getPosition()); /*printf("\t\t bodies_it_Get_p_position(&it) x = %lf \t y = %lf \t z = %lf \n", - (iterTarget.value()->getPosition()).getX(), - (iterTarget.value()->getPosition()).getY(), - (iterTarget.value()->getPosition()).getZ()); + (iterTarget.data()->getPosition()).getX(), + (iterTarget.data()->getPosition()).getY(), + (iterTarget.data()->getPosition()).getZ()); printf("\t\t p_leaf_center x = %lf \t y = %lf \t z = %lf \n", (local->getPosition()).getX(), (local->getPosition()).getY(), (local->getPosition()).getZ());*/ /*printf("\t\t p_position_to_leaf_center x = %lf \t y = %lf \t z = %lf \n", - (iterTarget.value()->getPosition() - local->getPosition()).getX(), - (iterTarget.value()->getPosition() - local->getPosition()).getY(), - (iterTarget.value()->getPosition() - local->getPosition()).getZ());*/ + (iterTarget.data()->getPosition() - local->getPosition()).getX(), + (iterTarget.data()->getPosition() - local->getPosition()).getY(), + (iterTarget.data()->getPosition() - local->getPosition()).getZ());*/ /*printf("\t\t phi = %lf \t cos = %lf \t sin = %lf \t r= %lf \n", spherical.phi,spherical.cosTheta,spherical.sinTheta,spherical.r);*/ @@ -1267,20 +1267,20 @@ public: //#ifndef _DIRECT_MATRIX_ // When _DIRECT_MATRIX_ is defined, this multiplication is done in 'leaf_Sum_near_and_far_fields()' - force_vector_tmp *= iterTarget.value().getPhysicalValue(); + force_vector_tmp *= iterTarget.data().getPhysicalValue(); //#endif /*printf("[force_vector_tmp] fx = %e \t fy = %e \t fz = %e \n", force_vector_tmp.getX(),force_vector_tmp.getY(),force_vector_tmp.getZ());*/ - iterTarget.value().setForces( iterTarget.value().getForces() + force_vector_tmp ); + iterTarget.data().setForces( iterTarget.data().getForces() + force_vector_tmp ); FReal potential; expansion_Evaluate_local_with_Y_already_computed(local->getLocal(),&potential); - iterTarget.value().setPotential(potential); + iterTarget.data().setPotential(potential); /*printf("[END] fx = %e \t fy = %e \t fz = %e \n\n", - iterTarget.value()->getForces().getX(),iterTarget.value()->getForces().getY(),iterTarget.value()->getForces().getZ());*/ + iterTarget.data()->getForces().getX(),iterTarget.data()->getForces().getY(),iterTarget.data()->getForces().getZ());*/ //printf("p_potential = %lf\n", potential); iterTarget.gotoNext(); @@ -1336,14 +1336,14 @@ public: FList<ParticleClass>* const directNeighbors[26], const MortonIndex inNeighborsIndex[26], const int size) { FTRACE( FTrace::Controller.enterFunction(FTrace::KERNELS, __FUNCTION__ , __FILE__ , __LINE__) ); typename FList<ParticleClass>::BasicIterator iterTarget(*targets); - while( iterTarget.isValide() ){ + while( iterTarget.hasNotFinished() ){ for(int idxDirectNeighbors = 0 ; idxDirectNeighbors < size ; ++idxDirectNeighbors){ if(inCurrentIndex < inNeighborsIndex[idxDirectNeighbors] ){ typename FList<ParticleClass>::BasicIterator iterSource(*directNeighbors[idxDirectNeighbors]); - while( iterSource.isValide() ){ - DIRECT_COMPUTATION_MUTUAL_SOFT(iterTarget.value(), - iterSource.value()); + while( iterSource.hasNotFinished() ){ + DIRECT_COMPUTATION_MUTUAL_SOFT(iterTarget.data(), + iterSource.data()); iterSource.gotoNext(); } } @@ -1351,17 +1351,17 @@ public: typename FList<ParticleClass>::BasicIterator iterSameBox = iterTarget;//(*targets); iterSameBox.gotoNext(); - while( iterSameBox.isValide() ){ - if(&iterSameBox.value() < &iterTarget.value()){ - DIRECT_COMPUTATION_MUTUAL_SOFT(iterTarget.value(), - iterSameBox.value()); + while( iterSameBox.hasNotFinished() ){ + if(&iterSameBox.data() < &iterTarget.data()){ + DIRECT_COMPUTATION_MUTUAL_SOFT(iterTarget.data(), + iterSameBox.data()); } iterSameBox.gotoNext(); } - //printf("x = %e \t y = %e \t z = %e \n",iterTarget.value()->getPosition().getX(),iterTarget.value()->getPosition().getY(),iterTarget.value()->getPosition().getZ()); - //printf("\t P2P fx = %e \t fy = %e \t fz = %e \n",iterTarget.value()->getForces().getX(),iterTarget.value()->getForces().getY(),iterTarget.value()->getForces().getZ()); - //printf("\t potential = %e \n",iterTarget.value()->getPotential()); + //printf("x = %e \t y = %e \t z = %e \n",iterTarget.data()->getPosition().getX(),iterTarget.data()->getPosition().getY(),iterTarget.data()->getPosition().getZ()); + //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.gotoNext(); } @@ -1413,29 +1413,29 @@ public: const FList<ParticleClass>* const directNeighbors[26], const int size) { FTRACE( FTrace::Controller.enterFunction(FTrace::KERNELS, __FUNCTION__ , __FILE__ , __LINE__) ); typename FList<ParticleClass>::BasicIterator iterTarget(*targets); - while( iterTarget.isValide() ){ + while( iterTarget.hasNotFinished() ){ for(int idxDirectNeighbors = 0 ; idxDirectNeighbors < size ; ++idxDirectNeighbors){ typename FList<ParticleClass>::ConstBasicIterator iterSource(*directNeighbors[idxDirectNeighbors]); - while( iterSource.isValide() ){ - DIRECT_COMPUTATION_NO_MUTUAL_SOFT(iterTarget.value(), - iterSource.value()); + while( iterSource.hasNotFinished() ){ + DIRECT_COMPUTATION_NO_MUTUAL_SOFT(iterTarget.data(), + iterSource.data()); iterSource.gotoNext(); } } typename FList<ParticleClass>::ConstBasicIterator iterSameBox(*sources); - while( iterSameBox.isValide() ){ - if(&iterSameBox.value() != &iterTarget.value()){ - DIRECT_COMPUTATION_NO_MUTUAL_SOFT(iterTarget.value(), - iterSameBox.value()); + while( iterSameBox.hasNotFinished() ){ + if(&iterSameBox.data() != &iterTarget.data()){ + DIRECT_COMPUTATION_NO_MUTUAL_SOFT(iterTarget.data(), + iterSameBox.data()); } iterSameBox.gotoNext(); } - //printf("x = %e \t y = %e \t z = %e \n",iterTarget.value()->getPosition().getX(),iterTarget.value()->getPosition().getY(),iterTarget.value()->getPosition().getZ()); - //printf("\t P2P fx = %e \t fy = %e \t fz = %e \n",iterTarget.value()->getForces().getX(),iterTarget.value()->getForces().getY(),iterTarget.value()->getForces().getZ()); - //printf("\t potential = %e \n",iterTarget.value()->getPotential()); + //printf("x = %e \t y = %e \t z = %e \n",iterTarget.data()->getPosition().getX(),iterTarget.data()->getPosition().getY(),iterTarget.data()->getPosition().getZ()); + //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.gotoNext(); } diff --git a/Src/Fmb/FFmbKernelsBlas.hpp b/Src/Fmb/FFmbKernelsBlas.hpp index 154dced395a5ac76e6a20dca7f21fbbd2bcd2c7c..94ba3b90c2eb7a1cb454161935598d5ba712d94a 100644 --- a/Src/Fmb/FFmbKernelsBlas.hpp +++ b/Src/Fmb/FFmbKernelsBlas.hpp @@ -677,23 +677,23 @@ public: FTRACE( FTrace::Controller.enterFunction(FTrace::KERNELS, __FUNCTION__ , __FILE__ , __LINE__) ); for(typename FList<ParticleClass>::ConstBasicIterator iterParticle(*inParticles); - iterParticle.isValide() ; iterParticle.gotoNext()){ + iterParticle.hasNotFinished() ; iterParticle.gotoNext()){ - //std::cout << "Working on part " << iterParticle.value()->getPhysicalValue() << "\n"; - //F3DPosition tempPos = iterParticle.value()->getPosition() - inPole->getPosition(); + //std::cout << "Working on part " << iterParticle.data()->getPhysicalValue() << "\n"; + //F3DPosition tempPos = iterParticle.data()->getPosition() - inPole->getPosition(); //ok printf("\tpos_rel.x=%e\tpos_rel.y=%e\tpos_rel.z=%e\n",tempPos.getX(),tempPos.getY(),tempPos.getZ()); //ok printf("\tp_center.x=%e\tp_center.y=%e\tp_center.z=%e\n",inPole->getPosition().getX(),inPole->getPosition().getY(),inPole->getPosition().getZ()); - //ok printf("\tbody.x=%e\tbody.y=%e\tbody.z=%e\n",iterParticle.value()->getPosition().getX(),iterParticle.value()->getPosition().getY(),iterParticle.value()->getPosition().getZ()); + //ok printf("\tbody.x=%e\tbody.y=%e\tbody.z=%e\n",iterParticle.data()->getPosition().getX(),iterParticle.data()->getPosition().getY(),iterParticle.data()->getPosition().getZ()); - harmonicInner(positionTsmphere(iterParticle.value()->getPosition() - inPole->getPosition()),current_thread_Y); + harmonicInner(positionTsmphere(iterParticle.data()->getPosition() - inPole->getPosition()),current_thread_Y); //ok printf("\tr=%e\tcos_theta=%e\tsin_theta=%e\tphi=%e\n",spherical.r,spherical.cosTheta,spherical.sinTheta,spherical.phi); FComplexe* p_exp_term = inPole->getMultipole(); FComplexe* p_Y_term = current_thread_Y; FReal pow_of_minus_1_j = 1.0;//(-1)^j - const FReal valueParticle = iterParticle.value().getPhysicalValue(); + const FReal valueParticle = iterParticle.data().getPhysicalValue(); for(int j = 0 ; j <= FMB_Info_P ; ++j, pow_of_minus_1_j = -pow_of_minus_1_j ){ for(int k = 0 ; k <= j ; ++k, ++p_Y_term, ++p_exp_term){ @@ -1122,25 +1122,25 @@ public: void L2P(const CellClass* const local, FList<ParticleClass>* const particles){ FTRACE( FTrace::Controller.enterFunction(FTrace::KERNELS, __FUNCTION__ , __FILE__ , __LINE__) ); typename FList<ParticleClass>::BasicIterator iterTarget(*particles); - while( iterTarget.isValide() ){ + while( iterTarget.hasNotFinished() ){ //printf("Morton %lld\n",local->getMortonIndex()); F3DPosition force_vector_in_local_base; typename FFmbKernelsBlas<ParticleClass,CellClass,TreeHeight>::Spherical spherical; - spherical = positionTsmphere( iterTarget.value()->getPosition() - local->getPosition()); + spherical = positionTsmphere( iterTarget.data()->getPosition() - local->getPosition()); /*printf("\t\t bodies_it_Get_p_position(&it) x = %lf \t y = %lf \t z = %lf \n", - (iterTarget.value()->getPosition()).getX(), - (iterTarget.value()->getPosition()).getY(), - (iterTarget.value()->getPosition()).getZ()); + (iterTarget.data()->getPosition()).getX(), + (iterTarget.data()->getPosition()).getY(), + (iterTarget.data()->getPosition()).getZ()); printf("\t\t p_leaf_center x = %lf \t y = %lf \t z = %lf \n", (local->getPosition()).getX(), (local->getPosition()).getY(), (local->getPosition()).getZ());*/ /*printf("\t\t p_position_to_leaf_center x = %lf \t y = %lf \t z = %lf \n", - (iterTarget.value()->getPosition() - local->getPosition()).getX(), - (iterTarget.value()->getPosition() - local->getPosition()).getY(), - (iterTarget.value()->getPosition() - local->getPosition()).getZ());*/ + (iterTarget.data()->getPosition() - local->getPosition()).getX(), + (iterTarget.data()->getPosition() - local->getPosition()).getY(), + (iterTarget.data()->getPosition() - local->getPosition()).getZ());*/ /*printf("\t\t phi = %lf \t cos = %lf \t sin = %lf \t r= %lf \n", spherical.phi,spherical.cosTheta,spherical.sinTheta,spherical.r);*/ @@ -1317,20 +1317,20 @@ public: //#ifndef _DIRECT_MATRIX_ // When _DIRECT_MATRIX_ is defined, this multiplication is done in 'leaf_Sum_near_and_far_fields()' - force_vector_tmp *= iterTarget.value().getPhysicalValue(); + force_vector_tmp *= iterTarget.data().getPhysicalValue(); //#endif /*printf("[force_vector_tmp] fx = %e \t fy = %e \t fz = %e \n", force_vector_tmp.getX(),force_vector_tmp.getY(),force_vector_tmp.getZ());*/ - iterTarget.value()->setForces( iterTarget.value().getForces() + force_vector_tmp ); + iterTarget.data()->setForces( iterTarget.data().getForces() + force_vector_tmp ); FReal potential; expansion_Evaluate_local_with_Y_already_computed(local->getLocal(),&potential); - iterTarget.value().setPotential(potential); + iterTarget.data().setPotential(potential); /*printf("[END] fx = %e \t fy = %e \t fz = %e \n\n", - iterTarget.value()->getForces().getX(),iterTarget.value()->getForces().getY(),iterTarget.value()->getForces().getZ());*/ + iterTarget.data()->getForces().getX(),iterTarget.data()->getForces().getY(),iterTarget.data()->getForces().getZ());*/ //printf("p_potential = %lf\n", potential); iterTarget.gotoNext(); @@ -1387,14 +1387,14 @@ public: FList<ParticleClass>* const directNeighbors[26], const MortonIndex inNeighborsIndex[26], const int size) { FTRACE( FTrace::Controller.enterFunction(FTrace::KERNELS, __FUNCTION__ , __FILE__ , __LINE__) ); typename FList<ParticleClass>::BasicIterator iterTarget(*targets); - while( iterTarget.isValide() ){ + while( iterTarget.hasNotFinished() ){ for(int idxDirectNeighbors = 0 ; idxDirectNeighbors < size ; ++idxDirectNeighbors){ if(inCurrentIndex < inNeighborsIndex[idxDirectNeighbors] ){ typename FList<ParticleClass>::BasicIterator iterSource(*directNeighbors[idxDirectNeighbors]); - while( iterSource.isValide() ){ - DIRECT_COMPUTATION_MUTUAL_SOFT(iterTarget.value(), - iterSource.value()); + while( iterSource.hasNotFinished() ){ + DIRECT_COMPUTATION_MUTUAL_SOFT(iterTarget.data(), + iterSource.data()); iterSource.gotoNext(); } } @@ -1402,17 +1402,17 @@ public: typename FList<ParticleClass>::BasicIterator iterSameBox = iterTarget;//(*targets); iterSameBox.gotoNext(); - while( iterSameBox.isValide() ){ - if(&iterSameBox.value() < &iterTarget.value()){ - DIRECT_COMPUTATION_MUTUAL_SOFT(iterTarget.value(), - iterSameBox.value()); + while( iterSameBox.hasNotFinished() ){ + if(&iterSameBox.data() < &iterTarget.data()){ + DIRECT_COMPUTATION_MUTUAL_SOFT(iterTarget.data(), + iterSameBox.data()); } iterSameBox.gotoNext(); } - //printf("x = %e \t y = %e \t z = %e \n",iterTarget.value()->getPosition().getX(),iterTarget.value()->getPosition().getY(),iterTarget.value()->getPosition().getZ()); - //printf("\t P2P fx = %e \t fy = %e \t fz = %e \n",iterTarget.value()->getForces().getX(),iterTarget.value()->getForces().getY(),iterTarget.value()->getForces().getZ()); - //printf("\t potential = %e \n",iterTarget.value()->getPotential()); + //printf("x = %e \t y = %e \t z = %e \n",iterTarget.data()->getPosition().getX(),iterTarget.data()->getPosition().getY(),iterTarget.data()->getPosition().getZ()); + //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.gotoNext(); } @@ -1464,29 +1464,29 @@ public: const FList<ParticleClass>* const directNeighbors[26], const int size) { FTRACE( FTrace::Controller.enterFunction(FTrace::KERNELS, __FUNCTION__ , __FILE__ , __LINE__) ); typename FList<ParticleClass>::BasicIterator iterTarget(*targets); - while( iterTarget.isValide() ){ + while( iterTarget.hasNotFinished() ){ for(int idxDirectNeighbors = 0 ; idxDirectNeighbors < size ; ++idxDirectNeighbors){ typename FList<ParticleClass>::ConstBasicIterator iterSource(*directNeighbors[idxDirectNeighbors]); - while( iterSource.isValide() ){ - DIRECT_COMPUTATION_NO_MUTUAL_SOFT(iterTarget.value(), - iterSource.value()); + while( iterSource.hasNotFinished() ){ + DIRECT_COMPUTATION_NO_MUTUAL_SOFT(iterTarget.data(), + iterSource.data()); iterSource.gotoNext(); } } typename FList<ParticleClass>::ConstBasicIterator iterSameBox(*sources); - while( iterSameBox.isValide() ){ - if(&iterSameBox.value() != &iterTarget.value()){ - DIRECT_COMPUTATION_NO_MUTUAL_SOFT(iterTarget.value(), - iterSameBox.value()); + while( iterSameBox.hasNotFinished() ){ + if(&iterSameBox.data() != &iterTarget.data()){ + DIRECT_COMPUTATION_NO_MUTUAL_SOFT(iterTarget.data(), + iterSameBox.data()); } iterSameBox.gotoNext(); } - //printf("x = %e \t y = %e \t z = %e \n",iterTarget.value()->getPosition().getX(),iterTarget.value()->getPosition().getY(),iterTarget.value()->getPosition().getZ()); - //printf("\t P2P fx = %e \t fy = %e \t fz = %e \n",iterTarget.value()->getForces().getX(),iterTarget.value()->getForces().getY(),iterTarget.value()->getForces().getZ()); - //printf("\t potential = %e \n",iterTarget.value()->getPotential()); + //printf("x = %e \t y = %e \t z = %e \n",iterTarget.data()->getPosition().getX(),iterTarget.data()->getPosition().getY(),iterTarget.data()->getPosition().getZ()); + //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.gotoNext(); } diff --git a/Src/Fmb/FFmbKernelsBlockBlas.hpp b/Src/Fmb/FFmbKernelsBlockBlas.hpp index bec094942909f98c4aa8ac401e74f40df14c4a42..4e53a75dc7875f07459628a602c07cc0ced74e99 100644 --- a/Src/Fmb/FFmbKernelsBlockBlas.hpp +++ b/Src/Fmb/FFmbKernelsBlockBlas.hpp @@ -854,23 +854,23 @@ public: FTRACE( FTrace::Controller.enterFunction(FTrace::KERNELS, __FUNCTION__ , __FILE__ , __LINE__) ); for(typename FList<ParticleClass>::ConstBasicIterator iterParticle(*inParticles); - iterParticle.isValide() ; iterParticle.gotoNext()){ + iterParticle.hasNotFinished() ; iterParticle.gotoNext()){ - //std::cout << "Working on part " << iterParticle.value()->getPhysicalValue() << "\n"; - //F3DPosition tempPos = iterParticle.value()->getPosition() - inPole->getPosition(); + //std::cout << "Working on part " << iterParticle.data()->getPhysicalValue() << "\n"; + //F3DPosition tempPos = iterParticle.data()->getPosition() - inPole->getPosition(); //ok printf("\tpos_rel.x=%.15e\tpos_rel.y=%.15e\tpos_rel.z=%.15e\n",tempPos.getX(),tempPos.getY(),tempPos.getZ()); //ok printf("\tp_center.x=%.15e\tp_center.y=%.15e\tp_center.z=%.15e\n",inPole->getPosition().getX(),inPole->getPosition().getY(),inPole->getPosition().getZ()); - //ok printf("\tbody.x=%.15e\tbody.y=%.15e\tbody.z=%.15e\n",iterParticle.value()->getPosition().getX(),iterParticle.value()->getPosition().getY(),iterParticle.value()->getPosition().getZ()); + //ok printf("\tbody.x=%.15e\tbody.y=%.15e\tbody.z=%.15e\n",iterParticle.data()->getPosition().getX(),iterParticle.data()->getPosition().getY(),iterParticle.data()->getPosition().getZ()); - harmonicInner(positionTsmphere(iterParticle.value().getPosition() - inPole->getPosition()),current_thread_Y); + harmonicInner(positionTsmphere(iterParticle.data().getPosition() - inPole->getPosition()),current_thread_Y); //ok printf("\tr=%.15e\tcos_theta=%.15e\tsin_theta=%.15e\tphi=%.15e\n",spherical.r,spherical.cosTheta,spherical.sinTheta,spherical.phi); FComplexe* p_exp_term = inPole->getMultipole(); FComplexe* p_Y_term = current_thread_Y; FReal pow_of_minus_1_j = 1.0;//(-1)^j - const FReal valueParticle = iterParticle.value().getPhysicalValue(); + const FReal valueParticle = iterParticle.data().getPhysicalValue(); for(int j = 0 ; j <= FMB_Info_P ; ++j, pow_of_minus_1_j = -pow_of_minus_1_j ){ for(int k = 0 ; k <= j ; ++k, ++p_Y_term, ++p_exp_term){ @@ -1376,25 +1376,25 @@ public: void L2P(const CellClass* const local, FList<ParticleClass>* const particles){ FTRACE( FTrace::Controller.enterFunction(FTrace::KERNELS, __FUNCTION__ , __FILE__ , __LINE__) ); typename FList<ParticleClass>::BasicIterator iterTarget(*particles); - while( iterTarget.isValide() ){ + while( iterTarget.hasNotFinished() ){ //printf("Morton %lld\n",local->getMortonIndex()); F3DPosition force_vector_in_local_base; typename FFmbKernelsBlockBlas<ParticleClass,CellClass,TreeHeight>::Spherical spherical; - spherical = positionTsmphere( iterTarget.value().getPosition() - local->getPosition()); + spherical = positionTsmphere( iterTarget.data().getPosition() - local->getPosition()); /*printf("\t\t bodies_it_Get_p_position(&it) x = %lf \t y = %lf \t z = %lf \n", - (iterTarget.value()->getPosition()).getX(), - (iterTarget.value()->getPosition()).getY(), - (iterTarget.value()->getPosition()).getZ()); + (iterTarget.data()->getPosition()).getX(), + (iterTarget.data()->getPosition()).getY(), + (iterTarget.data()->getPosition()).getZ()); printf("\t\t p_leaf_center x = %lf \t y = %lf \t z = %lf \n", (local->getPosition()).getX(), (local->getPosition()).getY(), (local->getPosition()).getZ());*/ /*printf("\t\t p_position_to_leaf_center x = %lf \t y = %lf \t z = %lf \n", - (iterTarget.value()->getPosition() - local->getPosition()).getX(), - (iterTarget.value()->getPosition() - local->getPosition()).getY(), - (iterTarget.value()->getPosition() - local->getPosition()).getZ());*/ + (iterTarget.data()->getPosition() - local->getPosition()).getX(), + (iterTarget.data()->getPosition() - local->getPosition()).getY(), + (iterTarget.data()->getPosition() - local->getPosition()).getZ());*/ /*printf("\t\t phi = %lf \t cos = %lf \t sin = %lf \t r= %lf \n", spherical.phi,spherical.cosTheta,spherical.sinTheta,spherical.r);*/ @@ -1571,20 +1571,20 @@ public: //#ifndef _DIRECT_MATRIX_ // When _DIRECT_MATRIX_ is defined, this multiplication is done in 'leaf_Sum_near_and_far_fields()' - force_vector_tmp *= iterTarget.value().getPhysicalValue(); + force_vector_tmp *= iterTarget.data().getPhysicalValue(); //#endif /*printf("[force_vector_tmp] fx = %.15e \t fy = %.15e \t fz = %.15e \n", force_vector_tmp.getX(),force_vector_tmp.getY(),force_vector_tmp.getZ());*/ - iterTarget.value().setForces( iterTarget.value().getForces() + force_vector_tmp ); + iterTarget.data().setForces( iterTarget.data().getForces() + force_vector_tmp ); FReal potential; expansion_Evaluate_local_with_Y_already_computed(local->getLocal(),&potential); - iterTarget.value().setPotential(potential); + iterTarget.data().setPotential(potential); /*printf("[END] fx = %.15e \t fy = %.15e \t fz = %.15e \n\n", - iterTarget.value()->getForces().getX(),iterTarget.value()->getForces().getY(),iterTarget.value()->getForces().getZ());*/ + iterTarget.data()->getForces().getX(),iterTarget.data()->getForces().getY(),iterTarget.data()->getForces().getZ());*/ //printf("p_potential = %lf\n", potential); iterTarget.gotoNext(); @@ -1640,14 +1640,14 @@ public: FList<ParticleClass>* const directNeighbors[26], const MortonIndex inNeighborsIndex[26], const int size) { FTRACE( FTrace::Controller.enterFunction(FTrace::KERNELS, __FUNCTION__ , __FILE__ , __LINE__) ); typename FList<ParticleClass>::BasicIterator iterTarget(*targets); - while( iterTarget.isValide() ){ + while( iterTarget.hasNotFinished() ){ for(int idxDirectNeighbors = 0 ; idxDirectNeighbors < size ; ++idxDirectNeighbors){ if(inCurrentIndex < inNeighborsIndex[idxDirectNeighbors] ){ typename FList<ParticleClass>::BasicIterator iterSource(*directNeighbors[idxDirectNeighbors]); - while( iterSource.isValide() ){ - DIRECT_COMPUTATION_MUTUAL_SOFT(iterTarget.value(), - iterSource.value()); + while( iterSource.hasNotFinished() ){ + DIRECT_COMPUTATION_MUTUAL_SOFT(iterTarget.data(), + iterSource.data()); iterSource.gotoNext(); } } @@ -1655,17 +1655,17 @@ public: typename FList<ParticleClass>::BasicIterator iterSameBox = iterTarget;//(*targets); iterSameBox.gotoNext(); - while( iterSameBox.isValide() ){ - if(&iterSameBox.value() < &iterTarget.value()){ - DIRECT_COMPUTATION_MUTUAL_SOFT(iterTarget.value(), - iterSameBox.value()); + while( iterSameBox.hasNotFinished() ){ + if(&iterSameBox.data() < &iterTarget.data()){ + DIRECT_COMPUTATION_MUTUAL_SOFT(iterTarget.data(), + iterSameBox.data()); } iterSameBox.gotoNext(); } - //printf("x = %e \t y = %e \t z = %e \n",iterTarget.value()->getPosition().getX(),iterTarget.value()->getPosition().getY(),iterTarget.value()->getPosition().getZ()); - //printf("\t P2P fx = %e \t fy = %e \t fz = %e \n",iterTarget.value()->getForces().getX(),iterTarget.value()->getForces().getY(),iterTarget.value()->getForces().getZ()); - //printf("\t potential = %e \n",iterTarget.value()->getPotential()); + //printf("x = %e \t y = %e \t z = %e \n",iterTarget.data()->getPosition().getX(),iterTarget.data()->getPosition().getY(),iterTarget.data()->getPosition().getZ()); + //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.gotoNext(); } @@ -1717,29 +1717,29 @@ public: const FList<ParticleClass>* const directNeighbors[26], const int size) { FTRACE( FTrace::Controller.enterFunction(FTrace::KERNELS, __FUNCTION__ , __FILE__ , __LINE__) ); typename FList<ParticleClass>::BasicIterator iterTarget(*targets); - while( iterTarget.isValide() ){ + while( iterTarget.hasNotFinished() ){ for(int idxDirectNeighbors = 0 ; idxDirectNeighbors < size ; ++idxDirectNeighbors){ typename FList<ParticleClass>::ConstBasicIterator iterSource(*directNeighbors[idxDirectNeighbors]); - while( iterSource.isValide() ){ - DIRECT_COMPUTATION_NO_MUTUAL_SOFT(iterTarget.value(), - iterSource.value()); + while( iterSource.hasNotFinished() ){ + DIRECT_COMPUTATION_NO_MUTUAL_SOFT(iterTarget.data(), + iterSource.data()); iterSource.gotoNext(); } } typename FList<ParticleClass>::ConstBasicIterator iterSameBox(*sources); - while( iterSameBox.isValide() ){ - if(&iterSameBox.value() != &iterTarget.value()){ - DIRECT_COMPUTATION_NO_MUTUAL_SOFT(iterTarget.value(), - iterSameBox.value()); + while( iterSameBox.hasNotFinished() ){ + if(&iterSameBox.data() != &iterTarget.data()){ + DIRECT_COMPUTATION_NO_MUTUAL_SOFT(iterTarget.data(), + iterSameBox.data()); } iterSameBox.gotoNext(); } - //printf("x = %e \t y = %e \t z = %e \n",iterTarget.value()->getPosition().getX(),iterTarget.value()->getPosition().getY(),iterTarget.value()->getPosition().getZ()); - //printf("\t P2P fx = %e \t fy = %e \t fz = %e \n",iterTarget.value()->getForces().getX(),iterTarget.value()->getForces().getY(),iterTarget.value()->getForces().getZ()); - //printf("\t potential = %e \n",iterTarget.value()->getPotential()); + //printf("x = %e \t y = %e \t z = %e \n",iterTarget.data()->getPosition().getX(),iterTarget.data()->getPosition().getY(),iterTarget.data()->getPosition().getZ()); + //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.gotoNext(); } diff --git a/Tests/testFmbAlgorithm.cpp b/Tests/testFmbAlgorithm.cpp index 434e088cec7dc0bdfdba25f8193466b4b347c69f..e7613266213e2e24dbcc090c3566060e410b432d 100644 --- a/Tests/testFmbAlgorithm.cpp +++ b/Tests/testFmbAlgorithm.cpp @@ -78,7 +78,7 @@ int main(int argc, char ** argv){ } FFmaLoader<FmbParticle> loader(filename); - if(!loader.isValide()){ + if(!loader.hasNotFinished()){ std::cout << "Loader Error, " << filename << " is missing\n"; return 1; } @@ -122,12 +122,12 @@ int main(int argc, char ** argv){ octreeIterator.gotoBottomLeft(); do{ FList<FmbParticle>::ConstBasicIterator iter(*octreeIterator.getCurrentListTargets()); - while( iter.isValide() ){ - potential += iter.value().getPotential() * iter.value().getPhysicalValue(); - forces += iter.value().getForces(); + while( iter.hasNotFinished() ){ + potential += iter.data().getPotential() * iter.data().getPhysicalValue(); + forces += iter.data().getForces(); - //printf("x = %e y = %e z = %e \n",iter.value()->getPosition().getX(),iter.value()->getPosition().getY(),iter.value()->getPosition().getZ()); - //printf("\t fx = %e fy = %e fz = %e \n",iter.value()->getForces().getX(),iter.value()->getForces().getY(),iter.value()->getForces().getZ()); + //printf("x = %e y = %e z = %e \n",iter.data()->getPosition().getX(),iter.data()->getPosition().getY(),iter.data()->getPosition().getZ()); + //printf("\t fx = %e fy = %e fz = %e \n",iter.data()->getForces().getX(),iter.data()->getForces().getY(),iter.data()->getForces().getZ()); //printf("\t\t Sum Forces ( %e , %e , %e)\n", //forces.getX(),forces.getY(),forces.getZ()); diff --git a/Tests/testFmbAlgorithmProc.cpp b/Tests/testFmbAlgorithmProc.cpp index e45b268656607fc82f1e58601c860016b4dd1e67..c83ac59fffff54d1a96d484a0a9160b3a59ad871 100644 --- a/Tests/testFmbAlgorithmProc.cpp +++ b/Tests/testFmbAlgorithmProc.cpp @@ -218,22 +218,22 @@ void ValidateFMMAlgoProc(FOctree<ParticleClass, CellClass, LeafClass, OctreeHeig std::cout << idx << " Index are differents " << std::endl; } - while( iter.isValide() && iterValide.isValide() ){ + while( iter.hasNotFinished() && iterValide.hasNotFinished() ){ // If a particles has been impacted by less than NbPart - 1 (the current particle) // there is a problem - if( iterValide.value().getPotential() != iter.value().getPotential() ){ - std::cout << idx << " Potential error : " << iterValide.value().getPotential() << " " << iter.value().getPotential() << "\n"; + if( iterValide.data().getPotential() != iter.data().getPotential() ){ + std::cout << idx << " Potential error : " << iterValide.data().getPotential() << " " << iter.data().getPotential() << "\n"; } - if( !FMath::LookEqual(iterValide.value().getForces().getX(),iter.value().getForces().getX()) - || !FMath::LookEqual(iterValide.value().getForces().getY(),iter.value().getForces().getY()) - || !FMath::LookEqual(iterValide.value().getForces().getZ(),iter.value().getForces().getZ()) ){ - /*std::cout << idx << " Forces error : " << (iterValide.value().getForces().getX() - iter.value().getForces().getX()) - << " " << (iterValide.value().getForces().getY() - iter.value().getForces().getY()) - << " " << (iterValide.value().getForces().getZ() - iter.value().getForces().getZ()) << "\n";*/ - std::cout << idx << " Forces error : x " << iterValide.value().getForces().getX() << " " << iter.value().getForces().getX() - << " y " << iterValide.value().getForces().getY() << " " << iter.value().getForces().getY() - << " z " << iterValide.value().getForces().getZ() << " " << iter.value().getForces().getZ() << "\n"; + if( !FMath::LookEqual(iterValide.data().getForces().getX(),iter.data().getForces().getX()) + || !FMath::LookEqual(iterValide.data().getForces().getY(),iter.data().getForces().getY()) + || !FMath::LookEqual(iterValide.data().getForces().getZ(),iter.data().getForces().getZ()) ){ + /*std::cout << idx << " Forces error : " << (iterValide.data().getForces().getX() - iter.data().getForces().getX()) + << " " << (iterValide.data().getForces().getY() - iter.data().getForces().getY()) + << " " << (iterValide.data().getForces().getZ() - iter.data().getForces().getZ()) << "\n";*/ + std::cout << idx << " Forces error : x " << iterValide.data().getForces().getX() << " " << iter.data().getForces().getX() + << " y " << iterValide.data().getForces().getY() << " " << iter.data().getForces().getY() + << " z " << iterValide.data().getForces().getZ() << " " << iter.data().getForces().getZ() << "\n"; } iter.gotoNext(); iterValide.gotoNext(); @@ -274,7 +274,7 @@ int main(int argc, char ** argv){ } FFmaLoader<FmbParticle> loader(filename); - if(!loader.isValide()){ + if(!loader.hasNotFinished()){ std::cout << "Loader Error, " << filename << " is missing\n"; return 1; } @@ -355,16 +355,16 @@ int main(int argc, char ** argv){ #ifdef VALIDATE_FMM FList<FmbParticle>::ConstBasicIterator iterValide(*octreeIteratorValide.getCurrentListTargets()); #endif - while( iter.isValide() + while( iter.hasNotFinished() #ifdef VALIDATE_FMM - && iterValide.isValide() + && iterValide.hasNotFinished() #endif ){ - potential += iter.value().getPotential() * iter.value().getPhysicalValue(); - forces += iter.value().getForces(); + potential += iter.data().getPotential() * iter.data().getPhysicalValue(); + forces += iter.data().getForces(); #ifdef VALIDATE_FMM - potentialValide += iterValide.value().getPotential() * iterValide.value().getPhysicalValue(); - forcesValide += iterValide.value().getForces(); + potentialValide += iterValide.data().getPotential() * iterValide.data().getPhysicalValue(); + forcesValide += iterValide.data().getForces(); iterValide.gotoNext(); #endif iter.gotoNext(); diff --git a/Tests/testFmbBlasAlgorithm.cpp b/Tests/testFmbBlasAlgorithm.cpp index 52c7fc990e215dfdcdd7eec0a08bfb903178a1ab..70ec16eb8ffee9e56e94512c244348150993ba29 100644 --- a/Tests/testFmbBlasAlgorithm.cpp +++ b/Tests/testFmbBlasAlgorithm.cpp @@ -79,7 +79,7 @@ int main(int argc, char ** argv){ } FFmaScanfLoader<FmbParticle> loader(filename); - if(!loader.isValide()){ + if(!loader.hasNotFinished()){ std::cout << "Loader Error, " << filename << " is missing\n"; return 1; } @@ -126,12 +126,12 @@ int main(int argc, char ** argv){ octreeIterator.gotoBottomLeft(); do{ FList<FmbParticle>::ConstBasicIterator iter(*octreeIterator.getCurrentListTargets()); - while( iter.isValide() ){ - potential += iter.value().getPotential() * iter.value().getPhysicalValue(); - forces += iter.value().getForces(); + while( iter.hasNotFinished() ){ + potential += iter.data().getPotential() * iter.data().getPhysicalValue(); + forces += iter.data().getForces(); - //printf("x = %e y = %e z = %e \n",iter.value()->getPosition().getX(),iter.value()->getPosition().getY(),iter.value()->getPosition().getZ()); - //printf("\t fx = %e fy = %e fz = %e \n",iter.value()->getForces().getX(),iter.value()->getForces().getY(),iter.value()->getForces().getZ()); + //printf("x = %e y = %e z = %e \n",iter.data()->getPosition().getX(),iter.data()->getPosition().getY(),iter.data()->getPosition().getZ()); + //printf("\t fx = %e fy = %e fz = %e \n",iter.data()->getForces().getX(),iter.data()->getForces().getY(),iter.data()->getForces().getZ()); //printf("\t\t Sum Forces ( %e , %e , %e)\n", //forces.getX(),forces.getY(),forces.getZ()); diff --git a/Tests/testFmbTsmAlgorithm.cpp b/Tests/testFmbTsmAlgorithm.cpp index 38ad360695e50003048bd9cc3de91cac6804d3b0..662c568a798e22c5ee6d5722ef8b9fc690df51b2 100644 --- a/Tests/testFmbTsmAlgorithm.cpp +++ b/Tests/testFmbTsmAlgorithm.cpp @@ -77,7 +77,7 @@ int main(int argc, char ** argv){ } FFmaTsmLoader<FmbParticle> loader(filename); - if(!loader.isValide()){ + if(!loader.hasNotFinished()){ std::cout << "Loader Error, " << filename << " is missing\n"; return 1; } @@ -123,12 +123,12 @@ int main(int argc, char ** argv){ octreeIterator.gotoBottomLeft(); do{ FList<FmbParticle>::ConstBasicIterator iter(*octreeIterator.getCurrentListTargets()); - while( iter.isValide() ){ - potential += iter.value().getPotential() * iter.value().getPhysicalValue(); - forces += iter.value().getForces(); + while( iter.hasNotFinished() ){ + potential += iter.data().getPotential() * iter.data().getPhysicalValue(); + forces += iter.data().getForces(); - //printf("x = %e y = %e z = %e \n",iter.value()->getPosition().getX(),iter.value()->getPosition().getY(),iter.value()->getPosition().getZ()); - //printf("\t fx = %e fy = %e fz = %e \n",iter.value()->getForces().getX(),iter.value()->getForces().getY(),iter.value()->getForces().getZ()); + //printf("x = %e y = %e z = %e \n",iter.data()->getPosition().getX(),iter.data()->getPosition().getY(),iter.data()->getPosition().getZ()); + //printf("\t fx = %e fy = %e fz = %e \n",iter.data()->getForces().getX(),iter.data()->getForces().getY(),iter.data()->getForces().getZ()); //printf("\t\t Sum Forces ( %e , %e , %e)\n", //forces.getX(),forces.getY(),forces.getZ()); diff --git a/Tests/testFmmAlgorithmProc.cpp b/Tests/testFmmAlgorithmProc.cpp index 92ed495032d51a6b7fae4c262f6802da6a548b9d..a46242b0f06a5ba5390b847bb106f6e06f098342 100644 --- a/Tests/testFmmAlgorithmProc.cpp +++ b/Tests/testFmmAlgorithmProc.cpp @@ -178,12 +178,12 @@ void ValidateFMMAlgoProc(FOctree<ParticleClass, CellClass, LeafClass, OctreeHeig const bool isUsingTsm = (octreeIterator.getCurrentListTargets() != octreeIterator.getCurrentListSrc()); - while( iter.isValide() ){ + while( iter.hasNotFinished() ){ // If a particles has been impacted by less than NbPart - 1 (the current particle) // there is a problem - if( (!isUsingTsm && iter.value().getDataDown() != NbPart - 1) || - (isUsingTsm && iter.value().getDataDown() != NbPart) ){ - std::cout << "Problem L2P + P2P, value on particle is : " << iter.value().getDataDown() << "\n"; + if( (!isUsingTsm && iter.data().getDataDown() != NbPart - 1) || + (isUsingTsm && iter.data().getDataDown() != NbPart) ){ + std::cout << "Problem L2P + P2P, value on particle is : " << iter.data().getDataDown() << "\n"; } iter.gotoNext(); } @@ -240,7 +240,7 @@ int main(int argc, char ** argv){ } FFmaLoader<TestParticle> loader(filename); - if(!loader.isValide()){ + if(!loader.hasNotFinished()){ std::cout << "Loader Error, " << filename << " is missing\n"; return 1; } diff --git a/Tests/testLoader.cpp b/Tests/testLoader.cpp index 7e1a3923a07e3b5852ed44e0f3df43ff33156bba..6b5ba81d44fcdbfcc88e78000cba9c4490bf7804 100644 --- a/Tests/testLoader.cpp +++ b/Tests/testLoader.cpp @@ -59,7 +59,7 @@ int main(int argc, char ** argv){ // open basic particles loader FBasicLoader<FBasicParticle> loader(filename); - if(!loader.isValide()){ + if(!loader.hasNotFinished()){ std::cout << "Loader Error, " << filename << "is missing\n"; return 1; } diff --git a/Tests/testLoaderFMA.cpp b/Tests/testLoaderFMA.cpp index 14ff5f05d15fe6e064fbff2d7426d01b4267ac64..5f42c0bbb363248de7dd6caf646b4124cb74cbd7 100644 --- a/Tests/testLoaderFMA.cpp +++ b/Tests/testLoaderFMA.cpp @@ -59,7 +59,7 @@ int main(int argc, char ** argv ){ // open basic particles loader FFmaLoader<FFmaParticle> loader(filename); - if(!loader.isValide()){ + if(!loader.hasNotFinished()){ std::cout << "Loader Error, " << filename << "is missing\n"; return 1; } diff --git a/Tests/testLoaderFMATsm.cpp b/Tests/testLoaderFMATsm.cpp index 77da0fd79aefa6d0b83a1e6edc425767d0a37ee9..5bd204e08d5d9a260665d25b798c7c3df41af147 100644 --- a/Tests/testLoaderFMATsm.cpp +++ b/Tests/testLoaderFMATsm.cpp @@ -59,7 +59,7 @@ int main(int argc, char ** argv ){ // open basic particles loader FFmaTsmLoader<ParticleTsm> loader(filename); - if(!loader.isValide()){ + if(!loader.hasNotFinished()){ std::cout << "Loader Error, " << filename << "is missing\n"; return 1; } diff --git a/Tests/testMortonIndex.cpp b/Tests/testMortonIndex.cpp index e898b6d1f63903d991343188634a9810fc77295d..edeb74497033a4dbae5719c8f18b2083738f69a5 100644 --- a/Tests/testMortonIndex.cpp +++ b/Tests/testMortonIndex.cpp @@ -85,7 +85,7 @@ int main(int argc, char ** argv){ } FHLoader<Particle> loader(filename); - if(!loader.isValide()){ + if(!loader.hasNotFinished()){ std::cout << "Loader Error, " << filename << " is missing\n"; return 1; } @@ -124,9 +124,9 @@ int main(int argc, char ** argv){ std::cout << "Particles :" << std::endl; FList<Particle>::ConstBasicIterator iter(*octreeIterator.getCurrentListTargets()); - while( iter.isValide() ){ + while( iter.hasNotFinished() ){ - printf("\tx = %e y = %e z = %e data = %c\n",iter.value().getPosition().getX(),iter.value().getPosition().getY(),iter.value().getPosition().getZ(),iter.value().getData()); + printf("\tx = %e y = %e z = %e data = %c\n",iter.data().getPosition().getX(),iter.data().getPosition().getY(),iter.data().getPosition().getZ(),iter.data().getData()); iter.gotoNext(); } diff --git a/Tests/testStatsTree.cpp b/Tests/testStatsTree.cpp index 5076f4821f23452d18b3c859649bb15e93a70655..e206514d6092eabbdfb38f5e90288b162990a961 100644 --- a/Tests/testStatsTree.cpp +++ b/Tests/testStatsTree.cpp @@ -62,7 +62,7 @@ int main(int argc, char ** argv){ } FFmaLoader<FFmaParticle> loader(filename); - if(!loader.isValide()){ + if(!loader.hasNotFinished()){ std::cout << "Loader Error, " << filename << " is missing\n"; return 1; } diff --git a/UTests/utestList.cpp b/UTests/utestList.cpp index 6ce876eef62720e02991ac7fd7669f7cc5b0004b..3031624615b9237582a8b1eea678489ed7c58525 100644 --- a/UTests/utestList.cpp +++ b/UTests/utestList.cpp @@ -73,7 +73,7 @@ class TestList : public FUTester<TestList> { FList<TestObject> list; { FList<TestObject>::BasicIterator iter(list); - assert(!iter.isValide()); + assert(!iter.hasNotFinished()); } { list.push(TestObject()); @@ -81,11 +81,11 @@ class TestList : public FUTester<TestList> { list.push(TestObject()); FList<TestObject>::BasicIterator iter(list); - assert(iter.isValide()); + assert(iter.hasNotFinished()); int counter = 0; - while(iter.isValide()){ iter.gotoNext(); ++counter; } - assert(!iter.isValide()); + while(iter.hasNotFinished()){ iter.gotoNext(); ++counter; } + assert(!iter.hasNotFinished()); assert(counter == list.getSize()); } } diff --git a/UTests/utestVector.cpp b/UTests/utestVector.cpp index 517d6a658eeaed945ba4023e475ded8189e8cb19..3deb372fe1688a119141749d38b709c70ab441fa 100644 --- a/UTests/utestVector.cpp +++ b/UTests/utestVector.cpp @@ -79,7 +79,7 @@ class TestVector : public FUTester<TestVector> { FVector<TestObject> vector; { FVector<TestObject>::BasicIterator iter(vector); - assert(!iter.isValide()); + assert(!iter.hasNotFinished()); } { vector.push(TestObject()); @@ -87,11 +87,11 @@ class TestVector : public FUTester<TestVector> { vector.push(TestObject()); FVector<TestObject>::BasicIterator iter(vector); - assert(iter.isValide()); + assert(iter.hasNotFinished()); int counter = 0; - while(iter.isValide()){ iter.gotoNext(); ++counter; } - assert(!iter.isValide()); + while(iter.hasNotFinished()){ iter.gotoNext(); ++counter; } + assert(!iter.hasNotFinished()); assert(counter == vector.getSize()); } }