forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4745 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
3d06684857
commit
b015f75194
|
@ -212,7 +212,7 @@ void DihedralClass2::compute(int eflag, int vflag)
|
|||
sprintf(str,"Dihedral problem: %d %d %d %d %d %d",
|
||||
me,update->ntimestep,
|
||||
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
|
||||
error->warning(str);
|
||||
error->warning(str,0);
|
||||
fprintf(screen," 1st atom: %d %g %g %g\n",
|
||||
me,x[i1][0],x[i1][1],x[i1][2]);
|
||||
fprintf(screen," 2nd atom: %d %g %g %g\n",
|
||||
|
|
|
@ -159,7 +159,7 @@ void ImproperClass2::compute(int eflag, int vflag)
|
|||
sprintf(str,"Improper problem: %d %d %d %d %d %d",
|
||||
me,update->ntimestep,
|
||||
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
|
||||
error->warning(str);
|
||||
error->warning(str,0);
|
||||
fprintf(screen," 1st atom: %d %g %g %g\n",
|
||||
me,x[i1][0],x[i1][1],x[i1][2]);
|
||||
fprintf(screen," 2nd atom: %d %g %g %g\n",
|
||||
|
|
|
@ -158,9 +158,9 @@ void PairDSMC::compute(int eflag, int vflag)
|
|||
convert_double_to_equivalent_int(num_of_collisions_double);
|
||||
|
||||
if (num_of_collisions > number_of_A)
|
||||
error->warning("Pair dsmc: num_of_collisions > number_of_A");
|
||||
error->warning("Pair dsmc: num_of_collisions > number_of_A",0);
|
||||
if (num_of_collisions > number_of_B)
|
||||
error->warning("Pair dsmc: num_of_collisions > number_of_B");
|
||||
error->warning("Pair dsmc: num_of_collisions > number_of_B",0);
|
||||
|
||||
// perform collisions on pairs of particles in icell
|
||||
|
||||
|
|
|
@ -416,7 +416,7 @@ void FixPour::pre_exchange()
|
|||
|
||||
ninserted += nnear-nprevious;
|
||||
if (nnear - nprevious < nnew && me == 0)
|
||||
error->warning("Less insertions than requested");
|
||||
error->warning("Less insertions than requested",0);
|
||||
|
||||
// check if new atom is in my sub-box or above it if I'm highest proc
|
||||
// if so, add to my list via create_atom()
|
||||
|
|
|
@ -1781,14 +1781,14 @@ double PairComb::qfo_self(Param *param, double qi, double selfpot)
|
|||
char str[128];
|
||||
sprintf(str,"Pair COMB charge %.10f with force %.10f hit min barrier",
|
||||
qi,self_d);
|
||||
error->warning(str);
|
||||
error->warning(str,0);
|
||||
self_d += 4.0 * cmin * pow((qi-qmin),3);
|
||||
}
|
||||
if (qi > qmax) {
|
||||
char str[128];
|
||||
sprintf(str,"Pair COMB charge %.10f with force %.10f hit max barrier",
|
||||
qi,self_d);
|
||||
error->warning(str);
|
||||
error->warning(str,0);
|
||||
self_d += 4.0 * cmax * pow((qi-qmax),3);
|
||||
}
|
||||
*/
|
||||
|
|
|
@ -88,7 +88,7 @@ void BondFENE::compute(int eflag, int vflag)
|
|||
char str[128];
|
||||
sprintf(str,"FENE bond too long: %d %d %d %g",
|
||||
update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq));
|
||||
error->warning(str);
|
||||
error->warning(str,0);
|
||||
if (rlogarg <= -3.0) error->one("Bad FENE bond");
|
||||
rlogarg = 0.1;
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ double BondFENE::single(int type, double rsq, int i, int j)
|
|||
if (rlogarg < 0.1) {
|
||||
char str[128];
|
||||
sprintf(str,"FENE bond too long: %d %g",update->ntimestep,sqrt(rsq));
|
||||
error->warning(str);
|
||||
error->warning(str,0);
|
||||
if (rlogarg <= -3.0) error->one("Bad FENE bond");
|
||||
rlogarg = 0.1;
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ void BondFENEExpand::compute(int eflag, int vflag)
|
|||
char str[128];
|
||||
sprintf(str,"FENE bond too long: %d %d %d %g",
|
||||
update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq));
|
||||
error->warning(str);
|
||||
error->warning(str,0);
|
||||
if (rlogarg <= -3.0) error->one("Bad FENE bond");
|
||||
rlogarg = 0.1;
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ double BondFENEExpand::single(int type, double rsq, int i, int j)
|
|||
if (rlogarg < 0.1) {
|
||||
char str[128];
|
||||
sprintf(str,"FENE bond too long: %d %g",update->ntimestep,sqrt(rsq));
|
||||
error->warning(str);
|
||||
error->warning(str,0);
|
||||
if (rlogarg <= -3.0) error->one("Bad FENE bond");
|
||||
rlogarg = 0.1;
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ void DihedralCharmm::compute(int eflag, int vflag)
|
|||
sprintf(str,"Dihedral problem: %d %d %d %d %d %d",
|
||||
me,update->ntimestep,
|
||||
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
|
||||
error->warning(str);
|
||||
error->warning(str,0);
|
||||
fprintf(screen," 1st atom: %d %g %g %g\n",
|
||||
me,x[i1][0],x[i1][1],x[i1][2]);
|
||||
fprintf(screen," 2nd atom: %d %g %g %g\n",
|
||||
|
|
|
@ -140,7 +140,7 @@ void DihedralHarmonic::compute(int eflag, int vflag)
|
|||
sprintf(str,"Dihedral problem: %d %d %d %d %d %d",
|
||||
me,update->ntimestep,
|
||||
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
|
||||
error->warning(str);
|
||||
error->warning(str,0);
|
||||
fprintf(screen," 1st atom: %d %g %g %g\n",
|
||||
me,x[i1][0],x[i1][1],x[i1][2]);
|
||||
fprintf(screen," 2nd atom: %d %g %g %g\n",
|
||||
|
|
|
@ -172,7 +172,7 @@ void DihedralHelix::compute(int eflag, int vflag)
|
|||
sprintf(str,"Dihedral problem: %d %d %d %d %d %d",
|
||||
me,update->ntimestep,
|
||||
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
|
||||
error->warning(str);
|
||||
error->warning(str,0);
|
||||
fprintf(screen," 1st atom: %d %g %g %g\n",
|
||||
me,x[i1][0],x[i1][1],x[i1][2]);
|
||||
fprintf(screen," 2nd atom: %d %g %g %g\n",
|
||||
|
|
|
@ -163,7 +163,7 @@ void DihedralMultiHarmonic::compute(int eflag, int vflag)
|
|||
sprintf(str,"Dihedral problem: %d %d %d %d %d %d",
|
||||
comm->me,update->ntimestep,
|
||||
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
|
||||
error->warning(str);
|
||||
error->warning(str,0);
|
||||
fprintf(screen," 1st atom: %d %g %g %g\n",
|
||||
comm->me,x[i1][0],x[i1][1],x[i1][2]);
|
||||
fprintf(screen," 2nd atom: %d %g %g %g\n",
|
||||
|
|
|
@ -169,7 +169,7 @@ void DihedralOPLS::compute(int eflag, int vflag)
|
|||
sprintf(str,"Dihedral problem: %d %d %d %d %d %d",
|
||||
comm->me,update->ntimestep,
|
||||
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
|
||||
error->warning(str);
|
||||
error->warning(str,0);
|
||||
fprintf(screen," 1st atom: %d %g %g %g\n",
|
||||
comm->me,x[i1][0],x[i1][1],x[i1][2]);
|
||||
fprintf(screen," 2nd atom: %d %g %g %g\n",
|
||||
|
|
|
@ -154,7 +154,7 @@ void ImproperCvff::compute(int eflag, int vflag)
|
|||
sprintf(str,"Improper problem: %d %d %d %d %d %d",
|
||||
me,update->ntimestep,
|
||||
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
|
||||
error->warning(str);
|
||||
error->warning(str,0);
|
||||
fprintf(screen," 1st atom: %d %g %g %g\n",
|
||||
me,x[i1][0],x[i1][1],x[i1][2]);
|
||||
fprintf(screen," 2nd atom: %d %g %g %g\n",
|
||||
|
|
|
@ -125,7 +125,7 @@ void ImproperHarmonic::compute(int eflag, int vflag)
|
|||
sprintf(str,"Improper problem: %d %d %d %d %d %d",
|
||||
me,update->ntimestep,
|
||||
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
|
||||
error->warning(str);
|
||||
error->warning(str,0);
|
||||
fprintf(screen," 1st atom: %d %g %g %g\n",
|
||||
me,x[i1][0],x[i1][1],x[i1][2]);
|
||||
fprintf(screen," 2nd atom: %d %g %g %g\n",
|
||||
|
|
|
@ -191,7 +191,7 @@ void ComputeCNAAtom::compute_peratom()
|
|||
if (nerrorall && comm->me == 0) {
|
||||
char str[128];
|
||||
sprintf(str,"Too many neighbors in CNA for %d atoms",nerrorall);
|
||||
error->warning(str);
|
||||
error->warning(str,0);
|
||||
}
|
||||
|
||||
// compute CNA for each atom in group
|
||||
|
|
|
@ -106,7 +106,8 @@ void Error::one(const char *str)
|
|||
only write to screen if non-NULL on this proc since could be file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Error::warning(const char *str)
|
||||
void Error::warning(const char *str, int logflag)
|
||||
{
|
||||
if (screen) fprintf(screen,"WARNING: %s\n",str);
|
||||
if (logflag && logfile) fprintf(logfile,"WARNING: %s\n",str);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ class Error : protected Pointers {
|
|||
|
||||
void all(const char *);
|
||||
void one(const char *);
|
||||
void warning(const char *);
|
||||
void warning(const char *, int = 1);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -324,7 +324,7 @@ void FixDeposit::pre_exchange()
|
|||
|
||||
if (comm->me == 0)
|
||||
if (success == 0)
|
||||
error->warning("Particle deposition was unsuccessful");
|
||||
error->warning("Particle deposition was unsuccessful",0);
|
||||
|
||||
// set tag # of new particle beyond all previous atoms
|
||||
// reset global natoms
|
||||
|
|
|
@ -431,7 +431,7 @@ void FixTTM::end_of_step()
|
|||
num_inner_timesteps = static_cast<int>(update->dt/inner_dt) + 1;
|
||||
inner_dt = update->dt/double(num_inner_timesteps);
|
||||
if (num_inner_timesteps > 1000000)
|
||||
error->warning("Too many inner timesteps in fix ttm");
|
||||
error->warning("Too many inner timesteps in fix ttm",0);
|
||||
}
|
||||
|
||||
for (int ith_inner_timestep = 0; ith_inner_timestep < num_inner_timesteps;
|
||||
|
|
|
@ -359,7 +359,7 @@ double Thermo::lost_check()
|
|||
|
||||
char str[128];
|
||||
sprintf(str,"Lost atoms: original %.15g current %.15g",atom->natoms,ntotal);
|
||||
if (me == 0) error->warning(str);
|
||||
if (me == 0) error->warning(str,0);
|
||||
lostbefore = 1;
|
||||
return ntotal;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue