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 "respa.h"
#include "error.h"
#include "force.h"
using namespace LAMMPS_NS;
using namespace FixConst;
@ -29,9 +30,9 @@ FixLineForce::FixLineForce(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
{
if (narg != 6) error->all(FLERR,"Illegal fix lineforce command");
xdir = atof(arg[3]);
ydir = atof(arg[4]);
zdir = atof(arg[5]);
xdir = force->numeric(FLERR,arg[3]);
ydir = force->numeric(FLERR,arg[4]);
zdir = force->numeric(FLERR,arg[5]);
double len = sqrt(xdir*xdir + ydir*ydir + zdir*zdir);
if (len == 0.0) error->all(FLERR,"Illegal fix lineforce command");