git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10160 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -23,6 +23,7 @@
|
||||
#include "variable.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -49,9 +50,9 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
MPI_Comm_rank(world,&me);
|
||||
|
||||
nevery = atoi(arg[3]);
|
||||
nrepeat = atoi(arg[4]);
|
||||
nfreq = atoi(arg[5]);
|
||||
nevery = force->inumeric(FLERR,arg[3]);
|
||||
nrepeat = force->inumeric(FLERR,arg[4]);
|
||||
nfreq = force->inumeric(FLERR,arg[5]);
|
||||
|
||||
global_freq = nfreq;
|
||||
vector_flag = 1;
|
||||
@ -61,9 +62,9 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) :
|
||||
size_array_cols = 3;
|
||||
extarray = 0;
|
||||
|
||||
lo = atof(arg[6]);
|
||||
hi = atof(arg[7]);
|
||||
nbins = atoi(arg[8]);
|
||||
lo = force->numeric(FLERR,arg[6]);
|
||||
hi = force->numeric(FLERR,arg[7]);
|
||||
nbins = force->inumeric(FLERR,arg[8]);
|
||||
|
||||
// scan values to count them
|
||||
// then read options so know mode = SCALAR/VECTOR before re-reading values
|
||||
@ -939,14 +940,14 @@ void FixAveHisto::options(int narg, char **arg)
|
||||
else error->all(FLERR,"Illegal fix ave/histo command");
|
||||
if (ave == WINDOW) {
|
||||
if (iarg+3 > narg) error->all(FLERR,"Illegal fix ave/histo command");
|
||||
nwindow = atoi(arg[iarg+2]);
|
||||
nwindow = force->inumeric(FLERR,arg[iarg+2]);
|
||||
if (nwindow <= 0) error->all(FLERR,"Illegal fix ave/histo command");
|
||||
}
|
||||
iarg += 2;
|
||||
if (ave == WINDOW) iarg++;
|
||||
} else if (strcmp(arg[iarg],"start") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix ave/histo command");
|
||||
startstep = atoi(arg[iarg+1]);
|
||||
startstep = force->inumeric(FLERR,arg[iarg+1]);
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"mode") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix ave/histo command");
|
||||
|
||||
Reference in New Issue
Block a user