Ticket #234 (closed defect: fixed)
using holes when creating a mesh does not work with fitting
|Reported by:||duncan||Owned by:||hudson|
|Component:||Architecture and API||Version:|
Description (last modified by hudson) (diff)
I have a problem using the function add_hole_from_polygon(). When I set up a mesh using add_region_from_polygon() for the outer model boundary, add_hole_from_polygon() to set up a hole inside this outer polygon and generate_mesh() + export_mesh_file() to create the mesh, I get an error message when trying to initialize the domain: ... File "C:\Python24\lib\site-packages\anuga\fit_interpolate\fit.py", line 301, in _build_matrix_AtA_Atz raise Exception(msg) Exception: ('Could not find triangle for point', array([ 650491.032685, 9894786.210949]))
Thats exactly one point that is inside the hole. I wonder how the program knows, that there should be a point inside... (erased .python cache before) The mesh is created in the correct way, I looked at it with graphical_mesh_generator. However, how can I get this working?
The problem is fitting does not know about holes and reckons all data points should be in a triangle.
The work-around is not to use add_hole_from_polygon(). Use add_region_from_polygon() and make the maximum triangle size huge.
Note, this error would be easier to avoid if fitting did not back track.