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

@ -19,6 +19,7 @@
#include "update.h"
#include "memory.h"
#include "error.h"
#include "force.h"
using namespace LAMMPS_NS;
using namespace FixConst;
@ -35,14 +36,14 @@ FixExternal::FixExternal(LAMMPS *lmp, int narg, char **arg) :
if (strcmp(arg[3],"pf/callback") == 0) {
if (narg != 6) error->all(FLERR,"Illegal fix external command");
mode = PF_CALLBACK;
ncall = atoi(arg[4]);
napply = atoi(arg[5]);
ncall = force->inumeric(FLERR,arg[4]);
napply = force->inumeric(FLERR,arg[5]);
if (ncall <= 0 || napply <= 0)
error->all(FLERR,"Illegal fix external command");
} else if (strcmp(arg[3],"pf/array") == 0) {
if (narg != 5) error->all(FLERR,"Illegal fix external command");
mode = PF_ARRAY;
napply = atoi(arg[4]);
napply = force->inumeric(FLERR,arg[4]);
if (napply <= 0) error->all(FLERR,"Illegal fix external command");
} else error->all(FLERR,"Illegal fix external command");