From: Luca Heltai Date: Mon, 6 Jun 2022 10:32:51 +0000 (+0200) Subject: Fix input and output of some cgal tests. X-Git-Tag: v9.4.0-rc1~58^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13913%2Fhead;p=dealii.git Fix input and output of some cgal tests. --- diff --git a/tests/cgal/cgal_mesh_criteria.cc b/tests/cgal/cgal_mesh_criteria.cc index f62e432fd8..75a742cff0 100644 --- a/tests/cgal/cgal_mesh_criteria.cc +++ b/tests/cgal/cgal_mesh_criteria.cc @@ -44,7 +44,7 @@ test() { CGAL::Surface_mesh 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, diff --git a/tests/cgal/cgal_quadrature_01.cc b/tests/cgal/cgal_quadrature_01.cc index 0ab482fcd4..e20674cd68 100644 --- a/tests/cgal/cgal_quadrature_01.cc +++ b/tests/cgal/cgal_quadrature_01.cc @@ -48,10 +48,12 @@ using C3t3 = CGAL::Mesh_complex_3_in_triangulation_3 fnames{"input_grids/cube.off", - "input_grids/tetrahedron.off", - "input_grids/hedra.off", - "input_grids/octahedron.off"}; + const std::vector 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 sm; C3t3 tria; constexpr int degree = 3; diff --git a/tests/cgal/cgal_surface_mesh_02.cc b/tests/cgal/cgal_surface_mesh_02.cc index 404c383f06..674a1abe64 100644 --- a/tests/cgal/cgal_surface_mesh_02.cc +++ b/tests/cgal/cgal_surface_mesh_02.cc @@ -47,8 +47,9 @@ using C3t3 = CGAL::Mesh_complex_3_in_triangulation_3 fnames{"input_grids/cube.off", - "input_grids/tetrahedron.off"}; + const std::vector fnames{SOURCE_DIR "/input_grids/cube.off", + SOURCE_DIR + "/input_grids/tetrahedron.off"}; CGAL::Surface_mesh sm; C3t3 tria; diff --git a/tests/cgal/cgal_surface_mesh_03.cc b/tests/cgal/cgal_surface_mesh_03.cc index 7bd01256c8..06bdc9c8a2 100644 --- a/tests/cgal/cgal_surface_mesh_03.cc +++ b/tests/cgal/cgal_surface_mesh_03.cc @@ -32,8 +32,8 @@ using namespace CGALWrappers; void test() { - const std::vector fnames{"input_grids/cube.off", - "input_grids/hedra.off"}; + const std::vector fnames{SOURCE_DIR "/input_grids/cube.off", + SOURCE_DIR "/input_grids/hedra.off"}; CGAL::Surface_mesh sm0, sm1, outsm; std::ifstream input0(fnames[0]); std::ifstream input1(fnames[1]); diff --git a/tests/cgal/cgal_surface_triangulation_03.cc b/tests/cgal/cgal_surface_triangulation_03.cc index 5edd6e4ae7..d5c2f4076e 100644 --- a/tests/cgal/cgal_surface_triangulation_03.cc +++ b/tests/cgal/cgal_surface_triangulation_03.cc @@ -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; } } diff --git a/tests/cgal/cgal_surface_triangulation_03.output b/tests/cgal/cgal_surface_triangulation_03.output index e69de29bb2..f93ed22fca 100644 --- a/tests/cgal/cgal_surface_triangulation_03.output +++ b/tests/cgal/cgal_surface_triangulation_03.output @@ -0,0 +1,5 @@ + +DEAL::Surface mesh +DEAL::OK +DEAL::Polyhedron test +DEAL::OK