underworldcode/stripy

Purpose of edge_refine_triangulation_by_vertices

sound-fx opened this issue · 1 comments

The docstring for the sTriangulation.edge_refine_triangulation_by_vertices method seems to imply that it bisects only those edges directly connected to any of the given vertices. But from the code, it looks like it bisects all edges of the triangles that include the given vertices. That is, for each triangle connected to any of the given vertices, it bisects the two connecting edges as well as the one edge that's not connected.

If I'm understanding this correctly, then either the docstring requires clarification, or the code requires correction.

What is the proper intent of the method?

This function was written for local mesh refinement in the region around a given vertex and the (unstated) intent was that the resulting mesh would be useful for aggregating scattered data and subsequent interpolation. So that led to the current implementation. The doc-string is not accurate.

If the functionality you described is useful then we can certainly add a means to achieve this.