git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8226 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
@ -51,8 +51,8 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) :
|
||||
int iarg = 3;
|
||||
while (iarg < narg) {
|
||||
if ((strcmp(arg[iarg],"xlo") == 0) || (strcmp(arg[iarg],"xhi") == 0) ||
|
||||
(strcmp(arg[iarg],"ylo") == 0) || (strcmp(arg[iarg],"yhi") == 0) ||
|
||||
(strcmp(arg[iarg],"zlo") == 0) || (strcmp(arg[iarg],"zhi") == 0)) {
|
||||
(strcmp(arg[iarg],"ylo") == 0) || (strcmp(arg[iarg],"yhi") == 0) ||
|
||||
(strcmp(arg[iarg],"zlo") == 0) || (strcmp(arg[iarg],"zhi") == 0)) {
|
||||
if (iarg+5 > narg) error->all(FLERR,"Illegal fix wall command");
|
||||
|
||||
int newwall;
|
||||
@ -64,24 +64,24 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) :
|
||||
else if (strcmp(arg[iarg],"zhi") == 0) newwall = ZHI;
|
||||
|
||||
for (int m = 0; m < nwall; m++)
|
||||
if (newwall == wallwhich[m])
|
||||
error->all(FLERR,"Wall defined twice in fix wall command");
|
||||
if (newwall == wallwhich[m])
|
||||
error->all(FLERR,"Wall defined twice in fix wall command");
|
||||
|
||||
wallwhich[nwall] = newwall;
|
||||
if (strcmp(arg[iarg+1],"EDGE") == 0) {
|
||||
wallstyle[nwall] = EDGE;
|
||||
int dim = wallwhich[nwall] / 2;
|
||||
int side = wallwhich[nwall] % 2;
|
||||
if (side == 0) coord0[nwall] = domain->boxlo[dim];
|
||||
else coord0[nwall] = domain->boxhi[dim];
|
||||
wallstyle[nwall] = EDGE;
|
||||
int dim = wallwhich[nwall] / 2;
|
||||
int side = wallwhich[nwall] % 2;
|
||||
if (side == 0) coord0[nwall] = domain->boxlo[dim];
|
||||
else coord0[nwall] = domain->boxhi[dim];
|
||||
} else if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) {
|
||||
wallstyle[nwall] = VARIABLE;
|
||||
int n = strlen(&arg[iarg+1][2]) + 1;
|
||||
varstr[nwall] = new char[n];
|
||||
strcpy(varstr[nwall],&arg[iarg+1][2]);
|
||||
wallstyle[nwall] = VARIABLE;
|
||||
int n = strlen(&arg[iarg+1][2]) + 1;
|
||||
varstr[nwall] = new char[n];
|
||||
strcpy(varstr[nwall],&arg[iarg+1][2]);
|
||||
} else {
|
||||
wallstyle[nwall] = CONSTANT;
|
||||
coord0[nwall] = atof(arg[iarg+1]);
|
||||
wallstyle[nwall] = CONSTANT;
|
||||
coord0[nwall] = atof(arg[iarg+1]);
|
||||
}
|
||||
|
||||
epsilon[nwall] = atof(arg[iarg+2]);
|
||||
@ -126,7 +126,7 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) :
|
||||
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
|
||||
|
||||
int flag = 0;
|
||||
|
||||
Reference in New Issue
Block a user