Merge pull request #1344 from erozic/bugfix-library-scatter-subset

Fixed bug in lammps_scatter_atoms_subset...
This commit is contained in:
Axel Kohlmeyer 2019-02-22 15:10:33 -05:00 committed by GitHub
commit 394fd751d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -1363,9 +1363,11 @@ void lammps_scatter_atoms_subset(void *ptr, char *name,
int *dptr = (int *) data;
if (count == 1) {
for (i = 0; i < ndata; i++)
if ((m = lmp->atom->map(i+1)) >= 0)
for (i = 0; i < ndata; i++) {
id = ids[i];
if ((m = lmp->atom->map(id)) >= 0)
vector[m] = dptr[i];
}
} else if (imgpack) {
for (i = 0; i < ndata; i++) {