replace replicated Dihedral/Improper problem warning with function in base class
This commit is contained in:
@ -100,22 +100,8 @@ void ImproperCossq::compute(int eflag, int vflag)
|
||||
cosphi = (vb3x*vb1x + vb3y*vb1y + vb3z*vb1z)/(rji * rlk);
|
||||
|
||||
/* Check that cos(phi) is in the correct limits. */
|
||||
if (cosphi > 1.0 + TOLERANCE || cosphi < (-1.0 - TOLERANCE)) {
|
||||
int me = comm->me;
|
||||
if (screen) {
|
||||
char str[128];
|
||||
sprintf(str,"Improper problem: %d " BIGINT_FORMAT " "
|
||||
TAGINT_FORMAT " " TAGINT_FORMAT " "
|
||||
TAGINT_FORMAT " " TAGINT_FORMAT,
|
||||
me,update->ntimestep,
|
||||
atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]);
|
||||
error->warning(FLERR,str);
|
||||
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",me,x[i2][0],x[i2][1],x[i2][2]);
|
||||
fprintf(screen," 3rd atom: %d %g %g %g\n",me,x[i3][0],x[i3][1],x[i3][2]);
|
||||
fprintf(screen," 4th atom: %d %g %g %g\n",me,x[i4][0],x[i4][1],x[i4][2]);
|
||||
}
|
||||
}
|
||||
if (cosphi > 1.0 + TOLERANCE || cosphi < (-1.0 - TOLERANCE))
|
||||
problem(FLERR, i1, i2, i3, i4);
|
||||
|
||||
/* Apply corrections to round-off errors. */
|
||||
if (cosphi > 1.0) cosphi -= SMALL;
|
||||
|
||||
Reference in New Issue
Block a user