diff --git a/DLASystem.cpp b/DLASystem.cpp index 75cf08d..78b51c9 100644 --- a/DLASystem.cpp +++ b/DLASystem.cpp @@ -148,12 +148,12 @@ void DLASystem::updateClusterRadius(double pos[]) { // make a random move of the last particle in the particleList void DLASystem::moveLastParticle() { - int rr = rgen.randomInt(4); // pick a random number in the range 0-3, which direction do we hop? + int direction = rgen.randomInt(4); // pick a random number in the range 0-3, which direction do we hop? double newpos[2]; Particle *lastP = particleList[this->particleList.size() - 1]; - setPosNeighbour(newpos, lastP->pos, rr); + setPosNeighbour(newpos, lastP->pos, direction); if (distanceFromOrigin(newpos) > killCircle) { setGrid(lastP->pos, 0); @@ -173,10 +173,9 @@ void DLASystem::moveLastParticle() { updateClusterRadius(lastP->pos); // update the cluster radius, addCircle, etc. } } else { - // if we get to here then we are trying to move to an occupied site - // (this should never happen as long as the sticking probability is 1.0) - cout << "reject " << rr << endl; - cout << lastP->pos[0] << " " << lastP->pos[1] << endl; + // If we get to here then we are trying to move to an occupied site + cout << "reject " << direction << endl + << lastP->pos[0] << "," << lastP->pos[1] << endl; } } diff --git a/Makefile b/Makefile index 354e5db..1397565 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ CXX = clang++ -CXXFLAGS = -Wall -Wextra -g -O0 +CXXFLAGS = -Wall -Wextra -g -O0 -std=c++20 -stdlib=libc++ IFLAGS = -I/usr/local/include -I/usr/include