]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix input and output of some cgal tests. 13913/head
authorLuca Heltai <luca.heltai@sissa.it>
Mon, 6 Jun 2022 10:32:51 +0000 (12:32 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Mon, 6 Jun 2022 10:32:51 +0000 (12:32 +0200)
tests/cgal/cgal_mesh_criteria.cc
tests/cgal/cgal_quadrature_01.cc
tests/cgal/cgal_surface_mesh_02.cc
tests/cgal/cgal_surface_mesh_03.cc
tests/cgal/cgal_surface_triangulation_03.cc
tests/cgal/cgal_surface_triangulation_03.output

index f62e432fd8dc317fdc12874bd208c8551e6dd6cf..75a742cff0a070c057ab93d10f9abbb384a0425f 100644 (file)
@@ -44,7 +44,7 @@ test()
 {
   CGAL::Surface_mesh<CGALPoint> sm;
   C3t3                          tria;
-  std::ifstream                 input("input_grids/cube.off");
+  std::ifstream                 input(SOURCE_DIR "/input_grids/cube.off");
   input >> sm;
   cgal_surface_mesh_to_cgal_triangulation(sm,
                                           tria,
index 0ab482fcd4ca7709f915ab3083d21f38e7148926..e20674cd688cb851c2da5be29a45e849578330ff 100644 (file)
@@ -48,10 +48,12 @@ using C3t3          = CGAL::Mesh_complex_3_in_triangulation_3<Tr,
 void
 test()
 {
-  const std::vector<std::string> fnames{"input_grids/cube.off",
-                                        "input_grids/tetrahedron.off",
-                                        "input_grids/hedra.off",
-                                        "input_grids/octahedron.off"};
+  const std::vector<std::string> fnames{SOURCE_DIR "/input_grids/cube.off",
+                                        SOURCE_DIR
+                                        "/input_grids/tetrahedron.off",
+                                        SOURCE_DIR "/input_grids/hedra.off",
+                                        SOURCE_DIR
+                                        "/input_grids/octahedron.off"};
   CGAL::Surface_mesh<CGALPoint>  sm;
   C3t3                           tria;
   constexpr int                  degree = 3;
index 404c383f06a804e5e26e331bfb1cdc9e16ac0952..674a1abe64f059b4ef7c8aa1f1af23135159ed8c 100644 (file)
@@ -47,8 +47,9 @@ using C3t3          = CGAL::Mesh_complex_3_in_triangulation_3<Tr,
 void
 test()
 {
-  const std::vector<std::string> fnames{"input_grids/cube.off",
-                                        "input_grids/tetrahedron.off"};
+  const std::vector<std::string> fnames{SOURCE_DIR "/input_grids/cube.off",
+                                        SOURCE_DIR
+                                        "/input_grids/tetrahedron.off"};
   CGAL::Surface_mesh<CGALPoint>  sm;
   C3t3                           tria;
 
index 7bd01256c87fd490454df0fd3210e736280aa3b4..06bdc9c8a213ac2ae7c2207f49c6a6eca87fdba8 100644 (file)
@@ -32,8 +32,8 @@ using namespace CGALWrappers;
 void
 test()
 {
-  const std::vector<std::string> fnames{"input_grids/cube.off",
-                                        "input_grids/hedra.off"};
+  const std::vector<std::string> fnames{SOURCE_DIR "/input_grids/cube.off",
+                                        SOURCE_DIR "/input_grids/hedra.off"};
   CGAL::Surface_mesh<CGALPoint>  sm0, sm1, outsm;
   std::ifstream                  input0(fnames[0]);
   std::ifstream                  input1(fnames[1]);
index 5edd6e4ae7a91f93ce5cbe7163b146e55778a714..d5c2f4076e14926e60cdcbd75d74b446ce10e51e 100644 (file)
@@ -47,7 +47,10 @@ main()
     std::ifstream input_sm(SOURCE_DIR "/input_grids/tripod.off");
     input_sm >> sm;
     cgal_surface_mesh_to_dealii_triangulation(sm, tria);
-    go.write_msh(tria, deallog.get_file_stream());
+    go.write_msh(tria, "temp.msh");
+    remove("temp.msh");
+    // If we got here, everything is fine.
+    deallog << "OK" << std::endl;
   }
   tria.clear();
 
@@ -58,6 +61,9 @@ main()
     std::ifstream input_p(SOURCE_DIR "/input_grids/tripod.off");
     input_p >> P;
     cgal_surface_mesh_to_dealii_triangulation(P, tria);
-    go.write_msh(tria, deallog.get_file_stream());
+    go.write_msh(tria, "temp.msh");
+    remove("temp.msh");
+    // If we got here, everything is fine.
+    deallog << "OK" << std::endl;
   }
 }
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f93ed22fca6e7b295ae14fb796bb6aa17952b7db 100644 (file)
@@ -0,0 +1,5 @@
+
+DEAL::Surface mesh
+DEAL::OK
+DEAL::Polyhedron test
+DEAL::OK

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.