BOUNDARY_NODE_LIST, a FreeFem++ code which sets up a mesh, and then queries the mesh to produce a list of boundary elements (line segments) and the indices of the nodes that form them.
The computer code and data files described and made available on this web page are distributed under the MIT license