git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9380 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -153,8 +153,9 @@ void AtomVecEllipsoid::copy(int i, int j, int delflag)
|
||||
}
|
||||
|
||||
// if atom I has bonus data, reset I's bonus.ilocal to loc J
|
||||
// do NOT do this if self-copy (I=J) since I's bonus data is already deleted
|
||||
|
||||
if (ellipsoid[i] >= 0) bonus[ellipsoid[i]].ilocal = j;
|
||||
if (ellipsoid[i] >= 0 && i != j) bonus[ellipsoid[i]].ilocal = j;
|
||||
ellipsoid[j] = ellipsoid[i];
|
||||
|
||||
if (atom->nextra_grow)
|
||||
@ -164,13 +165,13 @@ void AtomVecEllipsoid::copy(int i, int j, int delflag)
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
copy bonus data from I to J, effectively deleting the J entry
|
||||
insure index pointers between per-atom and bonus data are updated
|
||||
also reset ellipsoid that points to I to now point to J
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AtomVecEllipsoid::copy_bonus(int i, int j)
|
||||
{
|
||||
ellipsoid[bonus[i].ilocal] = j;
|
||||
memcpy(&bonus[j],&bonus[i],sizeof(Bonus));
|
||||
ellipsoid[bonus[j].ilocal] = j;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user