git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11027 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -591,12 +591,12 @@ int AtomVecBody::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];
|
||||
if (body[j] < 0) buf[m++] = 0;
|
||||
buf[m++] = ubuf(tag[j]).d;
|
||||
buf[m++] = ubuf(type[j]).d;
|
||||
buf[m++] = ubuf(mask[j]).d;
|
||||
if (body[j] < 0) buf[m++] = ubuf(0).d;
|
||||
else {
|
||||
buf[m++] = 1;
|
||||
buf[m++] = ubuf(1).d;
|
||||
quat = bonus[body[j]].quat;
|
||||
inertia = bonus[body[j]].inertia;
|
||||
buf[m++] = quat[0];
|
||||
@ -606,8 +606,8 @@ int AtomVecBody::pack_border(int n, int *list, double *buf,
|
||||
buf[m++] = inertia[0];
|
||||
buf[m++] = inertia[1];
|
||||
buf[m++] = inertia[2];
|
||||
buf[m++] = bonus[body[j]].ninteger;
|
||||
buf[m++] = bonus[body[j]].ndouble;
|
||||
buf[m++] = ubuf(bonus[body[j]].ninteger).d;
|
||||
buf[m++] = ubuf(bonus[body[j]].ndouble).d;
|
||||
m += bptr->pack_border_body(&bonus[body[j]],&buf[m]);
|
||||
}
|
||||
}
|
||||
@ -626,12 +626,12 @@ int AtomVecBody::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];
|
||||
if (body[j] < 0) buf[m++] = 0;
|
||||
buf[m++] = ubuf(tag[j]).d;
|
||||
buf[m++] = ubuf(type[j]).d;
|
||||
buf[m++] = ubuf(mask[j]).d;
|
||||
if (body[j] < 0) buf[m++] = ubuf(0).d;
|
||||
else {
|
||||
buf[m++] = 1;
|
||||
buf[m++] = ubuf(1).d;
|
||||
quat = bonus[body[j]].quat;
|
||||
inertia = bonus[body[j]].inertia;
|
||||
buf[m++] = quat[0];
|
||||
@ -641,8 +641,8 @@ int AtomVecBody::pack_border(int n, int *list, double *buf,
|
||||
buf[m++] = inertia[0];
|
||||
buf[m++] = inertia[1];
|
||||
buf[m++] = inertia[2];
|
||||
buf[m++] = bonus[body[j]].ninteger;
|
||||
buf[m++] = bonus[body[j]].ndouble;
|
||||
buf[m++] = ubuf(bonus[body[j]].ninteger).d;
|
||||
buf[m++] = ubuf(bonus[body[j]].ndouble).d;
|
||||
m += bptr->pack_border_body(&bonus[body[j]],&buf[m]);
|
||||
}
|
||||
}
|
||||
@ -671,12 +671,12 @@ int AtomVecBody::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];
|
||||
if (body[j] < 0) buf[m++] = 0;
|
||||
buf[m++] = ubuf(tag[j]).d;
|
||||
buf[m++] = ubuf(type[j]).d;
|
||||
buf[m++] = ubuf(mask[j]).d;
|
||||
if (body[j] < 0) buf[m++] = ubuf(0).d;
|
||||
else {
|
||||
buf[m++] = 1;
|
||||
buf[m++] = ubuf(1).d;
|
||||
quat = bonus[body[j]].quat;
|
||||
inertia = bonus[body[j]].inertia;
|
||||
buf[m++] = quat[0];
|
||||
@ -686,8 +686,8 @@ int AtomVecBody::pack_border_vel(int n, int *list, double *buf,
|
||||
buf[m++] = inertia[0];
|
||||
buf[m++] = inertia[1];
|
||||
buf[m++] = inertia[2];
|
||||
buf[m++] = bonus[body[j]].ninteger;
|
||||
buf[m++] = bonus[body[j]].ndouble;
|
||||
buf[m++] = ubuf(bonus[body[j]].ninteger).d;
|
||||
buf[m++] = ubuf(bonus[body[j]].ndouble).d;
|
||||
m += bptr->pack_border_body(&bonus[body[j]],&buf[m]);
|
||||
}
|
||||
buf[m++] = v[j][0];
|
||||
@ -713,12 +713,12 @@ int AtomVecBody::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];
|
||||
if (body[j] < 0) buf[m++] = 0;
|
||||
buf[m++] = ubuf(tag[j]).d;
|
||||
buf[m++] = ubuf(type[j]).d;
|
||||
buf[m++] = ubuf(mask[j]).d;
|
||||
if (body[j] < 0) buf[m++] = ubuf(0).d;
|
||||
else {
|
||||
buf[m++] = 1;
|
||||
buf[m++] = ubuf(1).d;
|
||||
quat = bonus[body[j]].quat;
|
||||
inertia = bonus[body[j]].inertia;
|
||||
buf[m++] = quat[0];
|
||||
@ -728,8 +728,8 @@ int AtomVecBody::pack_border_vel(int n, int *list, double *buf,
|
||||
buf[m++] = inertia[0];
|
||||
buf[m++] = inertia[1];
|
||||
buf[m++] = inertia[2];
|
||||
buf[m++] = bonus[body[j]].ninteger;
|
||||
buf[m++] = bonus[body[j]].ndouble;
|
||||
buf[m++] = ubuf(bonus[body[j]].ninteger).d;
|
||||
buf[m++] = ubuf(bonus[body[j]].ndouble).d;
|
||||
m += bptr->pack_border_body(&bonus[body[j]],&buf[m]);
|
||||
}
|
||||
buf[m++] = v[j][0];
|
||||
@ -748,12 +748,12 @@ int AtomVecBody::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];
|
||||
if (body[j] < 0) buf[m++] = 0;
|
||||
buf[m++] = ubuf(tag[j]).d;
|
||||
buf[m++] = ubuf(type[j]).d;
|
||||
buf[m++] = ubuf(mask[j]).d;
|
||||
if (body[j] < 0) buf[m++] = ubuf(0).d;
|
||||
else {
|
||||
buf[m++] = 1;
|
||||
buf[m++] = ubuf(1).d;
|
||||
quat = bonus[body[j]].quat;
|
||||
inertia = bonus[body[j]].inertia;
|
||||
buf[m++] = quat[0];
|
||||
@ -763,8 +763,8 @@ int AtomVecBody::pack_border_vel(int n, int *list, double *buf,
|
||||
buf[m++] = inertia[0];
|
||||
buf[m++] = inertia[1];
|
||||
buf[m++] = inertia[2];
|
||||
buf[m++] = bonus[body[j]].ninteger;
|
||||
buf[m++] = bonus[body[j]].ndouble;
|
||||
buf[m++] = ubuf(bonus[body[j]].ninteger).d;
|
||||
buf[m++] = ubuf(bonus[body[j]].ndouble).d;
|
||||
m += bptr->pack_border_body(&bonus[body[j]],&buf[m]);
|
||||
}
|
||||
if (mask[i] & deform_groupbit) {
|
||||
@ -800,9 +800,9 @@ int AtomVecBody::pack_border_hybrid(int n, int *list, double *buf)
|
||||
m = 0;
|
||||
for (i = 0; i < n; i++) {
|
||||
j = list[i];
|
||||
if (body[j] < 0) buf[m++] = 0;
|
||||
if (body[j] < 0) buf[m++] = ubuf(0).d;
|
||||
else {
|
||||
buf[m++] = 1;
|
||||
buf[m++] = ubuf(1).d;
|
||||
quat = bonus[body[j]].quat;
|
||||
inertia = bonus[body[j]].inertia;
|
||||
buf[m++] = quat[0];
|
||||
@ -812,8 +812,8 @@ int AtomVecBody::pack_border_hybrid(int n, int *list, double *buf)
|
||||
buf[m++] = inertia[0];
|
||||
buf[m++] = inertia[1];
|
||||
buf[m++] = inertia[2];
|
||||
buf[m++] = bonus[body[j]].ninteger;
|
||||
buf[m++] = bonus[body[j]].ndouble;
|
||||
buf[m++] = ubuf(bonus[body[j]].ninteger).d;
|
||||
buf[m++] = ubuf(bonus[body[j]].ndouble).d;
|
||||
m += bptr->pack_border_body(&bonus[body[j]],&buf[m]);
|
||||
}
|
||||
}
|
||||
@ -834,10 +834,10 @@ void AtomVecBody::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++]);
|
||||
body[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;
|
||||
body[i] = (int) ubuf(buf[m++]).i;
|
||||
if (body[i] == 0) body[i] = -1;
|
||||
else {
|
||||
j = nlocal_bonus + nghost_bonus;
|
||||
@ -851,8 +851,8 @@ void AtomVecBody::unpack_border(int n, int first, double *buf)
|
||||
inertia[0] = buf[m++];
|
||||
inertia[1] = buf[m++];
|
||||
inertia[2] = buf[m++];
|
||||
bonus[j].ninteger = static_cast<int> (buf[m++]);
|
||||
bonus[j].ndouble = static_cast<int> (buf[m++]);
|
||||
bonus[j].ninteger = (int) ubuf(buf[m++]).i;
|
||||
bonus[j].ndouble = (int) ubuf(buf[m++]).i;
|
||||
bonus[j].ivalue = icp->get(bonus[j].ninteger,bonus[j].iindex);
|
||||
bonus[j].dvalue = dcp->get(bonus[j].ndouble,bonus[j].dindex);
|
||||
m += bptr->unpack_border_body(&bonus[j],&buf[m]);
|
||||
@ -882,10 +882,10 @@ void AtomVecBody::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++]);
|
||||
body[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;
|
||||
body[i] = (int) ubuf(buf[m++]).i;
|
||||
if (body[i] == 0) body[i] = -1;
|
||||
else {
|
||||
j = nlocal_bonus + nghost_bonus;
|
||||
@ -899,8 +899,8 @@ void AtomVecBody::unpack_border_vel(int n, int first, double *buf)
|
||||
inertia[0] = buf[m++];
|
||||
inertia[1] = buf[m++];
|
||||
inertia[2] = buf[m++];
|
||||
bonus[j].ninteger = static_cast<int> (buf[m++]);
|
||||
bonus[j].ndouble = static_cast<int> (buf[m++]);
|
||||
bonus[j].ninteger = (int) ubuf(buf[m++]).i;
|
||||
bonus[j].ndouble = (int) ubuf(buf[m++]).i;
|
||||
bonus[j].ivalue = icp->get(bonus[j].ninteger,bonus[j].iindex);
|
||||
bonus[j].dvalue = dcp->get(bonus[j].ndouble,bonus[j].dindex);
|
||||
m += bptr->unpack_border_body(&bonus[j],&buf[m]);
|
||||
@ -932,7 +932,7 @@ int AtomVecBody::unpack_border_hybrid(int n, int first, double *buf)
|
||||
m = 0;
|
||||
last = first + n;
|
||||
for (i = first; i < last; i++) {
|
||||
body[i] = static_cast<int> (buf[m++]);
|
||||
body[i] = (int) ubuf(buf[m++]).i;
|
||||
if (body[i] == 0) body[i] = -1;
|
||||
else {
|
||||
j = nlocal_bonus + nghost_bonus;
|
||||
@ -946,8 +946,8 @@ int AtomVecBody::unpack_border_hybrid(int n, int first, double *buf)
|
||||
inertia[0] = buf[m++];
|
||||
inertia[1] = buf[m++];
|
||||
inertia[2] = buf[m++];
|
||||
bonus[j].ninteger = static_cast<int> (buf[m++]);
|
||||
bonus[j].ndouble = static_cast<int> (buf[m++]);
|
||||
bonus[j].ninteger = (int) ubuf(buf[m++]).i;
|
||||
bonus[j].ndouble = (int) ubuf(buf[m++]).i;
|
||||
bonus[j].ivalue = icp->get(bonus[j].ninteger,bonus[j].iindex);
|
||||
bonus[j].dvalue = dcp->get(bonus[j].ndouble,bonus[j].dindex);
|
||||
m += bptr->unpack_border_body(&bonus[j],&buf[m]);
|
||||
@ -973,19 +973,19 @@ int AtomVecBody::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++] = rmass[i];
|
||||
buf[m++] = angmom[i][0];
|
||||
buf[m++] = angmom[i][1];
|
||||
buf[m++] = angmom[i][2];
|
||||
|
||||
if (body[i] < 0) buf[m++] = 0;
|
||||
if (body[i] < 0) buf[m++] = ubuf(0).d;
|
||||
else {
|
||||
buf[m++] = 1;
|
||||
buf[m++] = ubuf(1).d;
|
||||
int j = body[i];
|
||||
double *quat = bonus[j].quat;
|
||||
double *inertia = bonus[j].inertia;
|
||||
@ -996,8 +996,8 @@ int AtomVecBody::pack_exchange(int i, double *buf)
|
||||
buf[m++] = inertia[0];
|
||||
buf[m++] = inertia[1];
|
||||
buf[m++] = inertia[2];
|
||||
buf[m++] = bonus[j].ninteger;
|
||||
buf[m++] = bonus[j].ndouble;
|
||||
buf[m++] = ubuf(bonus[j].ninteger).d;
|
||||
buf[m++] = ubuf(bonus[j].ndouble).d;
|
||||
memcpy(&buf[m],bonus[j].ivalue,bonus[j].ninteger*sizeof(int));
|
||||
if (intdoubleratio == 1) m += bonus[j].ninteger;
|
||||
else m += (bonus[j].ninteger+1)/2;
|
||||
@ -1027,17 +1027,17 @@ int AtomVecBody::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;
|
||||
|
||||
rmass[nlocal] = buf[m++];
|
||||
angmom[nlocal][0] = buf[m++];
|
||||
angmom[nlocal][1] = buf[m++];
|
||||
angmom[nlocal][2] = buf[m++];
|
||||
|
||||
body[nlocal] = static_cast<int> (buf[m++]);
|
||||
body[nlocal] = (int) ubuf(buf[m++]).i;
|
||||
if (body[nlocal] == 0) body[nlocal] = -1;
|
||||
else {
|
||||
if (nlocal_bonus == nmax_bonus) grow_bonus();
|
||||
@ -1050,8 +1050,8 @@ int AtomVecBody::unpack_exchange(double *buf)
|
||||
inertia[0] = buf[m++];
|
||||
inertia[1] = buf[m++];
|
||||
inertia[2] = buf[m++];
|
||||
bonus[nlocal_bonus].ninteger = static_cast<int> (buf[m++]);
|
||||
bonus[nlocal_bonus].ndouble = static_cast<int> (buf[m++]);
|
||||
bonus[nlocal_bonus].ninteger = (int) ubuf(buf[m++]).i;
|
||||
bonus[nlocal_bonus].ndouble = (int) ubuf(buf[m++]).i;
|
||||
bonus[nlocal_bonus].ivalue = icp->get(bonus[nlocal_bonus].ninteger,
|
||||
bonus[nlocal_bonus].iindex);
|
||||
bonus[nlocal_bonus].dvalue = dcp->get(bonus[nlocal_bonus].ndouble,
|
||||
@ -1116,10 +1116,10 @@ int AtomVecBody::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];
|
||||
@ -1129,9 +1129,9 @@ int AtomVecBody::pack_restart(int i, double *buf)
|
||||
buf[m++] = angmom[i][1];
|
||||
buf[m++] = angmom[i][2];
|
||||
|
||||
if (body[i] < 0) buf[m++] = 0;
|
||||
if (body[i] < 0) buf[m++] = ubuf(0).d;
|
||||
else {
|
||||
buf[m++] = 1;
|
||||
buf[m++] = ubuf(1).d;
|
||||
int j = body[i];
|
||||
double *quat = bonus[j].quat;
|
||||
double *inertia = bonus[j].inertia;
|
||||
@ -1142,8 +1142,8 @@ int AtomVecBody::pack_restart(int i, double *buf)
|
||||
buf[m++] = inertia[0];
|
||||
buf[m++] = inertia[1];
|
||||
buf[m++] = inertia[2];
|
||||
buf[m++] = bonus[j].ninteger;
|
||||
buf[m++] = bonus[j].ndouble;
|
||||
buf[m++] = ubuf(bonus[j].ninteger).d;
|
||||
buf[m++] = ubuf(bonus[j].ndouble).d;
|
||||
memcpy(&buf[m],bonus[j].ivalue,bonus[j].ninteger*sizeof(int));
|
||||
if (intdoubleratio == 1) m += bonus[j].ninteger;
|
||||
else m += (bonus[j].ninteger+1)/2;
|
||||
@ -1176,10 +1176,10 @@ int AtomVecBody::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++];
|
||||
@ -1189,7 +1189,7 @@ int AtomVecBody::unpack_restart(double *buf)
|
||||
angmom[nlocal][1] = buf[m++];
|
||||
angmom[nlocal][2] = buf[m++];
|
||||
|
||||
body[nlocal] = static_cast<int> (buf[m++]);
|
||||
body[nlocal] = (int) ubuf(buf[m++]).i;
|
||||
if (body[nlocal] == 0) body[nlocal] = -1;
|
||||
else {
|
||||
if (nlocal_bonus == nmax_bonus) grow_bonus();
|
||||
@ -1202,8 +1202,8 @@ int AtomVecBody::unpack_restart(double *buf)
|
||||
inertia[0] = buf[m++];
|
||||
inertia[1] = buf[m++];
|
||||
inertia[2] = buf[m++];
|
||||
bonus[nlocal_bonus].ninteger = static_cast<int> (buf[m++]);
|
||||
bonus[nlocal_bonus].ndouble = static_cast<int> (buf[m++]);
|
||||
bonus[nlocal_bonus].ninteger = (int) ubuf(buf[m++]).i;
|
||||
bonus[nlocal_bonus].ndouble = (int) ubuf(buf[m++]).i;
|
||||
bonus[nlocal_bonus].ivalue = icp->get(bonus[nlocal_bonus].ninteger,
|
||||
bonus[nlocal_bonus].iindex);
|
||||
bonus[nlocal_bonus].dvalue = dcp->get(bonus[nlocal_bonus].ndouble,
|
||||
@ -1409,17 +1409,17 @@ void AtomVecBody::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];
|
||||
if (body[i] < 0) buf[i][2] = 0;
|
||||
else buf[i][2] = 1;
|
||||
buf[i][0] = ubuf(tag[i]).d;
|
||||
buf[i][1] = ubuf(type[i]).d;
|
||||
if (body[i] < 0) buf[i][2] = ubuf(0).d;
|
||||
else buf[i][2] = ubuf(1).d;
|
||||
buf[i][3] = rmass[i];
|
||||
buf[i][4] = x[i][0];
|
||||
buf[i][5] = x[i][1];
|
||||
buf[i][6] = x[i][2];
|
||||
buf[i][7] = (image[i] & IMGMASK) - IMGMAX;
|
||||
buf[i][8] = (image[i] >> IMGBITS & IMGMASK) - IMGMAX;
|
||||
buf[i][9] = (image[i] >> IMG2BITS) - IMGMAX;
|
||||
buf[i][7] = ubuf((image[i] & IMGMASK) - IMGMAX).d;
|
||||
buf[i][8] = ubuf((image[i] >> IMGBITS & IMGMASK) - IMGMAX).d;
|
||||
buf[i][9] = ubuf((image[i] >> IMG2BITS) - IMGMAX).d;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1429,8 +1429,8 @@ void AtomVecBody::pack_data(double **buf)
|
||||
|
||||
int AtomVecBody::pack_data_hybrid(int i, double *buf)
|
||||
{
|
||||
if (body[i] < 0) buf[0] = 0;
|
||||
else buf[0] = 1;
|
||||
if (body[i] < 0) buf[0] = ubuf(0).d;
|
||||
else buf[0] = ubuf(1).d;
|
||||
buf[1] = rmass[i];
|
||||
return 2;
|
||||
}
|
||||
@ -1443,9 +1443,11 @@ void AtomVecBody::write_data(FILE *fp, int n, double **buf)
|
||||
{
|
||||
for (int i = 0; i < n; i++)
|
||||
fprintf(fp,"%d %d %d %g %g %g %g %d %d %d\n",
|
||||
(int) buf[i][0],(int) buf[i][1],(int) buf[i][2],
|
||||
(int) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i,
|
||||
(int) ubuf(buf[i][2]).i,
|
||||
buf[i][3],buf[i][4],buf[i][5],buf[i][6],
|
||||
(int) buf[i][7],(int) buf[i][8],(int) buf[i][9]);
|
||||
(int) ubuf(buf[i][7]).i,(int) ubuf(buf[i][8]).i,
|
||||
(int) ubuf(buf[i][9]).i);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -1454,7 +1456,7 @@ void AtomVecBody::write_data(FILE *fp, int n, double **buf)
|
||||
|
||||
int AtomVecBody::write_data_hybrid(FILE *fp, double *buf)
|
||||
{
|
||||
fprintf(fp," %d %g",(int) buf[0],buf[1]);
|
||||
fprintf(fp," %d %g",(int) ubuf(buf[0]).i,buf[1]);
|
||||
return 2;
|
||||
}
|
||||
|
||||
@ -1466,7 +1468,7 @@ void AtomVecBody::pack_vel(double **buf)
|
||||
{
|
||||
int nlocal = atom->nlocal;
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
buf[i][0] = tag[i];
|
||||
buf[i][0] = ubuf(tag[i]).d;
|
||||
buf[i][1] = v[i][0];
|
||||
buf[i][2] = v[i][1];
|
||||
buf[i][3] = v[i][2];
|
||||
@ -1496,7 +1498,7 @@ void AtomVecBody::write_vel(FILE *fp, int n, double **buf)
|
||||
{
|
||||
for (int i = 0; i < n; i++)
|
||||
fprintf(fp,"%d %g %g %g %g %g %g\n",
|
||||
(int) buf[i][0],buf[i][1],buf[i][2],buf[i][3],
|
||||
(int) ubuf(buf[i][0]).i,buf[i][1],buf[i][2],buf[i][3],
|
||||
buf[i][4],buf[i][5],buf[i][6]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user