simplified neighbor list copying to avoid possible same-timestep re-build issues

This commit is contained in:
Steve Plimpton
2017-01-19 17:01:15 -07:00
parent 3af4b3c28c
commit 9a299875da
21 changed files with 222 additions and 233 deletions

View File

@ -56,11 +56,9 @@ enum{NSQ,BIN,MULTI}; // also in Neighbor
NStencil::NStencil(LAMMPS *lmp) : Pointers(lmp)
{
last_create = last_stencil_memory = -1;
last_copy_bin = -1;
last_stencil = -1;
xyzflag = 0;
maxstencil = maxstencil_multi = 0;
stencil = NULL;
stencilxyz = NULL;
@ -126,10 +124,8 @@ void NStencil::copy_bin_info()
void NStencil::create_setup()
{
if (nb && last_copy_bin < nb->last_setup) {
copy_bin_info();
last_copy_bin = update->ntimestep;
}
if (nb) copy_bin_info();
last_stencil = update->ntimestep;
// sx,sy,sz = max range of stencil in each dim
// smax = max possible size of entire 3d stencil
@ -157,7 +153,6 @@ void NStencil::create_setup()
memory->destroy(stencilxyz);
memory->create(stencilxyz,maxstencil,3,"neighstencil:stencilxyz");
}
last_stencil_memory = update->ntimestep;
}
} else {
@ -172,7 +167,6 @@ void NStencil::create_setup()
stencil_multi[i] = NULL;
distsq_multi[i] = NULL;
}
last_stencil_memory = update->ntimestep;
}
if (smax > maxstencil_multi) {
maxstencil_multi = smax;
@ -183,12 +177,9 @@ void NStencil::create_setup()
"neighstencil:stencil_multi");
memory->create(distsq_multi[i],maxstencil_multi,
"neighstencil:distsq_multi");
last_stencil_memory = update->ntimestep;
}
}
}
last_create = update->ntimestep;
}
/* ----------------------------------------------------------------------