From 2bbbe46d6d20dfc497e7eb34668f3a7959c0ec48 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Mon, 7 Aug 2017 21:55:03 -0600 Subject: [PATCH] Fix tests (compilation issues; remove unnecessary casts) --- tests/base/pattern_tools_01.cc | 2 +- tests/base/pattern_tools_03.cc | 4 ++-- tests/base/pattern_tools_04.cc | 4 ++-- tests/bits/cylinder.cc | 2 +- tests/bits/hyper_ball_3d.cc | 2 +- tests/grid/vertex_as_face_04.cc | 8 ++++---- tests/manifold/copy_material_to_manifold_id_01.cc | 9 ++++----- tests/numerics/no_flux_10.cc | 2 +- tests/numerics/no_flux_11.cc | 2 +- tests/numerics/no_flux_12.cc | 4 ++-- 10 files changed, 19 insertions(+), 20 deletions(-) diff --git a/tests/base/pattern_tools_01.cc b/tests/base/pattern_tools_01.cc index 6279351335..066538eb12 100644 --- a/tests/base/pattern_tools_01.cc +++ b/tests/base/pattern_tools_01.cc @@ -45,7 +45,7 @@ int main() int t0 = 1; unsigned int t1 = 2; - types::boundary_id t2 = 3; + unsigned char t2 = 3; std::string t3 = "Ciao"; double t4 = 4.0; bool t5 = true; diff --git a/tests/base/pattern_tools_03.cc b/tests/base/pattern_tools_03.cc index f12dea24ca..2c985b4038 100644 --- a/tests/base/pattern_tools_03.cc +++ b/tests/base/pattern_tools_03.cc @@ -45,13 +45,13 @@ int main() int t0 = 1; unsigned int t1 = 2; - types::boundary_id t2 = 3; + unsigned char t2 = 3; std::string t3 = "Ciao"; double t4 = 4.0; std::vector t10(2, t0); std::vector t11(2, t1); - std::vector t12(2, t2); + std::vector t12(2, t2); std::vector t13(2, t3); std::vector t14(2, t4); diff --git a/tests/base/pattern_tools_04.cc b/tests/base/pattern_tools_04.cc index 073b2b4d5b..71964779ef 100644 --- a/tests/base/pattern_tools_04.cc +++ b/tests/base/pattern_tools_04.cc @@ -45,13 +45,13 @@ int main() int t0 = 1; unsigned int t1 = 2; - types::boundary_id t2 = 3; + unsigned char t2 = 3; std::string t3 = "Ciao"; double t4 = 4.0; std::map t10; std::map t11; - std::map t12; + std::map t12; std::map t13; std::map t14; diff --git a/tests/bits/cylinder.cc b/tests/bits/cylinder.cc index 61291fc7ca..fcfceb6a65 100644 --- a/tests/bits/cylinder.cc +++ b/tests/bits/cylinder.cc @@ -51,7 +51,7 @@ int main () face!=tria.end_face(); ++face) { deallog << face << " " - << (int)face->boundary_id() << " " + << face->boundary_id() << " " << '<' << face->vertex(0) << '>' << std::endl << " <" << face->vertex(1) << '>' << std::endl << " <" << face->vertex(2) << '>' << std::endl diff --git a/tests/bits/hyper_ball_3d.cc b/tests/bits/hyper_ball_3d.cc index 96aab6823f..b6cf2d9e0a 100644 --- a/tests/bits/hyper_ball_3d.cc +++ b/tests/bits/hyper_ball_3d.cc @@ -55,7 +55,7 @@ int main () face!=tria.end_face(); ++face) { deallog << face << " " - << (int)face->boundary_id() << " " + << face->boundary_id() << " " << face->vertex_index(0) << " <" << face->vertex(0) << '>' << std::endl diff --git a/tests/grid/vertex_as_face_04.cc b/tests/grid/vertex_as_face_04.cc index 08624d1a53..6bfae0a28f 100644 --- a/tests/grid/vertex_as_face_04.cc +++ b/tests/grid/vertex_as_face_04.cc @@ -34,8 +34,8 @@ void test () GridGenerator::hyper_cube (tria); deallog << "Coarse mesh:" << std::endl; - deallog << "Left vertex=" << (int)tria.begin_active()->face(0)->boundary_id() << std::endl; - deallog << "Right vertex=" << (int)tria.begin_active()->face(1)->boundary_id() << std::endl; + deallog << "Left vertex=" << tria.begin_active()->face(0)->boundary_id() << std::endl; + deallog << "Right vertex=" << tria.begin_active()->face(1)->boundary_id() << std::endl; tria.refine_global (2); @@ -44,8 +44,8 @@ void test () cell != tria.end(); ++cell) { deallog << "Cell: " << cell << std::endl; - deallog << "Left vertex=" << (int)cell->face(0)->boundary_id() << std::endl; - deallog << "Right vertex=" << (int)cell->face(1)->boundary_id() << std::endl; + deallog << "Left vertex=" << cell->face(0)->boundary_id() << std::endl; + deallog << "Right vertex=" << cell->face(1)->boundary_id() << std::endl; } } diff --git a/tests/manifold/copy_material_to_manifold_id_01.cc b/tests/manifold/copy_material_to_manifold_id_01.cc index 028389690c..d122428a44 100644 --- a/tests/manifold/copy_material_to_manifold_id_01.cc +++ b/tests/manifold/copy_material_to_manifold_id_01.cc @@ -34,16 +34,16 @@ void print_info(Triangulation &tria) { deallog << "cell: " << cell << ", material_id: " - << (int)cell->material_id() + << cell->material_id() << ", manifold_id: " - << (int)cell->manifold_id() << std::endl; + << cell->manifold_id() << std::endl; for (unsigned int f=0; f::faces_per_cell; ++f) deallog << "face: " << cell->face(f) << ", boundary_id: " - << (int)cell->face(f)->boundary_id() + << cell->face(f)->boundary_id() << ", manifold_id: " - << (int)cell->face(f)->manifold_id() << std::endl; + << cell->face(f)->manifold_id() << std::endl; } } @@ -82,4 +82,3 @@ int main () return 0; } - diff --git a/tests/numerics/no_flux_10.cc b/tests/numerics/no_flux_10.cc index 68a19e5c71..2bbae89c05 100644 --- a/tests/numerics/no_flux_10.cc +++ b/tests/numerics/no_flux_10.cc @@ -191,7 +191,7 @@ void run() deallog << "Face=" << f << ", boundary_id=" << (int)triangulation.begin_active()->face(f)->boundary_id() << std::endl; - std::set no_normal_flux_boundaries; + std::set no_normal_flux_boundaries; no_normal_flux_boundaries.insert (0); no_normal_flux_boundaries.insert (2); VectorTools::compute_no_normal_flux_constraints diff --git a/tests/numerics/no_flux_11.cc b/tests/numerics/no_flux_11.cc index 0d0ba3ec3c..a78a781210 100644 --- a/tests/numerics/no_flux_11.cc +++ b/tests/numerics/no_flux_11.cc @@ -122,7 +122,7 @@ void run() dof_handler.distribute_dofs (fe); ConstraintMatrix constraints; - std::set no_normal_flux_boundaries; + std::set no_normal_flux_boundaries; no_normal_flux_boundaries.insert (6); VectorTools::compute_no_normal_flux_constraints (dof_handler, 0, diff --git a/tests/numerics/no_flux_12.cc b/tests/numerics/no_flux_12.cc index 4faf70d686..cf805e6301 100644 --- a/tests/numerics/no_flux_12.cc +++ b/tests/numerics/no_flux_12.cc @@ -21,7 +21,7 @@ /* 5: An error occurred in line <4586> of file in function -5: void dealii::VectorTools::compute_no_normal_flux_constraints(const DoFHandlerType&, unsigned int, const std::set&, dealii::ConstraintMatrix&, const dealii::Mapping&) [with int dim = 3; DoFHandlerType = dealii::DoFHandler; int spacedim = 3] +5: void dealii::VectorTools::compute_no_normal_flux_constraints(const DoFHandlerType&, unsigned int, const std::set&, dealii::ConstraintMatrix&, const dealii::Mapping&) [with int dim = 3; DoFHandlerType = dealii::DoFHandler; int spacedim = 3] 5: The violated condition was: 5: contribution->second.size() == dim-1 5: The name and call sequence of the exception was: @@ -85,7 +85,7 @@ void run() dof_handler.distribute_dofs (fe); ConstraintMatrix constraints; - std::set no_normal_flux_boundaries; + std::set no_normal_flux_boundaries; no_normal_flux_boundaries.insert (0); // x=0 no_normal_flux_boundaries.insert (5); // z=1 -- 2.39.5