git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5940 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -228,6 +228,20 @@ int AtomVecElectron::pack_comm_vel(int n, int *list, double *buf,
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecElectron::pack_comm_hybrid(int n, int *list, double *buf)
|
||||
{
|
||||
int i,j,m;
|
||||
|
||||
m = 0;
|
||||
for (i = 0; i < n; i++) {
|
||||
j = list[i];
|
||||
buf[m++] = eradius[i];
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void AtomVecElectron::unpack_comm(int n, int first, double *buf)
|
||||
{
|
||||
int i,m,last;
|
||||
@ -263,18 +277,15 @@ void AtomVecElectron::unpack_comm_vel(int n, int first, double *buf)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecElectron::pack_comm_one(int i, double *buf)
|
||||
int AtomVecElectron::unpack_comm_hybrid(int n, int first, double *buf)
|
||||
{
|
||||
buf[0] = eradius[i];
|
||||
return 1;
|
||||
}
|
||||
int i,m,last;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecElectron::unpack_comm_one(int i, double *buf)
|
||||
{
|
||||
eradius[i] = buf[0];
|
||||
return 1;
|
||||
m = 0;
|
||||
last = first + n;
|
||||
for (i = first; i < last; i++)
|
||||
eradius[i] = buf[m++];
|
||||
return m;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -296,10 +307,15 @@ int AtomVecElectron::pack_reverse(int n, int first, double *buf)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecElectron::pack_reverse_one(int i, double *buf)
|
||||
int AtomVecElectron::pack_reverse_hybrid(int n, int first, double *buf)
|
||||
{
|
||||
buf[0] = erforce[i];
|
||||
return 1;
|
||||
int i,m,last;
|
||||
|
||||
m = 0;
|
||||
last = first + n;
|
||||
for (i = first; i < last; i++)
|
||||
buf[m++] = erforce[i];
|
||||
return m;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -320,10 +336,16 @@ void AtomVecElectron::unpack_reverse(int n, int *list, double *buf)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecElectron::unpack_reverse_one(int i, double *buf)
|
||||
int AtomVecElectron::unpack_reverse_hybrid(int n, int *list, double *buf)
|
||||
{
|
||||
erforce[i] += buf[0];
|
||||
return 1;
|
||||
int i,j,m;
|
||||
|
||||
m = 0;
|
||||
for (i = 0; i < n; i++) {
|
||||
j = list[i];
|
||||
erforce[j] += buf[m++];
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -457,12 +479,18 @@ int AtomVecElectron::pack_border_vel(int n, int *list, double *buf,
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecElectron::pack_border_one(int i, double *buf)
|
||||
int AtomVecElectron::pack_border_hybrid(int n, int *list, double *buf)
|
||||
{
|
||||
buf[0] = q[i];
|
||||
buf[1] = spin[i];
|
||||
buf[2] = eradius[i];
|
||||
return 3;
|
||||
int i,j,m;
|
||||
|
||||
m = 0;
|
||||
for (i = 0; i < n; i++) {
|
||||
j = list[i];
|
||||
buf[m++] = q[j];
|
||||
buf[m++] = spin[j];
|
||||
buf[m++] = eradius[j];
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -514,12 +542,18 @@ void AtomVecElectron::unpack_border_vel(int n, int first, double *buf)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecElectron::unpack_border_one(int i, double *buf)
|
||||
int AtomVecElectron::unpack_border_hybrid(int n, int first, double *buf)
|
||||
{
|
||||
q[i] = buf[0];
|
||||
spin[i] = static_cast<int> (buf[1]);
|
||||
eradius[i] = buf[2];
|
||||
return 3;
|
||||
int i,m,last;
|
||||
|
||||
m = 0;
|
||||
last = first + n;
|
||||
for (i = first; i < last; i++) {
|
||||
q[i] = buf[m++];
|
||||
spin[i] = static_cast<int> (buf[m++]);
|
||||
eradius[i] = buf[m++];
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user