]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Test opencascade/stl_refinement: disable floating point exceptions
authorMatthias Maier <tamiko@43-1.org>
Mon, 22 Jul 2024 14:30:05 +0000 (09:30 -0500)
committerMatthias Maier <tamiko@43-1.org>
Mon, 22 Jul 2024 14:30:05 +0000 (09:30 -0500)
tests/opencascade/stl_refinement.cc

index a63057348267d87cf7b31ceea15c0a3ae50be4a9..4a91ac2f3c95362c5dd82a72ec549e9616e2078a 100644 (file)
@@ -33,6 +33,16 @@ using namespace OpenCASCADE;
 int
 main()
 {
+  // This test might trigger spurious floating point exception despite
+  // functioning properly. Simply disable floating point exceptions again
+  // (after they had been enabled int tests.h)
+#if defined(DEBUG) && defined(DEAL_II_HAVE_FP_EXCEPTIONS)
+  {
+    const int current_fe_except = fegetexcept();
+    fedisableexcept(current_fe_except);
+  }
+#endif
+
   TopoDS_Shape        sh = read_STL(SOURCE_DIR "/stl_files/sphere_refined.stl");
   Triangulation<2, 3> tria;
   GridIn<2, 3>        gridin;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.