Merge pull request #2424 from jtclemm/restart_neigh_hist

Patching neighbor history restarts
This commit is contained in:
Richard Berger
2020-11-19 11:13:50 -05:00
committed by GitHub
2 changed files with 20 additions and 0 deletions

View File

@ -40,6 +40,8 @@ FixNeighHistory::FixNeighHistory(LAMMPS *lmp, int narg, char **arg) :
if (narg != 4) error->all(FLERR,"Illegal fix NEIGH_HISTORY command");
restart_peratom = 1;
restart_global = 1;
create_attribute = 1;
maxexchange_dynamic = 1;
@ -840,6 +842,23 @@ int FixNeighHistory::unpack_exchange(int nlocal, double *buf)
return m;
}
/* ----------------------------------------------------------------------
Use write_restart to invoke pre_exchange
------------------------------------------------------------------------- */
void FixNeighHistory::write_restart(FILE *fp)
{
// Call pre-exchange to copy updated history in page file
// back into per-atom arrays prior to packing restart data
pre_exchange();
if (comm->me == 0) {
int size = 0;
fwrite(&size,sizeof(int),1,fp);
}
}
/* ----------------------------------------------------------------------
pack values in local atom-based arrays for restart file
------------------------------------------------------------------------- */