git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9380 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2013-02-01 16:52:14 +00:00
parent 9b7bd3e892
commit 69a209f09d
5 changed files with 72 additions and 12 deletions

View File

@ -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;
}
/* ----------------------------------------------------------------------