mirror of https://github.com/lammps/lammps.git
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8925 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
7feb074d66
commit
9266997555
|
@ -47,6 +47,7 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) :
|
|||
nwall = 0;
|
||||
int scaleflag = 1;
|
||||
fldflag = 0;
|
||||
int pbcflag = 1;
|
||||
|
||||
int iarg = 3;
|
||||
while (iarg < narg) {
|
||||
|
@ -102,18 +103,29 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) :
|
|||
else if (strcmp(arg[iarg+1],"yes") == 0) fldflag = 1;
|
||||
else error->all(FLERR,"Illegal fix wall command");
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"pbc") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix wall command");
|
||||
if (strcmp(arg[iarg+1],"yes") == 0) pbcflag = 1;
|
||||
else if (strcmp(arg[iarg+1],"no") == 0) pbcflag = 0;
|
||||
else error->all(FLERR,"Illegal fix wall command");
|
||||
iarg += 2;
|
||||
} else error->all(FLERR,"Illegal fix wall command");
|
||||
}
|
||||
|
||||
size_vector = nwall;
|
||||
|
||||
// error check
|
||||
// error checks
|
||||
|
||||
if (nwall == 0) error->all(FLERR,"Illegal fix wall command");
|
||||
for (int m = 0; m < nwall; m++)
|
||||
if (cutoff[m] <= 0.0)
|
||||
error->all(FLERR,"Fix wall cutoff <= 0.0");
|
||||
|
||||
for (int m = 0; m < nwall; m++)
|
||||
if ((wallwhich[m] == ZLO || wallwhich[m] == ZHI) && domain->dimension == 2)
|
||||
error->all(FLERR,"Cannot use fix wall zlo/zhi for a 2d simulation");
|
||||
|
||||
if (pbcflag) {
|
||||
for (int m = 0; m < nwall; m++) {
|
||||
if ((wallwhich[m] == XLO || wallwhich[m] == XHI) && domain->xperiodic)
|
||||
error->all(FLERR,"Cannot use fix wall in periodic dimension");
|
||||
|
@ -122,10 +134,7 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) :
|
|||
if ((wallwhich[m] == ZLO || wallwhich[m] == ZHI) && domain->zperiodic)
|
||||
error->all(FLERR,"Cannot use fix wall in periodic dimension");
|
||||
}
|
||||
|
||||
for (int m = 0; m < nwall; m++)
|
||||
if ((wallwhich[m] == ZLO || wallwhich[m] == ZHI) && domain->dimension == 2)
|
||||
error->all(FLERR,"Cannot use fix wall zlo/zhi for a 2d simulation");
|
||||
}
|
||||
|
||||
// scale factors for CONSTANT and VARIABLE walls
|
||||
|
||||
|
|
Loading…
Reference in New Issue