massive patch to flag non-numeric input

This commit is contained in:
Axel Kohlmeyer
2013-06-23 14:34:38 +02:00
parent b60eac7278
commit 0e04550043
178 changed files with 1134 additions and 1070 deletions

View File

@ -24,6 +24,7 @@
#include "variable.h"
#include "memory.h"
#include "error.h"
#include "force.h"
using namespace LAMMPS_NS;
using namespace FixConst;
@ -51,7 +52,7 @@ FixSetForce::FixSetForce(LAMMPS *lmp, int narg, char **arg) :
} else if (strcmp(arg[3],"NULL") == 0) {
xstyle = NONE;
} else {
xvalue = atof(arg[3]);
xvalue = force->numeric(FLERR,arg[3]);
xstyle = CONSTANT;
}
if (strstr(arg[4],"v_") == arg[4]) {
@ -61,7 +62,7 @@ FixSetForce::FixSetForce(LAMMPS *lmp, int narg, char **arg) :
} else if (strcmp(arg[4],"NULL") == 0) {
ystyle = NONE;
} else {
yvalue = atof(arg[4]);
yvalue = force->numeric(FLERR,arg[4]);
ystyle = CONSTANT;
}
if (strstr(arg[5],"v_") == arg[5]) {
@ -71,7 +72,7 @@ FixSetForce::FixSetForce(LAMMPS *lmp, int narg, char **arg) :
} else if (strcmp(arg[5],"NULL") == 0) {
zstyle = NONE;
} else {
zvalue = atof(arg[5]);
zvalue = force->numeric(FLERR,arg[5]);
zstyle = CONSTANT;
}