git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10300 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -108,13 +108,20 @@ Domain::~Domain()
|
|||||||
|
|
||||||
void Domain::init()
|
void Domain::init()
|
||||||
{
|
{
|
||||||
// set box_change if box dimensions/shape ever changes
|
// set box_change flags if box size/shape/sub-domains ever change
|
||||||
// due to shrink-wrapping, fixes that change volume (npt, vol/rescale, etc)
|
// due to shrink-wrapping or fixes that change box size/shape/sub-domains
|
||||||
|
|
||||||
|
box_change_size = box_change_shape = box_change_domain = 0;
|
||||||
|
|
||||||
|
if (nonperiodic == 2) box_change_size = 1;
|
||||||
|
for (int i = 0; i < modify->nfix; i++) {
|
||||||
|
if (modify->fix[i]->box_change_size) box_change_size = 1;
|
||||||
|
if (modify->fix[i]->box_change_shape) box_change_shape = 1;
|
||||||
|
if (modify->fix[i]->box_change_domain) box_change_domain = 1;
|
||||||
|
}
|
||||||
|
|
||||||
box_change = 0;
|
box_change = 0;
|
||||||
if (nonperiodic == 2) box_change = 1;
|
if (box_change_size || box_change_shape || box_change_domain) box_change = 1;
|
||||||
for (int i = 0; i < modify->nfix; i++)
|
|
||||||
if (modify->fix[i]->box_change) box_change = 1;
|
|
||||||
|
|
||||||
// check for fix deform
|
// check for fix deform
|
||||||
|
|
||||||
|
|||||||
@ -75,7 +75,11 @@ class Domain : protected Pointers {
|
|||||||
double h[6],h_inv[6]; // shape matrix in Voigt notation
|
double h[6],h_inv[6]; // shape matrix in Voigt notation
|
||||||
double h_rate[6],h_ratelo[3]; // rate of box size/shape change
|
double h_rate[6],h_ratelo[3]; // rate of box size/shape change
|
||||||
|
|
||||||
int box_change; // 1 if box bounds ever change, 0 if fixed
|
int box_change; // 1 if any of next 3 flags are set, else 0
|
||||||
|
int box_change_size; // 1 if box size changes, 0 if not
|
||||||
|
int box_change_shape; // 1 if box shape changes, 0 if not
|
||||||
|
int box_change_domain; // 1 if proc sub-domains change, 0 if not
|
||||||
|
|
||||||
int deform_flag; // 1 if fix deform exist, else 0
|
int deform_flag; // 1 if fix deform exist, else 0
|
||||||
int deform_vremap; // 1 if fix deform remaps v, else 0
|
int deform_vremap; // 1 if fix deform remaps v, else 0
|
||||||
int deform_groupbit; // atom group to perform v remap for
|
int deform_groupbit; // atom group to perform v remap for
|
||||||
|
|||||||
@ -49,9 +49,7 @@ Fix::Fix(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
|||||||
restart_global = 0;
|
restart_global = 0;
|
||||||
restart_peratom = 0;
|
restart_peratom = 0;
|
||||||
force_reneighbor = 0;
|
force_reneighbor = 0;
|
||||||
box_change = 0;
|
box_change_size = box_change_shape = box_change_domain = 0;
|
||||||
box_change_size = 0;
|
|
||||||
box_change_shape = 0;
|
|
||||||
thermo_energy = 0;
|
thermo_energy = 0;
|
||||||
rigid_flag = 0;
|
rigid_flag = 0;
|
||||||
virial_flag = 0;
|
virial_flag = 0;
|
||||||
|
|||||||
@ -26,9 +26,11 @@ class Fix : protected Pointers {
|
|||||||
int restart_global; // 1 if Fix saves global state, 0 if not
|
int restart_global; // 1 if Fix saves global state, 0 if not
|
||||||
int restart_peratom; // 1 if Fix saves peratom state, 0 if not
|
int restart_peratom; // 1 if Fix saves peratom state, 0 if not
|
||||||
int force_reneighbor; // 1 if Fix forces reneighboring, 0 if not
|
int force_reneighbor; // 1 if Fix forces reneighboring, 0 if not
|
||||||
int box_change; // 1 if Fix changes box, 0 if not
|
|
||||||
int box_change_size; // 1 if Fix changes box size, 0 if not
|
int box_change_size; // 1 if Fix changes box size, 0 if not
|
||||||
int box_change_shape; // 1 if Fix changes box shape, 0 if not
|
int box_change_shape; // 1 if Fix changes box shape, 0 if not
|
||||||
|
int box_change_domain; // 1 if Fix changes proc sub-domains, 0 if not
|
||||||
|
|
||||||
bigint next_reneighbor; // next timestep to force a reneighboring
|
bigint next_reneighbor; // next timestep to force a reneighboring
|
||||||
int thermo_energy; // 1 if fix_modify enabled ThEng, 0 if not
|
int thermo_energy; // 1 if fix_modify enabled ThEng, 0 if not
|
||||||
int nevery; // how often to call an end_of_step fix
|
int nevery; // how often to call an end_of_step fix
|
||||||
|
|||||||
@ -75,7 +75,8 @@ FixAveSpatial::FixAveSpatial(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
else if (strcmp(arg[iarg+1],"center") == 0) originflag[ndim] = CENTER;
|
else if (strcmp(arg[iarg+1],"center") == 0) originflag[ndim] = CENTER;
|
||||||
else if (strcmp(arg[iarg+1],"upper") == 0) originflag[ndim] = UPPER;
|
else if (strcmp(arg[iarg+1],"upper") == 0) originflag[ndim] = UPPER;
|
||||||
else originflag[ndim] = COORD;
|
else originflag[ndim] = COORD;
|
||||||
if (originflag[ndim] == COORD) origin[ndim] = force->numeric(FLERR,arg[iarg+1]);
|
if (originflag[ndim] == COORD)
|
||||||
|
origin[ndim] = force->numeric(FLERR,arg[iarg+1]);
|
||||||
|
|
||||||
delta[ndim] = force->numeric(FLERR,arg[iarg+2]);
|
delta[ndim] = force->numeric(FLERR,arg[iarg+2]);
|
||||||
ndim++;
|
ndim++;
|
||||||
@ -441,8 +442,9 @@ void FixAveSpatial::init()
|
|||||||
// # of bins cannot vary for ave = RUNNING or WINDOW
|
// # of bins cannot vary for ave = RUNNING or WINDOW
|
||||||
|
|
||||||
if (ave == RUNNING || ave == WINDOW) {
|
if (ave == RUNNING || ave == WINDOW) {
|
||||||
if (scaleflag != REDUCED && domain->box_change)
|
if (scaleflag != REDUCED && domain->box_change_size)
|
||||||
error->all(FLERR,"Fix ave/spatial settings invalid with changing box");
|
error->all(FLERR,
|
||||||
|
"Fix ave/spatial settings invalid with changing box size");
|
||||||
}
|
}
|
||||||
|
|
||||||
// set indices and check validity of all computes,fixes,variables
|
// set indices and check validity of all computes,fixes,variables
|
||||||
|
|||||||
@ -34,7 +34,7 @@ FixBalance::FixBalance(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
{
|
{
|
||||||
if (narg < 7) error->all(FLERR,"Illegal fix balance command");
|
if (narg < 7) error->all(FLERR,"Illegal fix balance command");
|
||||||
|
|
||||||
box_change = 1;
|
box_change_domain = 1;
|
||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
extscalar = 0;
|
extscalar = 0;
|
||||||
vector_flag = 1;
|
vector_flag = 1;
|
||||||
|
|||||||
@ -48,7 +48,6 @@ FixBoxRelax::FixBoxRelax(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
extscalar = 1;
|
extscalar = 1;
|
||||||
global_freq = 1;
|
global_freq = 1;
|
||||||
box_change = 1;
|
|
||||||
no_change_box = 1;
|
no_change_box = 1;
|
||||||
|
|
||||||
// default values
|
// default values
|
||||||
|
|||||||
@ -50,7 +50,6 @@ FixDeform::FixDeform(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
|||||||
{
|
{
|
||||||
if (narg < 4) error->all(FLERR,"Illegal fix deform command");
|
if (narg < 4) error->all(FLERR,"Illegal fix deform command");
|
||||||
|
|
||||||
box_change = 1;
|
|
||||||
no_change_box = 1;
|
no_change_box = 1;
|
||||||
|
|
||||||
nevery = force->inumeric(FLERR,arg[3]);
|
nevery = force->inumeric(FLERR,arg[3]);
|
||||||
|
|||||||
@ -427,7 +427,6 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
|||||||
if (p_flag[i]) pstat_flag = 1;
|
if (p_flag[i]) pstat_flag = 1;
|
||||||
|
|
||||||
if (pstat_flag) {
|
if (pstat_flag) {
|
||||||
box_change = 1;
|
|
||||||
if (p_flag[0] || p_flag[1] || p_flag[2]) box_change_size = 1;
|
if (p_flag[0] || p_flag[1] || p_flag[2]) box_change_size = 1;
|
||||||
if (p_flag[3] || p_flag[4] || p_flag[5]) box_change_shape = 1;
|
if (p_flag[3] || p_flag[4] || p_flag[5]) box_change_shape = 1;
|
||||||
no_change_box = 1;
|
no_change_box = 1;
|
||||||
|
|||||||
@ -41,7 +41,6 @@ FixPressBerendsen::FixPressBerendsen(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
{
|
{
|
||||||
if (narg < 5) error->all(FLERR,"Illegal fix press/berendsen command");
|
if (narg < 5) error->all(FLERR,"Illegal fix press/berendsen command");
|
||||||
|
|
||||||
box_change = 1;
|
|
||||||
box_change_size = 1;
|
box_change_size = 1;
|
||||||
|
|
||||||
// Berendsen barostat applied every step
|
// Berendsen barostat applied every step
|
||||||
|
|||||||
@ -73,7 +73,8 @@ FixViscosity::FixViscosity(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
if (strcmp(arg[iarg],"swap") == 0) {
|
if (strcmp(arg[iarg],"swap") == 0) {
|
||||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix viscosity command");
|
if (iarg+2 > narg) error->all(FLERR,"Illegal fix viscosity command");
|
||||||
nswap = force->inumeric(FLERR,arg[iarg+1]);
|
nswap = force->inumeric(FLERR,arg[iarg+1]);
|
||||||
if (nswap <= 0) error->all(FLERR,"Fix viscosity swap value must be positive");
|
if (nswap <= 0)
|
||||||
|
error->all(FLERR,"Fix viscosity swap value must be positive");
|
||||||
iarg += 2;
|
iarg += 2;
|
||||||
} else if (strcmp(arg[iarg],"vtarget") == 0) {
|
} else if (strcmp(arg[iarg],"vtarget") == 0) {
|
||||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix viscosity command");
|
if (iarg+2 > narg) error->all(FLERR,"Illegal fix viscosity command");
|
||||||
|
|||||||
Reference in New Issue
Block a user