Commit 05476fcf authored by berenger-bramas's avatar berenger-bramas

Rename list vector methods

(step 2/2)

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@102 2616d619-271b-44dc-8df4-d4a8f33a7222
parent 6cfc352f
...@@ -74,8 +74,8 @@ public: ...@@ -74,8 +74,8 @@ public:
FTRACE( FTrace::Controller.enterFunction(FTrace::KERNELS, __FUNCTION__ , __FILE__ , __LINE__) ); FTRACE( FTrace::Controller.enterFunction(FTrace::KERNELS, __FUNCTION__ , __FILE__ , __LINE__) );
// The particles is impacted by the parent cell // The particles is impacted by the parent cell
typename FList<ParticleClass>::BasicIterator iter(*particles); typename FList<ParticleClass>::BasicIterator iter(*particles);
while( iter.isValide() ){ while( iter.hasNotFinished() ){
iter.value().setDataDown(iter.value().getDataDown() + local->getDataDown()); iter.data().setDataDown(iter.data().getDataDown() + local->getDataDown());
iter.gotoNext(); iter.gotoNext();
} }
FTRACE( FTrace::Controller.leaveFunction(FTrace::KERNELS) ); FTRACE( FTrace::Controller.leaveFunction(FTrace::KERNELS) );
...@@ -95,8 +95,8 @@ public: ...@@ -95,8 +95,8 @@ public:
} }
typename FList<ParticleClass>::BasicIterator iter(*targets); typename FList<ParticleClass>::BasicIterator iter(*targets);
while( iter.isValide() ){ while( iter.hasNotFinished() ){
iter.value().setDataDown(iter.value().getDataDown() + inc); iter.data().setDataDown(iter.data().getDataDown() + inc);
iter.gotoNext(); iter.gotoNext();
} }
FTRACE( FTrace::Controller.leaveFunction(FTrace::KERNELS) ); FTRACE( FTrace::Controller.leaveFunction(FTrace::KERNELS) );
...@@ -118,8 +118,8 @@ public: ...@@ -118,8 +118,8 @@ public:
} }
typename FList<ParticleClass>::BasicIterator iter(*targets); typename FList<ParticleClass>::BasicIterator iter(*targets);
while( iter.isValide() ){ while( iter.hasNotFinished() ){
iter.value().setDataDown(iter.value().getDataDown() + inc); iter.data().setDataDown(iter.data().getDataDown() + inc);
iter.gotoNext(); iter.gotoNext();
} }
FTRACE( FTrace::Controller.leaveFunction(FTrace::KERNELS) ); FTRACE( FTrace::Controller.leaveFunction(FTrace::KERNELS) );
...@@ -178,12 +178,12 @@ void ValidateFMMAlgo(FOctree<ParticleClass, CellClass, LeafClass, TreeHeight , S ...@@ -178,12 +178,12 @@ void ValidateFMMAlgo(FOctree<ParticleClass, CellClass, LeafClass, TreeHeight , S
const bool isUsingTsm = (octreeIterator.getCurrentListTargets() != octreeIterator.getCurrentListSrc()); 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) // If a particles has been impacted by less than NbPart - 1 (the current particle)
// there is a problem // there is a problem
if( (!isUsingTsm && iter.value().getDataDown() != NbPart - 1) || if( (!isUsingTsm && iter.data().getDataDown() != NbPart - 1) ||
(isUsingTsm && iter.value().getDataDown() != NbPart) ){ (isUsingTsm && iter.data().getDataDown() != NbPart) ){
std::cout << "Problem L2P + P2P : " << iter.value().getDataDown() << "\n"; std::cout << "Problem L2P + P2P : " << iter.data().getDataDown() << "\n";
} }
iter.gotoNext(); iter.gotoNext();
} }
......
...@@ -164,8 +164,8 @@ public: ...@@ -164,8 +164,8 @@ public:
* FList<int> values; <br> * FList<int> values; <br>
* // inserting ... <br> * // inserting ... <br>
* FList<int>::BasicIterator iter(values); <br> * FList<int>::BasicIterator iter(values); <br>
* while( iter.isValide() ){ <br> * while( iter.hasNotFinished() ){ <br>
* iter.value() += 1; <br> * iter.data() += 1; <br>
* iter.gotoNext(); <br> * iter.gotoNext(); <br>
* } <br> * } <br>
* </code> * </code>
...@@ -189,17 +189,17 @@ public: ...@@ -189,17 +189,17 @@ public:
/** /**
* Current pointed value * 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; return this->iter->target;
} }
/** /**
* Current pointed value * 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; return this->iter->target;
} }
...@@ -207,7 +207,7 @@ public: ...@@ -207,7 +207,7 @@ public:
* To know if an iterator is at the end of the list * 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 * @return true if the current iterator can gotoNext and access to value, else false
*/ */
bool isValide() const{ bool hasNotFinished() const{
return iter; return iter;
} }
...@@ -221,8 +221,8 @@ public: ...@@ -221,8 +221,8 @@ public:
* FList<int> values; <br> * FList<int> values; <br>
* // inserting ... <br> * // inserting ... <br>
* FList<int>::ConstBasicIterator iter(values); <br> * FList<int>::ConstBasicIterator iter(values); <br>
* while( iter.isValide() ){ <br> * while( iter.hasNotFinished() ){ <br>
* iter.value() += 1; <br> * iter.data() += 1; <br>
* iter.gotoNext(); <br> * iter.gotoNext(); <br>
* } <br> * } <br>
* </code> * </code>
...@@ -246,17 +246,17 @@ public: ...@@ -246,17 +246,17 @@ public:
/** /**
* Current pointed value * 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; return this->iter->target;
} }
/** /**
* Current pointed value * 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; return this->iter->target;
} }
...@@ -264,7 +264,7 @@ public: ...@@ -264,7 +264,7 @@ public:
* To know if an iterator is at the end of the list * 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 * @return true if the current iterator can gotoNext and access to value, else false
*/ */
bool isValide() const{ bool hasNotFinished() const{
return iter; return iter;
} }
}; };
......
...@@ -178,15 +178,15 @@ public: ...@@ -178,15 +178,15 @@ public:
++this->index; ++this->index;
} }
bool isValide() const{ bool hasNotFinished() const{
return this->index < this->vector->index; return this->index < this->vector->index;
} }
T& value(){ T& data(){
return this->vector->array[this->index]; return this->vector->array[this->index];
} }
const T& value() const{ const T& data() const{
return this->vector->array[this->index]; return this->vector->array[this->index];
} }
...@@ -209,11 +209,11 @@ public: ...@@ -209,11 +209,11 @@ public:
++this->index; ++this->index;
} }
bool isValide() const{ bool hasNotFinished() const{
return this->index < this->vector->index; return this->index < this->vector->index;
} }
const T& value() const{ const T& data() const{
return this->vector->array[this->index]; return this->vector->array[this->index];
} }
......
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
* To know if the loader is valide (file opened, etc.) * To know if the loader is valide (file opened, etc.)
* @return true if file is open * @return true if file is open
*/ */
virtual bool isValide() const = 0; virtual bool hasNotFinished() const = 0;
/** /**
* Fill the next particle * Fill the next particle
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* .... * ....
* <code> * <code>
* FBasicLoader<FBasicParticle> loader("../FMB++/Tests/particles.basic.txt"); <br> * FBasicLoader<FBasicParticle> loader("../FMB++/Tests/particles.basic.txt"); <br>
* if(!loader.isValide()){ <br> * if(!loader.hasNotFinished()){ <br>
* std::cout << "Loader Error\n"; <br> * std::cout << "Loader Error\n"; <br>
* return 1; <br> * return 1; <br>
* } <br> * } <br>
...@@ -46,7 +46,7 @@ public: ...@@ -46,7 +46,7 @@ public:
/** /**
* The constructor need the file name * The constructor need the file name
* @param filename the name of the file to open * @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){ FBasicLoader(const char* const filename): file(filename,std::ifstream::in){
// test if open // test if open
...@@ -72,7 +72,7 @@ public: ...@@ -72,7 +72,7 @@ public:
* To know if file is open and ready to read * To know if file is open and ready to read
* @return true if loader can work * @return true if loader can work
*/ */
bool isValide() const{ bool hasNotFinished() const{
return this->file.is_open() && !this->file.eof(); return this->file.is_open() && !this->file.eof();
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* .... * ....
* <code> * <code>
* FFmaLoader<FBasicParticle> loader("../FMB++/Tests/particles.basic.txt"); <br> * FFmaLoader<FBasicParticle> loader("../FMB++/Tests/particles.basic.txt"); <br>
* if(!loader.isValide()){ <br> * if(!loader.hasNotFinished()){ <br>
* std::cout << "Loader Error\n"; <br> * std::cout << "Loader Error\n"; <br>
* return 1; <br> * return 1; <br>
* } <br> * } <br>
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
/** /**
* The constructor need the file name * The constructor need the file name
* @param filename the name of the file to open * @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){ FFmaLoader(const char* const filename): file(filename,std::ifstream::in){
// test if open // test if open
...@@ -75,7 +75,7 @@ public: ...@@ -75,7 +75,7 @@ public:
* To know if file is open and ready to read * To know if file is open and ready to read
* @return true if loader can work * @return true if loader can work
*/ */
bool isValide() const{ bool hasNotFinished() const{
return this->file.is_open() && !this->file.eof(); return this->file.is_open() && !this->file.eof();
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* .... * ....
* <code> * <code>
* FFmaScanfLoader<FBasicParticle> loader("../FMB++/Tests/particles.basic.txt"); <br> * FFmaScanfLoader<FBasicParticle> loader("../FMB++/Tests/particles.basic.txt"); <br>
* if(!loader.isValide()){ <br> * if(!loader.hasNotFinished()){ <br>
* std::cout << "Loader Error\n"; <br> * std::cout << "Loader Error\n"; <br>
* return 1; <br> * return 1; <br>
* } <br> * } <br>
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
/** /**
* The constructor need the file name * The constructor need the file name
* @param filename the name of the file to open * @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){ FFmaScanfLoader(const char* const filename): file(0){
file = fopen(filename,"r"); file = fopen(filename,"r");
...@@ -83,7 +83,7 @@ public: ...@@ -83,7 +83,7 @@ public:
* To know if file is open and ready to read * To know if file is open and ready to read
* @return true if loader can work * @return true if loader can work
*/ */
bool isValide() const{ bool hasNotFinished() const{
return this->file != NULL; return this->file != NULL;
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* .... * ....
* <code> * <code>
* FFmaTsmLoader<FBasicParticle> loader("../FMB++/Tests/particles.basic.txt"); <br> * FFmaTsmLoader<FBasicParticle> loader("../FMB++/Tests/particles.basic.txt"); <br>
* if(!loader.isValide()){ <br> * if(!loader.hasNotFinished()){ <br>
* std::cout << "Loader Error\n"; <br> * std::cout << "Loader Error\n"; <br>
* return 1; <br> * return 1; <br>
* } <br> * } <br>
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
/** /**
* The constructor need the file name * The constructor need the file name
* @param filename the name of the file to open * @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){ FFmaTsmLoader(const char* const filename): file(filename,std::ifstream::in){
// test if open // test if open
...@@ -75,7 +75,7 @@ public: ...@@ -75,7 +75,7 @@ public:
* To know if file is open and ready to read * To know if file is open and ready to read
* @return true if loader can work * @return true if loader can work
*/ */
bool isValide() const{ bool hasNotFinished() const{
return this->file.is_open() && !this->file.eof(); return this->file.is_open() && !this->file.eof();
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* .... * ....
* <code> * <code>
* FHLoader<FBasicParticle> loader("../FMB++/Tests/particles.basic.txt"); <br> * FHLoader<FBasicParticle> loader("../FMB++/Tests/particles.basic.txt"); <br>
* if(!loader.isValide()){ <br> * if(!loader.hasNotFinished()){ <br>
* std::cout << "Loader Error\n"; <br> * std::cout << "Loader Error\n"; <br>
* return 1; <br> * return 1; <br>
* } <br> * } <br>
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
/** /**
* The constructor need the file name * The constructor need the file name
* @param filename the name of the file to open * @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){ FHLoader(const char* const filename): file(0){
file = fopen(filename,"r"); file = fopen(filename,"r");
...@@ -86,7 +86,7 @@ public: ...@@ -86,7 +86,7 @@ public:
* To know if file is open and ready to read * To know if file is open and ready to read
* @return true if loader can work * @return true if loader can work
*/ */
bool isValide() const{ bool hasNotFinished() const{
return this->file != NULL; return this->file != NULL;
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -78,7 +78,7 @@ int main(int argc, char ** argv){ ...@@ -78,7 +78,7 @@ int main(int argc, char ** argv){
} }
FFmaLoader<FmbParticle> loader(filename); FFmaLoader<FmbParticle> loader(filename);
if(!loader.isValide()){ if(!loader.hasNotFinished()){
std::cout << "Loader Error, " << filename << " is missing\n"; std::cout << "Loader Error, " << filename << " is missing\n";
return 1; return 1;
} }
...@@ -122,12 +122,12 @@ int main(int argc, char ** argv){ ...@@ -122,12 +122,12 @@ int main(int argc, char ** argv){
octreeIterator.gotoBottomLeft(); octreeIterator.gotoBottomLeft();
do{ do{
FList<FmbParticle>::ConstBasicIterator iter(*octreeIterator.getCurrentListTargets()); FList<FmbParticle>::ConstBasicIterator iter(*octreeIterator.getCurrentListTargets());
while( iter.isValide() ){ while( iter.hasNotFinished() ){
potential += iter.value().getPotential() * iter.value().getPhysicalValue(); potential += iter.data().getPotential() * iter.data().getPhysicalValue();
forces += iter.value().getForces(); 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("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.value()->getForces().getX(),iter.value()->getForces().getY(),iter.value()->getForces().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", //printf("\t\t Sum Forces ( %e , %e , %e)\n",
//forces.getX(),forces.getY(),forces.getZ()); //forces.getX(),forces.getY(),forces.getZ());
......
...@@ -218,22 +218,22 @@ void ValidateFMMAlgoProc(FOctree<ParticleClass, CellClass, LeafClass, OctreeHeig ...@@ -218,22 +218,22 @@ void ValidateFMMAlgoProc(FOctree<ParticleClass, CellClass, LeafClass, OctreeHeig
std::cout << idx << " Index are differents " << std::endl; 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) // If a particles has been impacted by less than NbPart - 1 (the current particle)
// there is a problem // there is a problem
if( iterValide.value().getPotential() != iter.value().getPotential() ){ if( iterValide.data().getPotential() != iter.data().getPotential() ){
std::cout << idx << " Potential error : " << iterValide.value().getPotential() << " " << iter.value().getPotential() << "\n"; std::cout << idx << " Potential error : " << iterValide.data().getPotential() << " " << iter.data().getPotential() << "\n";
} }
if( !FMath::LookEqual(iterValide.value().getForces().getX(),iter.value().getForces().getX()) if( !FMath::LookEqual(iterValide.data().getForces().getX(),iter.data().getForces().getX())
|| !FMath::LookEqual(iterValide.value().getForces().getY(),iter.value().getForces().getY()) || !FMath::LookEqual(iterValide.data().getForces().getY(),iter.data().getForces().getY())
|| !FMath::LookEqual(iterValide.value().getForces().getZ(),iter.value().getForces().getZ()) ){ || !FMath::LookEqual(iterValide.data().getForces().getZ(),iter.data().getForces().getZ()) ){
/*std::cout << idx << " Forces error : " << (iterValide.value().getForces().getX() - iter.value().getForces().getX()) /*std::cout << idx << " Forces error : " << (iterValide.data().getForces().getX() - iter.data().getForces().getX())
<< " " << (iterValide.value().getForces().getY() - iter.value().getForces().getY()) << " " << (iterValide.data().getForces().getY() - iter.data().getForces().getY())
<< " " << (iterValide.value().getForces().getZ() - iter.value().getForces().getZ()) << "\n";*/ << " " << (iterValide.data().getForces().getZ() - iter.data().getForces().getZ()) << "\n";*/
std::cout << idx << " Forces error : x " << iterValide.value().getForces().getX() << " " << iter.value().getForces().getX() std::cout << idx << " Forces error : x " << iterValide.data().getForces().getX() << " " << iter.data().getForces().getX()
<< " y " << iterValide.value().getForces().getY() << " " << iter.value().getForces().getY() << " y " << iterValide.data().getForces().getY() << " " << iter.data().getForces().getY()
<< " z " << iterValide.value().getForces().getZ() << " " << iter.value().getForces().getZ() << "\n"; << " z " << iterValide.data().getForces().getZ() << " " << iter.data().getForces().getZ() << "\n";
} }
iter.gotoNext(); iter.gotoNext();
iterValide.gotoNext(); iterValide.gotoNext();
...@@ -274,7 +274,7 @@ int main(int argc, char ** argv){ ...@@ -274,7 +274,7 @@ int main(int argc, char ** argv){
} }
FFmaLoader<FmbParticle> loader(filename); FFmaLoader<FmbParticle> loader(filename);
if(!loader.isValide()){ if(!loader.hasNotFinished()){
std::cout << "Loader Error, " << filename << " is missing\n"; std::cout << "Loader Error, " << filename << " is missing\n";
return 1; return 1;
} }
...@@ -355,16 +355,16 @@ int main(int argc, char ** argv){ ...@@ -355,16 +355,16 @@ int main(int argc, char ** argv){
#ifdef VALIDATE_FMM #ifdef VALIDATE_FMM
FList<FmbParticle>::ConstBasicIterator iterValide(*octreeIteratorValide.getCurrentListTargets()); FList<FmbParticle>::ConstBasicIterator iterValide(*octreeIteratorValide.getCurrentListTargets());
#endif #endif
while( iter.isValide() while( iter.hasNotFinished()
#ifdef VALIDATE_FMM #ifdef VALIDATE_FMM
&& iterValide.isValide() && iterValide.hasNotFinished()
#endif #endif
){ ){
potential += iter.value().getPotential() * iter.value().getPhysicalValue(); potential += iter.data().getPotential() * iter.data().getPhysicalValue();
forces += iter.value().getForces(); forces += iter.data().getForces();
#ifdef VALIDATE_FMM #ifdef VALIDATE_FMM
potentialValide += iterValide.value().getPotential() * iterValide.value().getPhysicalValue(); potentialValide += iterValide.data().getPotential() * iterValide.data().getPhysicalValue();
forcesValide += iterValide.value().getForces(); forcesValide += iterValide.data().getForces();
iterValide.gotoNext(); iterValide.gotoNext();
#endif #endif
iter.gotoNext(); iter.gotoNext();
......
...@@ -79,7 +79,7 @@ int main(int argc, char ** argv){ ...@@ -79,7 +79,7 @@ int main(int argc, char ** argv){
} }
FFmaScanfLoader<FmbParticle> loader(filename); FFmaScanfLoader<FmbParticle> loader(filename);
if(!loader.isValide()){ if(!loader.hasNotFinished()){
std::cout << "Loader Error, " << filename << " is missing\n"; std::cout << "Loader Error, " << filename << " is missing\n";
return 1; return 1;
} }
...@@ -126,12 +126,12 @@ int main(int argc, char ** argv){ ...@@ -126,12 +126,12 @@ int main(int argc, char ** argv){
octreeIterator.gotoBottomLeft(); octreeIterator.gotoBottomLeft();
do{ do{
FList<FmbParticle>::ConstBasicIterator iter(*octreeIterator.getCurrentListTargets()); FList<FmbParticle>::ConstBasicIterator iter(*octreeIterator.getCurrentListTargets());
while( iter.isValide() ){ while( iter.hasNotFinished() ){
potential += iter.value().getPotential() * iter.value().getPhysicalValue(); potential += iter.data().getPotential() * iter.data().getPhysicalValue();
forces += iter.value().getForces(); 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("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.value()->getForces().getX(),iter.value()->getForces().getY(),iter.value()->getForces().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", //printf("\t\t Sum Forces ( %e , %e , %e)\n",
//forces.getX(),forces.getY(),forces.getZ()); //forces.getX(),forces.getY(),forces.getZ());
......
...@@ -77,7 +77,7 @@ int main(int argc, char ** argv){ ...@@ -77,7 +77,7 @@ int main(int argc, char ** argv){
} }
FFmaTsmLoader<FmbParticle> loader(filename); FFmaTsmLoader<FmbParticle> loader(filename);
if(!loader.isValide()){ if(!loader.hasNotFinished()){
std::cout << "Loader Error, " << filename << " is missing\n"; std::cout << "Loader Error, " << filename << " is missing\n";
return 1; return 1;
} }
...@@ -123,12 +123,12 @@ int main(int argc, char ** argv){ ...@@ -123,12 +123,12 @@ int main(int argc, char ** argv){
octreeIterator.gotoBottomLeft(); octreeIterator.gotoBottomLeft();
do{ do{
FList<FmbParticle>::ConstBasicIterator iter(*octreeIterator.getCurrentListTargets()); FList<FmbParticle>::ConstBasicIterator iter(*octreeIterator.getCurrentListTargets());
while( iter.isValide() ){ while( iter.hasNotFinished() ){
potential += iter.value().getPotential() * iter.value().getPhysicalValue(); potential += iter.data().getPotential() * iter.data().getPhysicalValue();
forces += iter.value().getForces(); 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("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.value()->getForces().getX(),iter.value()->getForces().getY(),iter.value()->getForces().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", //printf("\t\t Sum Forces ( %e , %e , %e)\n",
//forces.getX(),forces.getY(),forces.getZ()); //forces.getX(),forces.getY(),forces.getZ());
......
...@@ -178,12 +178,12 @@ void ValidateFMMAlgoProc(FOctree<ParticleClass, CellClass, LeafClass, OctreeHeig ...@@ -178,12 +178,12 @@ void ValidateFMMAlgoProc(FOctree<ParticleClass, CellClass, LeafClass, OctreeHeig
const bool isUsingTsm = (octreeIterator.getCurrentListTargets() != octreeIterator.getCurrentListSrc()); 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) // If a particles has been impacted by less than NbPart - 1 (the current particle)
// there is a problem // there is a problem
if( (!isUsingTsm && iter.value().getDataDown() != NbPart - 1) || if( (!isUsingTsm && iter.data().getDataDown() != NbPart - 1) ||
(isUsingTsm && iter.value().getDataDown() != NbPart) ){ (isUsingTsm && iter.data().getDataDown() != NbPart) ){
std::cout << "Problem L2P + P2P, value on particle is : " << iter.value().getDataDown() << "\n"; std::cout << "Problem L2P + P2P, value on particle is : " << iter.data().getDataDown() << "\n";
} }
iter.gotoNext(); iter.gotoNext();
} }
...@@ -240,7 +240,7 @@ int main(int argc, char ** argv){ ...@@ -240,7 +240,7 @@ int main(int argc, char ** argv){
} }
FFmaLoader<TestParticle> loader(filename); FFmaLoader<TestParticle> loader(filename);
if(!loader.isValide()){ if(!loader.hasNotFinished()){
std::cout << "Loader Error, " << filename << " is missing\n"; std::cout << "Loader Error, " << filename << " is missing\n";
return 1; return 1;
} }
......
...@@ -59,7 +59,7 @@ int main(int argc, char ** argv){ ...@@ -59,7 +59,7 @@ int main(int argc, char ** argv){
// open basic particles loader // open basic particles loader
FBasicLoader<FBasicParticle> loader(filename); FBasicLoader<FBasicParticle> loader(filename);
if(!loader.isValide()){ if(!loader.hasNotFinished()){
std::cout << "Loader Error, " << filename << "is missing\n"; std::cout << "Loader Error, " << filename << "is missing\n";
return 1; return 1;
} }
......
...@@ -59,7 +59,7 @@ int main(int argc, char ** argv ){ ...@@ -59,7 +59,7 @@ int main(int argc, char ** argv ){
// open basic particles loader // open basic particles loader
FFmaLoader<FFmaParticle> loader(filename); FFmaLoader<FFmaParticle> loader(filename);
if(!loader.isValide()){ if(!loader.hasNotFinished()){
std::cout << "Loader Error, " << filename << "is missing\n"; std::cout << "Loader Error, " << filename << "is missing\n";
return 1; return 1;
} }
......