git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10160 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -53,7 +53,7 @@ FixDeform::FixDeform(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
||||
box_change = 1;
|
||||
no_change_box = 1;
|
||||
|
||||
nevery = atoi(arg[3]);
|
||||
nevery = force->inumeric(FLERR,arg[3]);
|
||||
if (nevery <= 0) error->all(FLERR,"Illegal fix deform command");
|
||||
|
||||
// set defaults
|
||||
@ -85,34 +85,34 @@ FixDeform::FixDeform(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
||||
if (strcmp(arg[iarg+1],"final") == 0) {
|
||||
if (iarg+4 > narg) error->all(FLERR,"Illegal fix deform command");
|
||||
set[index].style = FINAL;
|
||||
set[index].flo = atof(arg[iarg+2]);
|
||||
set[index].fhi = atof(arg[iarg+3]);
|
||||
set[index].flo = force->numeric(FLERR,arg[iarg+2]);
|
||||
set[index].fhi = force->numeric(FLERR,arg[iarg+3]);
|
||||
iarg += 4;
|
||||
} else if (strcmp(arg[iarg+1],"delta") == 0) {
|
||||
if (iarg+4 > narg) error->all(FLERR,"Illegal fix deform command");
|
||||
set[index].style = DELTA;
|
||||
set[index].dlo = atof(arg[iarg+2]);
|
||||
set[index].dhi = atof(arg[iarg+3]);
|
||||
set[index].dlo = force->numeric(FLERR,arg[iarg+2]);
|
||||
set[index].dhi = force->numeric(FLERR,arg[iarg+3]);
|
||||
iarg += 4;
|
||||
} else if (strcmp(arg[iarg+1],"scale") == 0) {
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal fix deform command");
|
||||
set[index].style = SCALE;
|
||||
set[index].scale = atof(arg[iarg+2]);
|
||||
set[index].scale = force->numeric(FLERR,arg[iarg+2]);
|
||||
iarg += 3;
|
||||
} else if (strcmp(arg[iarg+1],"vel") == 0) {
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal fix deform command");
|
||||
set[index].style = VEL;
|
||||
set[index].vel = atof(arg[iarg+2]);
|
||||
set[index].vel = force->numeric(FLERR,arg[iarg+2]);
|
||||
iarg += 3;
|
||||
} else if (strcmp(arg[iarg+1],"erate") == 0) {
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal fix deform command");
|
||||
set[index].style = ERATE;
|
||||
set[index].rate = atof(arg[iarg+2]);
|
||||
set[index].rate = force->numeric(FLERR,arg[iarg+2]);
|
||||
iarg += 3;
|
||||
} else if (strcmp(arg[iarg+1],"trate") == 0) {
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal fix deform command");
|
||||
set[index].style = TRATE;
|
||||
set[index].rate = atof(arg[iarg+2]);
|
||||
set[index].rate = force->numeric(FLERR,arg[iarg+2]);
|
||||
iarg += 3;
|
||||
} else if (strcmp(arg[iarg+1],"volume") == 0) {
|
||||
set[index].style = VOLUME;
|
||||
@ -120,8 +120,8 @@ FixDeform::FixDeform(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
||||
} else if (strcmp(arg[iarg+1],"wiggle") == 0) {
|
||||
if (iarg+4 > narg) error->all(FLERR,"Illegal fix deform command");
|
||||
set[index].style = WIGGLE;
|
||||
set[index].amplitude = atof(arg[iarg+2]);
|
||||
set[index].tperiod = atof(arg[iarg+3]);
|
||||
set[index].amplitude = force->numeric(FLERR,arg[iarg+2]);
|
||||
set[index].tperiod = force->numeric(FLERR,arg[iarg+3]);
|
||||
if (set[index].tperiod <= 0.0)
|
||||
error->all(FLERR,"Illegal fix deform command");
|
||||
iarg += 4;
|
||||
@ -157,33 +157,33 @@ FixDeform::FixDeform(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
||||
if (strcmp(arg[iarg+1],"final") == 0) {
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal fix deform command");
|
||||
set[index].style = FINAL;
|
||||
set[index].ftilt = atof(arg[iarg+2]);
|
||||
set[index].ftilt = force->numeric(FLERR,arg[iarg+2]);
|
||||
iarg += 3;
|
||||
} else if (strcmp(arg[iarg+1],"delta") == 0) {
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal fix deform command");
|
||||
set[index].style = DELTA;
|
||||
set[index].dtilt = atof(arg[iarg+2]);
|
||||
set[index].dtilt = force->numeric(FLERR,arg[iarg+2]);
|
||||
iarg += 3;
|
||||
} else if (strcmp(arg[iarg+1],"vel") == 0) {
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal fix deform command");
|
||||
set[index].style = VEL;
|
||||
set[index].vel = atof(arg[iarg+2]);
|
||||
set[index].vel = force->numeric(FLERR,arg[iarg+2]);
|
||||
iarg += 3;
|
||||
} else if (strcmp(arg[iarg+1],"erate") == 0) {
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal fix deform command");
|
||||
set[index].style = ERATE;
|
||||
set[index].rate = atof(arg[iarg+2]);
|
||||
set[index].rate = force->numeric(FLERR,arg[iarg+2]);
|
||||
iarg += 3;
|
||||
} else if (strcmp(arg[iarg+1],"trate") == 0) {
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal fix deform command");
|
||||
set[index].style = TRATE;
|
||||
set[index].rate = atof(arg[iarg+2]);
|
||||
set[index].rate = force->numeric(FLERR,arg[iarg+2]);
|
||||
iarg += 3;
|
||||
} else if (strcmp(arg[iarg+1],"wiggle") == 0) {
|
||||
if (iarg+4 > narg) error->all(FLERR,"Illegal fix deform command");
|
||||
set[index].style = WIGGLE;
|
||||
set[index].amplitude = atof(arg[iarg+2]);
|
||||
set[index].tperiod = atof(arg[iarg+3]);
|
||||
set[index].amplitude = force->numeric(FLERR,arg[iarg+2]);
|
||||
set[index].tperiod = force->numeric(FLERR,arg[iarg+3]);
|
||||
if (set[index].tperiod <= 0.0)
|
||||
error->all(FLERR,"Illegal fix deform command");
|
||||
iarg += 4;
|
||||
|
||||
Reference in New Issue
Block a user