Changed pre_exchange flag

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9273 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
athomps 2013-01-15 19:07:38 +00:00
parent 94a21c0d3d
commit b95500d330
2 changed files with 8 additions and 5 deletions

View File

@ -442,11 +442,12 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
else if (pcouple == XYZ || (dimension == 2 && pcouple == XY)) pstyle = ISO;
else pstyle = ANISO;
// reneighboring only forced if flips can occur due to shape changes
// pre_exchange only required if flips can occur due to shape changes
if (flipflag && (p_flag[3] || p_flag[4] || p_flag[5])) force_reneighbor = 1;
pre_exchange_flag = 0;
if (flipflag && (p_flag[3] || p_flag[4] || p_flag[5])) pre_exchange_flag = 1;
if (flipflag && (domain->yz != 0.0 || domain->xz != 0.0 || domain->xy != 0.0))
force_reneighbor = 1;
pre_exchange_flag = 1;
// convert input periods to frequencies
@ -515,7 +516,7 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
nrigid = 0;
rfix = NULL;
if (force_reneighbor) irregular = new Irregular(lmp);
if (pre_exchange_flag) irregular = new Irregular(lmp);
else irregular = NULL;
// initialize vol0,t0 to zero to signal uninitialized
@ -567,7 +568,7 @@ int FixNH::setmask()
mask |= THERMO_ENERGY;
mask |= INITIAL_INTEGRATE_RESPA;
mask |= FINAL_INTEGRATE_RESPA;
if (force_reneighbor) mask |= PRE_EXCHANGE;
if (pre_exchange_flag) mask |= PRE_EXCHANGE;
return mask;
}

View File

@ -114,6 +114,8 @@ class FixNH : public Fix {
int scalexy; // 1 if xy scaled with ly
int flipflag; // 1 if box flips are invoked as needed
int pre_exchange_flag; // set if pre_exchange needed for box flips
double fixedpoint[3]; // location of dilation fixed-point
void couple();