git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10160 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
#include "domain.h"
|
||||
#include "group.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -32,7 +33,7 @@ FixMomentum::FixMomentum(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal fix momentum command");
|
||||
nevery = atoi(arg[3]);
|
||||
nevery = force->inumeric(FLERR,arg[3]);
|
||||
if (nevery <= 0) error->all(FLERR,"Illegal fix momentum command");
|
||||
|
||||
linear = angular = 0;
|
||||
@ -42,9 +43,9 @@ FixMomentum::FixMomentum(LAMMPS *lmp, int narg, char **arg) :
|
||||
if (strcmp(arg[iarg],"linear") == 0) {
|
||||
if (iarg+4 > narg) error->all(FLERR,"Illegal fix momentum command");
|
||||
linear = 1;
|
||||
xflag = atoi(arg[iarg+1]);
|
||||
yflag = atoi(arg[iarg+2]);
|
||||
zflag = atoi(arg[iarg+3]);
|
||||
xflag = force->inumeric(FLERR,arg[iarg+1]);
|
||||
yflag = force->inumeric(FLERR,arg[iarg+2]);
|
||||
zflag = force->inumeric(FLERR,arg[iarg+3]);
|
||||
iarg += 4;
|
||||
} else if (strcmp(arg[iarg],"angular") == 0) {
|
||||
angular = 1;
|
||||
|
||||
Reference in New Issue
Block a user