Catch single atom pair constraint failures 65/4665/1
authorJim Phillips <jim@ks.uiuc.edu>
Mon, 8 Oct 2018 19:43:20 +0000 (14:43 -0500)
committerJim Phillips <jim@ks.uiuc.edu>
Mon, 8 Oct 2018 19:43:20 +0000 (14:43 -0500)
commit700a971476daf3b62a38830ee18b94ab5574e2b9
tree3df59b8c6ba9bc092ad6b1be56b1176caa79e140
parent8c0466cb89f21a8936cfe90259f7e5089b742e3c
Catch single atom pair constraint failures

The non-iterative solution for constraining a single pair of
bonded atoms contains a sqrt() that returns a NaN if the argument
is negative.  Catch this case as for the interative method to
prevent NaNs from propagating to velocities, temperature,
pressure, and positions; and eventually causing a segfault that
looks to the user like a bug rather than unstable dynamics.

Change-Id: Ifcd34cd8af18ef337b214ea3f5a07c3622f12cc9
src/HomePatch.C
src/Settle.C
src/Settle.h