Sign Error in region_plane.cpp

Hi,

There is a sign error in region_plane.cpp, in the function surface_exterior. The value of contact[0].delx currently appears as dotnormal[0] whereas it should be -dotnormal[0] as we are dealing with the exterior of the surface instead of the interior. This leads to atoms being attracted rather than repulsed from a plane when using fix wall/region. Attached are the original version of region_plane from the Sept. 21 2012 release (region_plane.cpp.org) and the fixed version (region.plane.cpp). Please let me know if there is anything else you would like, e.g. input files that generate a problem, etc.

Best,

Bernard Beckerman
Graduate Student - Luijten Group
Materials Science and Engineering
Northwestern University

region_plane.cpp.org (3.43 KB)

region_plane.cpp (3.43 KB)

yes, I agree - good catch.
Will post a patch this AM.

Thanks,
Steve