git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5659 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -28,6 +28,7 @@ class Neighbor : protected Pointers {
|
||||
int pgsize; // size of neighbor page
|
||||
int oneatom; // max # of neighbors for one atom
|
||||
int includegroup; // only build pairwise lists for this group
|
||||
int build_once; // 1 if only build lists once per run
|
||||
|
||||
double skin; // skin distance
|
||||
double cutneighmin; // min neighbor cutoff for all type pairs
|
||||
@ -79,7 +80,6 @@ class Neighbor : protected Pointers {
|
||||
int maxbond,maxangle,maxdihedral,maximproper; // size of bond lists
|
||||
int maxwt; // max weighting factor applied + 1
|
||||
|
||||
int build_once; // 1 if only build lists once per run
|
||||
int must_check; // 1 if must check other classes to reneigh
|
||||
int restart_check; // 1 if restart enabled, 0 if no
|
||||
int fix_check; // # of fixes that induce reneigh
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
#include "dihedral.h"
|
||||
#include "improper.h"
|
||||
#include "update.h"
|
||||
#include "neighbor.h"
|
||||
#include "domain.h"
|
||||
#include "modify.h"
|
||||
#include "universe.h"
|
||||
@ -119,6 +120,15 @@ void WriteRestart::command(int narg, char **arg)
|
||||
|
||||
void WriteRestart::write(char *file)
|
||||
{
|
||||
// special case where reneighboring is not done in integrator
|
||||
// on timestep restart file is written (due to build_once being set)
|
||||
// if box is changing, must be reset, else restart file will have
|
||||
// wrong box size and atoms will be lost when restart file is read
|
||||
// other calls to pbc and domain and comm are not made,
|
||||
// b/c they only make sense if reneighboring is actually performed
|
||||
|
||||
if (neighbor->build_once) domain->reset_box();
|
||||
|
||||
// natoms = sum of nlocal = value to write into restart file
|
||||
// if unequal and thermo lostflag is "error", don't write restart file
|
||||
|
||||
|
||||
Reference in New Issue
Block a user