git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12118 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2014-06-11 15:20:11 +00:00
parent eabfaf18ec
commit d560473a6b
3 changed files with 10 additions and 4 deletions

View File

@ -148,9 +148,13 @@ void Domain::init()
/* ----------------------------------------------------------------------
set initial global box
assumes boxlo/hi and triclinic tilts are already set
expandflag = 1 if need to expand box in shrink-wrapped dims
not invoked by read_restart since box is already expanded
if don't prevent further expansion, restarted triclinic box
with unchanged tilt factors can become a box with atoms outside the box
------------------------------------------------------------------------- */
void Domain::set_initial_box()
void Domain::set_initial_box(int expandflag)
{
// error checks for orthogonal and triclinic domains
@ -180,7 +184,9 @@ void Domain::set_initial_box()
small[1] = SMALL * (boxhi[1] - boxlo[1]);
small[2] = SMALL * (boxhi[2] - boxlo[2]);
// adjust box lo/hi for shrink-wrapped dims
// if expandflag, adjust box lo/hi for shrink-wrapped dims
if (!expandflag) return;
if (boundary[0][0] == 2) boxlo[0] -= small[0];
else if (boundary[0][0] == 3) minxlo = boxlo[0];

View File

@ -93,7 +93,7 @@ class Domain : protected Pointers {
Domain(class LAMMPS *);
virtual ~Domain();
virtual void init();
void set_initial_box();
void set_initial_box(int expandflag=1);
virtual void set_global_box();
virtual void set_lamda_box();
virtual void set_local_box();

View File

@ -156,7 +156,7 @@ void ReadRestart::command(int narg, char **arg)
n = atom->nmax;
domain->print_box(" ");
domain->set_initial_box();
domain->set_initial_box(0);
domain->set_global_box();
comm->set_proc_grid();
domain->set_local_box();