surface_exterior/interior side effects

I noticed there are member functions of the Region classes that seem
to return the number of surfaces of the given region that a particular
position contacts, either on the interior or the exterior. My
interpretation is that these could be used to tell you whether an atom is
within a "skin depth" of being inside/outside that region.

If I use these functions in a custom subroutine (not part of LAMMPS
proper), are there likely to be any side-effects? For example, the
following line causes me to suspect that I might be adding atoms to a
list or something:
   add_contact(0,x,xp,yp,zp); // line 222 in my copy of region_block.cpp
If that list is then used in some way that isn't obvious, then I guess I
won't use it. If there's a better way, let me know; the basic question I
want to answer is, "Is atom [id] inside or within xxx distance units of
region [id]?"

Thanks as always.

Karl D. Hammond
University of Tennessee, Knoxville
[email protected]

"You can never know everything, and part of what you know is always
   wrong. A portion of wisdom lies in knowing that. A portion of courage
   lies in going on anyway."
"Nothing ever goes as you expect. Expect nothing, and you will not be
   surprised."

The Region methods surface, surface_exterior, surface_interior
are used only by fix wall/region, which needs to figure
out what points on a region surface a particle is touching,
in a cutoff sense. You can use the public
interface to them in the Region class, however you wish.

Steve