git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@995 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -202,8 +202,7 @@ void PairDPD::settings(int narg, char **arg)
|
|||||||
|
|
||||||
// initialize Marsaglia RNG with processor-unique seed
|
// initialize Marsaglia RNG with processor-unique seed
|
||||||
|
|
||||||
if (seed <= 0 || seed > 900000000)
|
if (seed <= 0) error->all("Illegal fix pair_style command");
|
||||||
error->all("Illegal fix pair_style command");
|
|
||||||
if (random) delete random;
|
if (random) delete random;
|
||||||
random = new RanMars(lmp,seed + comm->me);
|
random = new RanMars(lmp,seed + comm->me);
|
||||||
|
|
||||||
|
|||||||
@ -51,6 +51,8 @@ FixPour::FixPour(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
ntype = atoi(arg[4]);
|
ntype = atoi(arg[4]);
|
||||||
seed = atoi(arg[5]);
|
seed = atoi(arg[5]);
|
||||||
|
|
||||||
|
if (seed <= 0) error->all("Illegal fix pour command");
|
||||||
|
|
||||||
PI = 4.0*atan(1.0);
|
PI = 4.0*atan(1.0);
|
||||||
|
|
||||||
// option defaults
|
// option defaults
|
||||||
|
|||||||
@ -175,6 +175,7 @@ void DisplaceAtoms::command(int narg, char **arg)
|
|||||||
double dy = yscale*atof(arg[3]);
|
double dy = yscale*atof(arg[3]);
|
||||||
double dz = zscale*atof(arg[4]);
|
double dz = zscale*atof(arg[4]);
|
||||||
int seed = atoi(arg[5]);
|
int seed = atoi(arg[5]);
|
||||||
|
if (seed <= 0) error->all("Illegal displace_atoms random command");
|
||||||
|
|
||||||
double **x = atom->x;
|
double **x = atom->x;
|
||||||
int *mask = atom->mask;
|
int *mask = atom->mask;
|
||||||
|
|||||||
@ -43,6 +43,8 @@ FixDeposit::FixDeposit(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
nfreq = atoi(arg[5]);
|
nfreq = atoi(arg[5]);
|
||||||
seed = atoi(arg[6]);
|
seed = atoi(arg[6]);
|
||||||
|
|
||||||
|
if (seed <= 0) error->all("Illegal fix deposit command");
|
||||||
|
|
||||||
// set defaults
|
// set defaults
|
||||||
|
|
||||||
iregion = -1;
|
iregion = -1;
|
||||||
|
|||||||
@ -25,13 +25,13 @@ class FixIndent : public Fix {
|
|||||||
void init();
|
void init();
|
||||||
void setup();
|
void setup();
|
||||||
void min_setup();
|
void min_setup();
|
||||||
void post_force(int);
|
virtual void post_force(int);
|
||||||
void post_force_respa(int, int, int);
|
void post_force_respa(int, int, int);
|
||||||
void min_post_force(int);
|
void min_post_force(int);
|
||||||
double compute_scalar();
|
double compute_scalar();
|
||||||
double compute_vector(int);
|
double compute_vector(int);
|
||||||
|
|
||||||
private:
|
protected:
|
||||||
int istyle,scaleflag,radflag,thermo_flag,eflag_enable;
|
int istyle,scaleflag,radflag,thermo_flag,eflag_enable;
|
||||||
double k,k3;
|
double k,k3;
|
||||||
double x0,y0,z0,r0_stop,r0_start;
|
double x0,y0,z0,r0_stop,r0_start;
|
||||||
|
|||||||
@ -41,8 +41,7 @@ FixLangevin::FixLangevin(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
int seed = atoi(arg[6]);
|
int seed = atoi(arg[6]);
|
||||||
|
|
||||||
if (t_period <= 0.0) error->all("Fix langevin period must be > 0.0");
|
if (t_period <= 0.0) error->all("Fix langevin period must be > 0.0");
|
||||||
if (seed <= 0 || seed > 900000000)
|
if (seed <= 0) error->all("Illegal fix langevin command");
|
||||||
error->all("Illegal fix langevin command");
|
|
||||||
|
|
||||||
// initialize Marsaglia RNG with processor-unique seed
|
// initialize Marsaglia RNG with processor-unique seed
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
RanPark::RanPark(LAMMPS *lmp, int seed_init) : Pointers(lmp)
|
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;
|
seed = seed_init;
|
||||||
save = 0;
|
save = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -126,6 +126,8 @@ void Velocity::create(int narg, char **arg)
|
|||||||
double t_desired = atof(arg[0]);
|
double t_desired = atof(arg[0]);
|
||||||
int seed = atoi(arg[1]);
|
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
|
// if temperature = NULL, create a new ComputeTemp with the velocity group
|
||||||
|
|
||||||
int tflag = 0;
|
int tflag = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user