Minor changes
This commit is contained in:
parent
c1b4b6bab1
commit
dacfff3e96
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user