forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5750 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
e91220a661
commit
de606547aa
|
@ -176,7 +176,7 @@ int AtomVecDipole::pack_comm_vel(int n, int *list, double *buf,
|
||||||
int pbc_flag, int *pbc)
|
int pbc_flag, int *pbc)
|
||||||
{
|
{
|
||||||
int i,j,m;
|
int i,j,m;
|
||||||
double dx,dy,dz;
|
double dx,dy,dz,dvx,dvy,dvz;
|
||||||
|
|
||||||
m = 0;
|
m = 0;
|
||||||
if (pbc_flag == 0) {
|
if (pbc_flag == 0) {
|
||||||
|
@ -205,6 +205,7 @@ int AtomVecDipole::pack_comm_vel(int n, int *list, double *buf,
|
||||||
dy = pbc[1]*domain->yprd + pbc[3]*domain->yz;
|
dy = pbc[1]*domain->yprd + pbc[3]*domain->yz;
|
||||||
dz = pbc[2]*domain->zprd;
|
dz = pbc[2]*domain->zprd;
|
||||||
}
|
}
|
||||||
|
if (!deform_vremap) {
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
j = list[i];
|
j = list[i];
|
||||||
buf[m++] = x[j][0] + dx;
|
buf[m++] = x[j][0] + dx;
|
||||||
|
@ -220,6 +221,32 @@ int AtomVecDipole::pack_comm_vel(int n, int *list, double *buf,
|
||||||
buf[m++] = omega[j][1];
|
buf[m++] = omega[j][1];
|
||||||
buf[m++] = omega[j][2];
|
buf[m++] = omega[j][2];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4];
|
||||||
|
dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3];
|
||||||
|
dvz = pbc[2]*h_rate[2];
|
||||||
|
for (i = 0; i < n; i++) {
|
||||||
|
j = list[i];
|
||||||
|
buf[m++] = x[j][0] + dx;
|
||||||
|
buf[m++] = x[j][1] + dy;
|
||||||
|
buf[m++] = x[j][2] + dz;
|
||||||
|
buf[m++] = mu[j][0];
|
||||||
|
buf[m++] = mu[j][1];
|
||||||
|
buf[m++] = mu[j][2];
|
||||||
|
if (mask[i] & deform_groupbit) {
|
||||||
|
buf[m++] = v[j][0] + dvx;
|
||||||
|
buf[m++] = v[j][1] + dvy;
|
||||||
|
buf[m++] = v[j][2] + dvz;
|
||||||
|
} else {
|
||||||
|
buf[m++] = v[j][0];
|
||||||
|
buf[m++] = v[j][1];
|
||||||
|
buf[m++] = v[j][2];
|
||||||
|
}
|
||||||
|
buf[m++] = omega[j][0];
|
||||||
|
buf[m++] = omega[j][1];
|
||||||
|
buf[m++] = omega[j][2];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
@ -399,7 +426,7 @@ int AtomVecDipole::pack_border_vel(int n, int *list, double *buf,
|
||||||
int pbc_flag, int *pbc)
|
int pbc_flag, int *pbc)
|
||||||
{
|
{
|
||||||
int i,j,m;
|
int i,j,m;
|
||||||
double dx,dy,dz;
|
double dx,dy,dz,dvx,dvy,dvz;
|
||||||
|
|
||||||
m = 0;
|
m = 0;
|
||||||
if (pbc_flag == 0) {
|
if (pbc_flag == 0) {
|
||||||
|
@ -432,6 +459,7 @@ int AtomVecDipole::pack_border_vel(int n, int *list, double *buf,
|
||||||
dy = pbc[1];
|
dy = pbc[1];
|
||||||
dz = pbc[2];
|
dz = pbc[2];
|
||||||
}
|
}
|
||||||
|
if (!deform_vremap) {
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
j = list[i];
|
j = list[i];
|
||||||
buf[m++] = x[j][0] + dx;
|
buf[m++] = x[j][0] + dx;
|
||||||
|
@ -451,6 +479,36 @@ int AtomVecDipole::pack_border_vel(int n, int *list, double *buf,
|
||||||
buf[m++] = omega[j][1];
|
buf[m++] = omega[j][1];
|
||||||
buf[m++] = omega[j][2];
|
buf[m++] = omega[j][2];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4];
|
||||||
|
dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3];
|
||||||
|
dvz = pbc[2]*h_rate[2];
|
||||||
|
for (i = 0; i < n; i++) {
|
||||||
|
j = list[i];
|
||||||
|
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++] = q[j];
|
||||||
|
buf[m++] = mu[j][0];
|
||||||
|
buf[m++] = mu[j][1];
|
||||||
|
buf[m++] = mu[j][2];
|
||||||
|
if (mask[i] & deform_groupbit) {
|
||||||
|
buf[m++] = v[j][0] + dvx;
|
||||||
|
buf[m++] = v[j][1] + dvy;
|
||||||
|
buf[m++] = v[j][2] + dvz;
|
||||||
|
} else {
|
||||||
|
buf[m++] = v[j][0];
|
||||||
|
buf[m++] = v[j][1];
|
||||||
|
buf[m++] = v[j][2];
|
||||||
|
}
|
||||||
|
buf[m++] = omega[j][0];
|
||||||
|
buf[m++] = omega[j][1];
|
||||||
|
buf[m++] = omega[j][2];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue