Skip to content

Commit

Permalink
Merge pull request #13913 from luca-heltai/cgal-fix-tests
Browse files Browse the repository at this point in the history
Fix input and output of some cgal tests.
  • Loading branch information
kronbichler committed Jun 7, 2022
2 parents 0569822 + d09c0ea commit 50d1cac
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tests/cgal/cgal_mesh_criteria.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
AdditionalData<3> data;
data.cell_size = .1;
Expand Down
10 changes: 6 additions & 4 deletions tests/cgal/cgal_quadrature_01.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions tests/cgal/cgal_surface_mesh_02.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions tests/cgal/cgal_surface_mesh_03.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
10 changes: 8 additions & 2 deletions tests/cgal/cgal_surface_triangulation_03.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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;
}
}
5 changes: 5 additions & 0 deletions tests/cgal/cgal_surface_triangulation_03.output
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

DEAL::Surface mesh
DEAL::OK
DEAL::Polyhedron test
DEAL::OK

0 comments on commit 50d1cac

Please sign in to comment.