make certain binlo/binhi are initialized
This commit is contained in:
@ -43,7 +43,9 @@ static int compare_coords(const int, const int, void *);
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ResetAtomsID::ResetAtomsID(LAMMPS *lmp) : Command(lmp) {}
|
||||
ResetAtomsID::ResetAtomsID(LAMMPS *lmp) : Command(lmp) {
|
||||
binlo = binhi = -1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -480,6 +482,9 @@ int ResetAtomsID::sort_bins(int n, char *inbuf, int &flag, int *&proclist, char
|
||||
bigint binlo = rptr->binlo;
|
||||
bigint binhi = rptr->binhi;
|
||||
|
||||
if ((binlo < 0) || (binhi < 0))
|
||||
error->one(FLERR, "Called sort_bins without previous setup of bins");
|
||||
|
||||
// nbins = my subset of bins from binlo to binhi-1
|
||||
// initialize linked lists of my Rvous atoms in each bin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user