-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
segfault with triangle.refine #10
Comments
For some reason,
I'd investigate why that flag is set. |
a minimal example to reproduce the core dump, from __future__ import division
import meshpy.triangle as triangle
import numpy as np
def round_trip_connect(start, end):
return [(i, i+1) for i in range(start, end)] + [(end, start)]
def main():
points = [(1, 0), (1, 1), (-1, 1), (-1, -1), (1, -1), (1, 0)]
facets = round_trip_connect(0, len(points)-1)
# build
info = triangle.MeshInfo()
info.set_points(points)
info.set_facets(facets)
#
mesh = triangle.build(info, max_volume=0.1)
mesh = triangle.refine(mesh)
if __name__ == "__main__":
main() and the gdb outputs
|
I can reproduce the crash now. One issue with your code is that you double the point at |
Dear @inducer
I encounter a segfault again when calling
triangle.refine
to refine a generated mesh (maybe, it is my compiler's problem ?)The codes are posted below. A short description of the codes, I generated mesh from a circle (a small square is within the circle) and I want to further refine the already generated mesh by imposing a more strict refinement_func, and the gdb debug information is posted after the code.
BTW, can i pass more parameters to the
refinement_func
? for example, the polygon inrefinement_func_square
, so that I could write more compact refinement functions for different regions of the mesh.Best!
The text was updated successfully, but these errors were encountered: