Skip to content
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

Add checks for collinear points in hydrodynamics calculations #50

Open
srmainwaring opened this issue Jul 26, 2022 · 0 comments
Open

Add checks for collinear points in hydrodynamics calculations #50

srmainwaring opened this issue Jul 26, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@srmainwaring
Copy link
Owner

srmainwaring commented Jul 26, 2022

CGAL 5.4 on Ubuntu 22.04 is raising a CGAL::Precondition_exception because the calculation of submerged triangles results in some arrangements with collinear points.

terminate called after throwing an instance of 'CGAL::Precondition_exception'
  what():  CGAL ERROR: precondition violation!

The library requires additional checks that all mesh triangles are non-degenerate, and should handle exceptions gracefully.

Replicate

System: Ubuntu Jammy (22.04)

$ gz sim -v4 -s -r waves.sdf

Only the spherical buoy needs to be included to produce the error.

Related

There are 2 failing tests in UNIT_CGAL_TEST on Ubuntu.

$ ./build/gz-marine1/bin/UNIT_CGAL_TEST 
[==========] Running 15 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 15 tests from CGAL
[ RUN      ] CGAL.Surprising
[       OK ] CGAL.Surprising (0 ms)
[ RUN      ] CGAL.SurfaceMesh
[       OK ] CGAL.SurfaceMesh (0 ms)
[ RUN      ] CGAL.AABBPolyhedronFacetIntersection
[       OK ] CGAL.AABBPolyhedronFacetIntersection (0 ms)
[ RUN      ] CGAL.SurfaceMeshGridCell
unknown file: Failure
C++ exception with description "CGAL ERROR: precondition violation!
Expr: ! running
File: /usr/include/CGAL/Timer.h
Line: 83" thrown in the test body.
[  FAILED  ] CGAL.SurfaceMeshGridCell (0 ms)
[ RUN      ] CGAL.SurfaceMeshGrid
[       OK ] CGAL.SurfaceMeshGrid (1 ms)
[ RUN      ] CGAL.SurfaceMeshModifyGrid
[       OK ] CGAL.SurfaceMeshModifyGrid (0 ms)
[ RUN      ] CGAL.SurfaceMeshWavefield
[       OK ] CGAL.SurfaceMeshWavefield (1285 ms)
[ RUN      ] CGAL.VertexRangeIterator
[       OK ] CGAL.VertexRangeIterator (0 ms)
[ RUN      ] CGAL.CreateTriangulationN
unknown file: Failure
C++ exception with description "CGAL ERROR: assertion violation!
Expr: n == N[2]
File: /usr/include/CGAL/Triangulation_ds_face_base_2.h
Line: 224" thrown in the test body.
[  FAILED  ] CGAL.CreateTriangulationN (0 ms)
[ RUN      ] CGAL.CreateTriangulationHierarchyN
[       OK ] CGAL.CreateTriangulationHierarchyN (0 ms)
[ RUN      ] CGAL.CreateTriangulation3
[       OK ] CGAL.CreateTriangulation3 (0 ms)
[ RUN      ] CGAL.CreateTriangulation4
[       OK ] CGAL.CreateTriangulation4 (0 ms)
[ RUN      ] CGAL.CreateConstrainedTrianguation4
[       OK ] CGAL.CreateConstrainedTrianguation4 (0 ms)
[ RUN      ] CGAL.CreateCTAlt
[       OK ] CGAL.CreateCTAlt (0 ms)
[ RUN      ] CGAL.CreateCTAltN
[       OK ] CGAL.CreateCTAltN (159 ms)
[----------] 15 tests from CGAL (1447 ms total)

[----------] Global test environment tear-down
[==========] 15 tests from 1 test suite ran. (1447 ms total)
[  PASSED  ] 13 tests.
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] CGAL.SurfaceMeshGridCell
[  FAILED  ] CGAL.CreateTriangulationN

 2 FAILED TESTS
@srmainwaring srmainwaring added the bug Something isn't working label Jul 26, 2022
@srmainwaring srmainwaring self-assigned this Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant