check only in currently added data file atoms for dihedral overflow

This commit is contained in:
Axel Kohlmeyer 2018-11-14 05:29:26 -05:00
parent 4c1fbc359a
commit 7a22b8aa62
1 changed files with 1 additions and 1 deletions

View File

@ -1435,7 +1435,7 @@ void ReadData::dihedrals(int firstpass)
if (firstpass) {
int max = 0;
for (int i = 0; i < nlocal; i++) max = MAX(max,count[i]);
for (int i = nlocal_previous; i < nlocal; i++) max = MAX(max,count[i]);
int maxall;
MPI_Allreduce(&max,&maxall,1,MPI_INT,MPI_MAX,world);
if (addflag == NONE) maxall += atom->extra_dihedral_per_atom;