git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@995 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2007-10-09 23:40:36 +00:00
parent fa461b908b
commit 255b8fc0d9
8 changed files with 12 additions and 7 deletions

View File

@ -202,8 +202,7 @@ void PairDPD::settings(int narg, char **arg)
// initialize Marsaglia RNG with processor-unique seed
if (seed <= 0 || seed > 900000000)
error->all("Illegal fix pair_style command");
if (seed <= 0) error->all("Illegal fix pair_style command");
if (random) delete random;
random = new RanMars(lmp,seed + comm->me);

View File

@ -51,6 +51,8 @@ FixPour::FixPour(LAMMPS *lmp, int narg, char **arg) :
ntype = atoi(arg[4]);
seed = atoi(arg[5]);
if (seed <= 0) error->all("Illegal fix pour command");
PI = 4.0*atan(1.0);
// option defaults

View File

@ -175,6 +175,7 @@ void DisplaceAtoms::command(int narg, char **arg)
double dy = yscale*atof(arg[3]);
double dz = zscale*atof(arg[4]);
int seed = atoi(arg[5]);
if (seed <= 0) error->all("Illegal displace_atoms random command");
double **x = atom->x;
int *mask = atom->mask;

View File

@ -43,6 +43,8 @@ FixDeposit::FixDeposit(LAMMPS *lmp, int narg, char **arg) :
nfreq = atoi(arg[5]);
seed = atoi(arg[6]);
if (seed <= 0) error->all("Illegal fix deposit command");
// set defaults
iregion = -1;

View File

@ -25,13 +25,13 @@ class FixIndent : public Fix {
void init();
void setup();
void min_setup();
void post_force(int);
virtual void post_force(int);
void post_force_respa(int, int, int);
void min_post_force(int);
double compute_scalar();
double compute_vector(int);
private:
protected:
int istyle,scaleflag,radflag,thermo_flag,eflag_enable;
double k,k3;
double x0,y0,z0,r0_stop,r0_start;

View File

@ -41,8 +41,7 @@ FixLangevin::FixLangevin(LAMMPS *lmp, int narg, char **arg) :
int seed = atoi(arg[6]);
if (t_period <= 0.0) error->all("Fix langevin period must be > 0.0");
if (seed <= 0 || seed > 900000000)
error->all("Illegal fix langevin command");
if (seed <= 0) error->all("Illegal fix langevin command");
// initialize Marsaglia RNG with processor-unique seed

View File

@ -40,7 +40,7 @@ using namespace LAMMPS_NS;
RanPark::RanPark(LAMMPS *lmp, int seed_init) : Pointers(lmp)
{
if (seed_init == 0) error->all("Invalid seed for Park random # generator");
if (seed_init <= 0) error->all("Invalid seed for Park random # generator");
seed = seed_init;
save = 0;
}

View File

@ -126,6 +126,8 @@ void Velocity::create(int narg, char **arg)
double t_desired = atof(arg[0]);
int seed = atoi(arg[1]);
if (seed <= 0) error->all("Illegal velocity create command");
// if temperature = NULL, create a new ComputeTemp with the velocity group
int tflag = 0;