avoid segfault when trying to apply (strict) pbc or convert to/from fractional coordinates on an MPI rank without atoms

This commit is contained in:
Axel Kohlmeyer
2021-08-26 07:10:47 -04:00
parent 84896fc7d4
commit a7f4bbffcf
2 changed files with 9 additions and 4 deletions

View File

@ -528,10 +528,11 @@ void Domain::reset_box()
void Domain::pbc()
{
int nlocal = atom->nlocal;
if (!nlocal) return;
int i;
imageint idim,otherdims;
double *lo,*hi,*period;
int nlocal = atom->nlocal;
double **x = atom->x;
double **v = atom->v;
int *mask = atom->mask;