second round of making per-atom allocations consistent.

now all sections that dimension per-atom local arrays to atom->nmax
will also *test* for atom->nmax and thus we avoid potential segfaults
in all cases where atom->nlocal or atom->nlocal+atom->nghost are 0.
it doesn't make sense to test for these if the arrays are dimensioned
to atom->nmax afterwards anyway.
This commit is contained in:
Axel Kohlmeyer
2016-05-13 15:10:26 -04:00
parent 4c07a99a7a
commit 068898765a
36 changed files with 47 additions and 47 deletions

View File

@ -901,7 +901,7 @@ void DumpImage::create_image()
// communicate choose flag for ghost atoms to know if they are selected
// if bcolor/bdiam = ATOM, setup bufcopy to comm atom color/diam attributes
if (nall > maxbufcopy) {
if (atom->nmax > maxbufcopy) {
maxbufcopy = atom->nmax;
memory->destroy(chooseghost);
memory->create(chooseghost,maxbufcopy,"dump:chooseghost");