]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix tests (compilation issues; remove unnecessary casts)
authorJean-Paul Pelteret <jppelteret@gmail.com>
Tue, 8 Aug 2017 03:55:03 +0000 (21:55 -0600)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Wed, 9 Aug 2017 23:05:18 +0000 (17:05 -0600)
tests/base/pattern_tools_01.cc
tests/base/pattern_tools_03.cc
tests/base/pattern_tools_04.cc
tests/bits/cylinder.cc
tests/bits/hyper_ball_3d.cc
tests/grid/vertex_as_face_04.cc
tests/manifold/copy_material_to_manifold_id_01.cc
tests/numerics/no_flux_10.cc
tests/numerics/no_flux_11.cc
tests/numerics/no_flux_12.cc

index 627935133506eff300db204287eb32691a37c4a5..066538eb127a03a4783186b2694f3d9d7aa4f0c2 100644 (file)
@@ -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;
index f12dea24ca8b75109dc95bff43b630e3018a38d7..2c985b4038672b412bc510ddbf0399cc6de99446 100644 (file)
@@ -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<int                > t10(2, t0);
   std::vector<unsigned int       > t11(2, t1);
-  std::vector<types::boundary_id > t12(2, t2);
+  std::vector<unsigned char      > t12(2, t2);
   std::vector<std::string        > t13(2, t3);
   std::vector<double             > t14(2, t4);
 
index 073b2b4d5b5a550add21c29699ec818e2f01ebe6..71964779ef3a8b4146e7939ae07db35f752adc1b 100644 (file)
@@ -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<unsigned int, int                > t10;
   std::map<unsigned int, unsigned int       > t11;
-  std::map<unsigned int, types::boundary_id > t12;
+  std::map<unsigned int, unsigned char      > t12;
   std::map<unsigned int, std::string        > t13;
   std::map<unsigned int, double             > t14;
 
index 61291fc7caee46ef89c4acf334072075cd003ba9..fcfceb6a65241570304baddc232c161e49f316ce 100644 (file)
@@ -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
index 96aab6823ffd1fbeb45b1f192e8e49b22650880d..b6cf2d9e0a582c629ed8bedb9d0f8f53cd9c9eb4 100644 (file)
@@ -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
index 08624d1a53d5c6b224a22df5909dacf377194e40..6bfae0a28f9a46f01e512429238193664ac1bcef 100644 (file)
@@ -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;
     }
 }
 
index 028389690c24a357344f19c9ba30121845751aa5..d122428a44f6e667363d04c8b1e6a7c78f1e7a08 100644 (file)
@@ -34,16 +34,16 @@ void print_info(Triangulation<dim,spacedim> &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<GeometryInfo<dim>::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;
 }
-
index 68a19e5c7102d99a4b7012fbe536b4aa1172a6e1..2bbae89c05e6008e59a468d02d89428b2d9a1231 100644 (file)
@@ -191,7 +191,7 @@ void run()
     deallog << "Face=" << f << ", boundary_id="
             << (int)triangulation.begin_active()->face(f)->boundary_id() << std::endl;
 
-  std::set<unsigned char> no_normal_flux_boundaries;
+  std::set<types::boundary_id> no_normal_flux_boundaries;
   no_normal_flux_boundaries.insert (0);
   no_normal_flux_boundaries.insert (2);
   VectorTools::compute_no_normal_flux_constraints
index 0d0ba3ec3c5a3b7a17654d91615d05a4d3786e66..a78a78121066e8c604eb66f2a4ba552f178ae110 100644 (file)
@@ -122,7 +122,7 @@ void run()
   dof_handler.distribute_dofs (fe);
 
   ConstraintMatrix constraints;
-  std::set<unsigned char> no_normal_flux_boundaries;
+  std::set<types::boundary_id> no_normal_flux_boundaries;
   no_normal_flux_boundaries.insert (6);
   VectorTools::compute_no_normal_flux_constraints
   (dof_handler, 0,
index 4faf70d686c4dfc84805f5ecd77def147b21f23a..cf805e630106a0aaad0482e920a6c083d5e02ab4 100644 (file)
@@ -21,7 +21,7 @@
 
 /*
 5: An error occurred in line <4586> of file </scratch/deal-trunk/deal.II/include/deal.II/numerics/vector_tools.templates.h> in function
-5:     void dealii::VectorTools::compute_no_normal_flux_constraints(const DoFHandlerType<dim, spacedim>&, unsigned int, const std::set<unsigned char>&, dealii::ConstraintMatrix&, const dealii::Mapping<dim, spacedim>&) [with int dim = 3; DoFHandlerType = dealii::DoFHandler; int spacedim = 3]
+5:     void dealii::VectorTools::compute_no_normal_flux_constraints(const DoFHandlerType<dim, spacedim>&, unsigned int, const std::set<types::boundary_id>&, dealii::ConstraintMatrix&, const dealii::Mapping<dim, spacedim>&) [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<unsigned char> no_normal_flux_boundaries;
+  std::set<types::boundary_id> no_normal_flux_boundaries;
   no_normal_flux_boundaries.insert (0); // x=0
   no_normal_flux_boundaries.insert (5); // z=1
 

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.