Opened 20 years ago
Closed 20 years ago
#23 closed defect (fixed)
bad mesh generated.
| Reported by: | duncan | Owned by: | duncan |
|---|---|---|---|
| Priority: | normal | Milestone: | Mesh generation maintenance |
| Component: | Functionality and features | Version: | 1.0 |
| Severity: | normal | Keywords: | |
| Cc: | duncan |
Description (last modified by )
This is from ticket #9, which was overloaded.
here's an error from least-squares.py
v 6
self.mesh.vertexlist[v] None
Traceback (most recent call last):
File "I:\inundation\debug\mesh_error_reporting\show_mesh_bug.py", li
ne 123, in ?
verbose=True)
File "I:\inundation\pyvolution\least_squares.py", line 211, in fit_t
o_mesh
precrop = precrop)
File "I:\inundation\pyvolution\least_squares.py", line 360, in __ini
t__
precrop = precrop)
File "I:\inundation\pyvolution\least_squares.py", line 545, in build
_interpolation_matrix_A
element_found, sigma0, sigma1, sigma2, k = \
File "I:\inundation\pyvolution\least_squares.py", line 608, in searc
h_triangles_of_vertices
for k, _ in self.mesh.vertexlist[v]:
TypeError: iteration over non-sequence
It's caused since vertex 6 is not part of any triangle.
I:\inundation\debug\mesh_error_reporting\show_bad_mesh.py (changeset:1954) produces a different mesh that shows the same error. Vertex 10 is not associated with any triangle. This is evident in the .tsh file.
See show_mesh_bug.py (changeset:1878) for 1st report of bug.
Currently least squares assumes a mesh is ok. Should this be changed? probably.
I just had a look at the mesh.py, at the triang.genMesh call. The error seems to be coming from triangle.
Change History (8)
comment:1 Changed 20 years ago by
| Description: | modified (diff) |
|---|---|
| Summary: | crash when generating a mesh → bad mesh generated. |
comment:2 Changed 20 years ago by
| Description: | modified (diff) |
|---|
comment:3 Changed 20 years ago by
| Description: | modified (diff) |
|---|
comment:4 Changed 20 years ago by
| Component: | Architecture and API → Functionality and features |
|---|
comment:5 Changed 20 years ago by
| Owner: | changed from somebody to duncan |
|---|
comment:6 Changed 20 years ago by
| Status: | new → assigned |
|---|
comment:7 Changed 20 years ago by
| Milestone: | Mesh generation finished → Mesh generation maintanence |
|---|
comment:8 Changed 20 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
All user points are turned into triangulation vertices in triangle. added code in pmesh.mesh and triagle so vertices without a triangle are removed.

Duncan said: "Currently least squares assumes a mesh is ok. Should this be changed? probably."
Perhaps that test should be part of check_integrity() in mesh ?