git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12717 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2014-11-18 15:41:05 +00:00
parent 980ef37535
commit b0a5f4a280
1 changed files with 10 additions and 9 deletions

View File

@ -229,13 +229,14 @@ void Velocity::create(double t_desired, int seed)
for (i = 1; i <= natoms; i++) {
if (dist_flag == 0) {
vx = random->uniform();
vy = random->uniform();
vz = random->uniform();
vx = random->uniform() - 0.5;
vy = random->uniform() - 0.5;
vz = random->uniform() - 0.5;
} else {
vx = random->gaussian();
vy = random->gaussian();
vz = random->gaussian();
sum += vx;
}
m = atom->map(i);
if (m >= 0 && m < nlocal) {
@ -264,9 +265,9 @@ void Velocity::create(double t_desired, int seed)
for (i = 0; i < nlocal; i++) {
if (mask[i] & groupbit) {
if (dist_flag == 0) {
vx = random->uniform();
vy = random->uniform();
vz = random->uniform();
vx = random->uniform() - 0.5;
vy = random->uniform() - 0.5;
vz = random->uniform() - 0.5;
} else {
vx = random->gaussian();
vy = random->gaussian();
@ -289,9 +290,9 @@ void Velocity::create(double t_desired, int seed)
if (mask[i] & groupbit) {
random->reset(seed,x[i]);
if (dist_flag == 0) {
vx = random->uniform();
vy = random->uniform();
vz = random->uniform();
vx = random->uniform() - 0.5;
vy = random->uniform() - 0.5;
vz = random->uniform() - 0.5;
} else {
vx = random->gaussian();
vy = random->gaussian();