git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1409 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -158,6 +158,17 @@ int AtomVecEllipsoid::pack_comm(int n, int *list, double *buf,
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecEllipsoid::pack_comm_one(int i, double *buf)
|
||||
{
|
||||
buf[0] = quat[i][0];
|
||||
buf[1] = quat[i][1];
|
||||
buf[2] = quat[i][2];
|
||||
buf[3] = quat[i][3];
|
||||
return 4;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void AtomVecEllipsoid::unpack_comm(int n, int first, double *buf)
|
||||
{
|
||||
int i,m,last;
|
||||
@ -177,6 +188,17 @@ void AtomVecEllipsoid::unpack_comm(int n, int first, double *buf)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecEllipsoid::unpack_comm_one(int i, double *buf)
|
||||
{
|
||||
quat[i][0] = buf[0];
|
||||
quat[i][1] = buf[1];
|
||||
quat[i][2] = buf[2];
|
||||
quat[i][3] = buf[3];
|
||||
return 4;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecEllipsoid::pack_reverse(int n, int first, double *buf)
|
||||
{
|
||||
int i,m,last;
|
||||
@ -196,6 +218,16 @@ int AtomVecEllipsoid::pack_reverse(int n, int first, double *buf)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecEllipsoid::pack_reverse_one(int i, double *buf)
|
||||
{
|
||||
buf[0] = torque[i][0];
|
||||
buf[1] = torque[i][1];
|
||||
buf[2] = torque[i][2];
|
||||
return 3;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void AtomVecEllipsoid::unpack_reverse(int n, int *list, double *buf)
|
||||
{
|
||||
int i,j,m;
|
||||
@ -214,6 +246,16 @@ void AtomVecEllipsoid::unpack_reverse(int n, int *list, double *buf)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecEllipsoid::unpack_reverse_one(int i, double *buf)
|
||||
{
|
||||
torque[i][0] += buf[0];
|
||||
torque[i][1] += buf[1];
|
||||
torque[i][2] += buf[2];
|
||||
return 3;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecEllipsoid::pack_border(int n, int *list, double *buf,
|
||||
int pbc_flag, int *pbc)
|
||||
{
|
||||
@ -264,6 +306,17 @@ int AtomVecEllipsoid::pack_border(int n, int *list, double *buf,
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecEllipsoid::pack_border_one(int i, double *buf)
|
||||
{
|
||||
buf[0] = quat[i][0];
|
||||
buf[1] = quat[i][1];
|
||||
buf[2] = quat[i][2];
|
||||
buf[3] = quat[i][3];
|
||||
return 4;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void AtomVecEllipsoid::unpack_border(int n, int first, double *buf)
|
||||
{
|
||||
int i,m,last;
|
||||
@ -285,6 +338,17 @@ void AtomVecEllipsoid::unpack_border(int n, int first, double *buf)
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecEllipsoid::unpack_border_one(int i, double *buf)
|
||||
{
|
||||
quat[i][0] = buf[0];
|
||||
quat[i][1] = buf[1];
|
||||
quat[i][2] = buf[2];
|
||||
quat[i][3] = buf[3];
|
||||
return 4;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
pack data for atom I for sending to another proc
|
||||
xyz must be 1st 3 values, so comm::exchange() can test on them
|
||||
|
||||
@ -24,12 +24,18 @@ class AtomVecEllipsoid : public AtomVec {
|
||||
virtual ~AtomVecEllipsoid() {}
|
||||
void grow(int);
|
||||
void copy(int, int);
|
||||
virtual int pack_comm(int, int *, double *, int, int *);
|
||||
virtual void unpack_comm(int, int, double *);
|
||||
int pack_comm(int, int *, double *, int, int *);
|
||||
int pack_comm_one(int, double *);
|
||||
void unpack_comm(int, int, double *);
|
||||
int unpack_comm_one(int, double *);
|
||||
int pack_reverse(int, int, double *);
|
||||
int pack_reverse_one(int, double *);
|
||||
void unpack_reverse(int, int *, double *);
|
||||
virtual int pack_border(int, int *, double *, int, int *);
|
||||
virtual void unpack_border(int, int, double *);
|
||||
int unpack_reverse_one(int, double *);
|
||||
int pack_border(int, int *, double *, int, int *);
|
||||
int pack_border_one(int, double *);
|
||||
void unpack_border(int, int, double *);
|
||||
int unpack_border_one(int, double *);
|
||||
int pack_exchange(int, double *);
|
||||
int unpack_exchange(double *);
|
||||
int size_restart();
|
||||
|
||||
@ -240,9 +240,9 @@ void AtomVecDipole::unpack_reverse(int n, int *list, double *buf)
|
||||
|
||||
int AtomVecDipole::unpack_reverse_one(int i, double *buf)
|
||||
{
|
||||
torque[i][0] = buf[0];
|
||||
torque[i][1] = buf[1];
|
||||
torque[i][2] = buf[2];
|
||||
torque[i][0] += buf[0];
|
||||
torque[i][1] += buf[1];
|
||||
torque[i][2] += buf[2];
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
||||
@ -264,9 +264,9 @@ void AtomVecGranular::unpack_reverse(int n, int *list, double *buf)
|
||||
|
||||
int AtomVecGranular::unpack_reverse_one(int i, double *buf)
|
||||
{
|
||||
torque[i][0] = buf[0];
|
||||
torque[i][1] = buf[1];
|
||||
torque[i][2] = buf[2];
|
||||
torque[i][0] += buf[0];
|
||||
torque[i][1] += buf[1];
|
||||
torque[i][2] += buf[2];
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user