git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11027 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -287,9 +287,9 @@ int AtomVecCharge::pack_border(int n, int *list, double *buf,
|
||||
buf[m++] = x[j][0];
|
||||
buf[m++] = x[j][1];
|
||||
buf[m++] = x[j][2];
|
||||
buf[m++] = tag[j];
|
||||
buf[m++] = type[j];
|
||||
buf[m++] = mask[j];
|
||||
buf[m++] = ubuf(tag[j]).d;
|
||||
buf[m++] = ubuf(type[j]).d;
|
||||
buf[m++] = ubuf(mask[j]).d;
|
||||
buf[m++] = q[j];
|
||||
}
|
||||
} else {
|
||||
@ -307,9 +307,9 @@ int AtomVecCharge::pack_border(int n, int *list, double *buf,
|
||||
buf[m++] = x[j][0] + dx;
|
||||
buf[m++] = x[j][1] + dy;
|
||||
buf[m++] = x[j][2] + dz;
|
||||
buf[m++] = tag[j];
|
||||
buf[m++] = type[j];
|
||||
buf[m++] = mask[j];
|
||||
buf[m++] = ubuf(tag[j]).d;
|
||||
buf[m++] = ubuf(type[j]).d;
|
||||
buf[m++] = ubuf(mask[j]).d;
|
||||
buf[m++] = q[j];
|
||||
}
|
||||
}
|
||||
@ -336,9 +336,9 @@ int AtomVecCharge::pack_border_vel(int n, int *list, double *buf,
|
||||
buf[m++] = x[j][0];
|
||||
buf[m++] = x[j][1];
|
||||
buf[m++] = x[j][2];
|
||||
buf[m++] = tag[j];
|
||||
buf[m++] = type[j];
|
||||
buf[m++] = mask[j];
|
||||
buf[m++] = ubuf(tag[j]).d;
|
||||
buf[m++] = ubuf(type[j]).d;
|
||||
buf[m++] = ubuf(mask[j]).d;
|
||||
buf[m++] = q[j];
|
||||
buf[m++] = v[j][0];
|
||||
buf[m++] = v[j][1];
|
||||
@ -360,9 +360,9 @@ int AtomVecCharge::pack_border_vel(int n, int *list, double *buf,
|
||||
buf[m++] = x[j][0] + dx;
|
||||
buf[m++] = x[j][1] + dy;
|
||||
buf[m++] = x[j][2] + dz;
|
||||
buf[m++] = tag[j];
|
||||
buf[m++] = type[j];
|
||||
buf[m++] = mask[j];
|
||||
buf[m++] = ubuf(tag[j]).d;
|
||||
buf[m++] = ubuf(type[j]).d;
|
||||
buf[m++] = ubuf(mask[j]).d;
|
||||
buf[m++] = q[j];
|
||||
buf[m++] = v[j][0];
|
||||
buf[m++] = v[j][1];
|
||||
@ -377,9 +377,9 @@ int AtomVecCharge::pack_border_vel(int n, int *list, double *buf,
|
||||
buf[m++] = x[j][0] + dx;
|
||||
buf[m++] = x[j][1] + dy;
|
||||
buf[m++] = x[j][2] + dz;
|
||||
buf[m++] = tag[j];
|
||||
buf[m++] = type[j];
|
||||
buf[m++] = mask[j];
|
||||
buf[m++] = ubuf(tag[j]).d;
|
||||
buf[m++] = ubuf(type[j]).d;
|
||||
buf[m++] = ubuf(mask[j]).d;
|
||||
buf[m++] = q[j];
|
||||
if (mask[i] & deform_groupbit) {
|
||||
buf[m++] = v[j][0] + dvx;
|
||||
@ -428,9 +428,9 @@ void AtomVecCharge::unpack_border(int n, int first, double *buf)
|
||||
x[i][0] = buf[m++];
|
||||
x[i][1] = buf[m++];
|
||||
x[i][2] = buf[m++];
|
||||
tag[i] = static_cast<int> (buf[m++]);
|
||||
type[i] = static_cast<int> (buf[m++]);
|
||||
mask[i] = static_cast<int> (buf[m++]);
|
||||
tag[i] = (int) ubuf(buf[m++]).i;
|
||||
type[i] = (int) ubuf(buf[m++]).i;
|
||||
mask[i] = (int) ubuf(buf[m++]).i;
|
||||
q[i] = buf[m++];
|
||||
}
|
||||
|
||||
@ -453,9 +453,9 @@ void AtomVecCharge::unpack_border_vel(int n, int first, double *buf)
|
||||
x[i][0] = buf[m++];
|
||||
x[i][1] = buf[m++];
|
||||
x[i][2] = buf[m++];
|
||||
tag[i] = static_cast<int> (buf[m++]);
|
||||
type[i] = static_cast<int> (buf[m++]);
|
||||
mask[i] = static_cast<int> (buf[m++]);
|
||||
tag[i] = (int) ubuf(buf[m++]).i;
|
||||
type[i] = (int) ubuf(buf[m++]).i;
|
||||
mask[i] = (int) ubuf(buf[m++]).i;
|
||||
q[i] = buf[m++];
|
||||
v[i][0] = buf[m++];
|
||||
v[i][1] = buf[m++];
|
||||
@ -495,10 +495,10 @@ int AtomVecCharge::pack_exchange(int i, double *buf)
|
||||
buf[m++] = v[i][0];
|
||||
buf[m++] = v[i][1];
|
||||
buf[m++] = v[i][2];
|
||||
buf[m++] = tag[i];
|
||||
buf[m++] = type[i];
|
||||
buf[m++] = mask[i];
|
||||
*((tagint *) &buf[m++]) = image[i];
|
||||
buf[m++] = ubuf(tag[i]).d;
|
||||
buf[m++] = ubuf(type[i]).d;
|
||||
buf[m++] = ubuf(mask[i]).d;
|
||||
buf[m++] = ubuf(image[i]).d;
|
||||
|
||||
buf[m++] = q[i];
|
||||
|
||||
@ -524,10 +524,10 @@ int AtomVecCharge::unpack_exchange(double *buf)
|
||||
v[nlocal][0] = buf[m++];
|
||||
v[nlocal][1] = buf[m++];
|
||||
v[nlocal][2] = buf[m++];
|
||||
tag[nlocal] = static_cast<int> (buf[m++]);
|
||||
type[nlocal] = static_cast<int> (buf[m++]);
|
||||
mask[nlocal] = static_cast<int> (buf[m++]);
|
||||
image[nlocal] = *((tagint *) &buf[m++]);
|
||||
tag[nlocal] = (int) ubuf(buf[m++]).i;
|
||||
type[nlocal] = (int) ubuf(buf[m++]).i;
|
||||
mask[nlocal] = (int) ubuf(buf[m++]).i;
|
||||
image[nlocal] = (tagint) ubuf(buf[m++]).i;
|
||||
|
||||
q[nlocal] = buf[m++];
|
||||
|
||||
@ -572,10 +572,10 @@ int AtomVecCharge::pack_restart(int i, double *buf)
|
||||
buf[m++] = x[i][0];
|
||||
buf[m++] = x[i][1];
|
||||
buf[m++] = x[i][2];
|
||||
buf[m++] = tag[i];
|
||||
buf[m++] = type[i];
|
||||
buf[m++] = mask[i];
|
||||
*((tagint *) &buf[m++]) = image[i];
|
||||
buf[m++] = ubuf(tag[i]).d;
|
||||
buf[m++] = ubuf(type[i]).d;
|
||||
buf[m++] = ubuf(mask[i]).d;
|
||||
buf[m++] = ubuf(image[i]).d;
|
||||
buf[m++] = v[i][0];
|
||||
buf[m++] = v[i][1];
|
||||
buf[m++] = v[i][2];
|
||||
@ -607,10 +607,10 @@ int AtomVecCharge::unpack_restart(double *buf)
|
||||
x[nlocal][0] = buf[m++];
|
||||
x[nlocal][1] = buf[m++];
|
||||
x[nlocal][2] = buf[m++];
|
||||
tag[nlocal] = static_cast<int> (buf[m++]);
|
||||
type[nlocal] = static_cast<int> (buf[m++]);
|
||||
mask[nlocal] = static_cast<int> (buf[m++]);
|
||||
image[nlocal] = *((tagint *) &buf[m++]);
|
||||
tag[nlocal] = (int) ubuf(buf[m++]).i;
|
||||
type[nlocal] = (int) ubuf(buf[m++]).i;
|
||||
mask[nlocal] = (int) ubuf(buf[m++]).i;
|
||||
image[nlocal] = (tagint) ubuf(buf[m++]).i;
|
||||
v[nlocal][0] = buf[m++];
|
||||
v[nlocal][1] = buf[m++];
|
||||
v[nlocal][2] = buf[m++];
|
||||
@ -708,15 +708,15 @@ void AtomVecCharge::pack_data(double **buf)
|
||||
{
|
||||
int nlocal = atom->nlocal;
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
buf[i][0] = tag[i];
|
||||
buf[i][1] = type[i];
|
||||
buf[i][0] = ubuf(tag[i]).d;
|
||||
buf[i][1] = ubuf(type[i]).d;
|
||||
buf[i][2] = q[i];
|
||||
buf[i][3] = x[i][0];
|
||||
buf[i][4] = x[i][1];
|
||||
buf[i][5] = x[i][2];
|
||||
buf[i][6] = (image[i] & IMGMASK) - IMGMAX;
|
||||
buf[i][7] = (image[i] >> IMGBITS & IMGMASK) - IMGMAX;
|
||||
buf[i][8] = (image[i] >> IMG2BITS) - IMGMAX;
|
||||
buf[i][6] = ubuf((image[i] & IMGMASK) - IMGMAX).d;
|
||||
buf[i][7] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d;
|
||||
buf[i][8] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d;
|
||||
}
|
||||
}
|
||||
|
||||
@ -738,9 +738,10 @@ void AtomVecCharge::write_data(FILE *fp, int n, double **buf)
|
||||
{
|
||||
for (int i = 0; i < n; i++)
|
||||
fprintf(fp,"%d %d %-1.16e %-1.16e %-1.16e %-1.16e %d %d %d\n",
|
||||
(int) buf[i][0],(int) buf[i][1],buf[i][2],
|
||||
buf[i][3],buf[i][4],buf[i][5],
|
||||
(int) buf[i][6],(int) buf[i][7],(int) buf[i][8]);
|
||||
(int) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i,
|
||||
buf[i][2],buf[i][3],buf[i][4],buf[i][5],
|
||||
(int) ubuf(buf[i][6]).i,(int) ubuf(buf[i][7]).i,
|
||||
(int) ubuf(buf[i][8]).i);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user