]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Update the style of tests. 4881/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 21 Aug 2017 16:28:12 +0000 (10:28 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 21 Aug 2017 23:14:11 +0000 (17:14 -0600)
While there, also update a couple of outdated comments.

tests/distributed_grids/2d_dofhandler_01.cc
tests/distributed_grids/count_dofs_per_block_01.cc
tests/distributed_grids/count_dofs_per_component_01.cc
tests/distributed_grids/dof_handler_number_cache.cc
tests/distributed_grids/hp_2d_dofhandler_01.cc
tests/distributed_grids/hp_count_dofs_per_block_01.cc
tests/distributed_grids/hp_count_dofs_per_component_01.cc
tests/distributed_grids/hp_dof_handler_number_cache.cc

index aee31ec4c395396b5c183326b10c96ece60dc97c..46d25a088e2616a70d3216414832a9ea22c2901b 100644 (file)
@@ -36,7 +36,7 @@
 
 
 template <int dim>
-void test(std::ostream & /*out*/)
+void test()
 {
   deallog << "hyper_cube" << std::endl;
 
@@ -75,11 +75,10 @@ int main(int argc, char *argv[])
 {
   Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1);
 
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   deallog.push("2d");
-  test<2>(logfile);
+  test<2>();
   deallog.pop();
 
 
index 699ead3425c93dcb7905367116c73f8c4cd5ae5a..d2caaa71dae3a765dcae1853a1d8178b2c4f3fd0 100644 (file)
@@ -105,12 +105,7 @@ void test()
 
 int main(int argc, char *argv[])
 {
-#ifdef DEAL_II_WITH_MPI
   Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1);
-#else
-  (void)argc;
-  (void)argv;
-#endif
 
   unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
   if (myid == 0)
index c432defbd81d7c96902af4302597203e3470b0d7..9c1ab47c580e285a18c034398d1dcad27492d46b 100644 (file)
@@ -71,12 +71,7 @@ void test()
 
 int main(int argc, char *argv[])
 {
-#ifdef DEAL_II_WITH_MPI
   Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1);
-#else
-  (void)argc;
-  (void)argv;
-#endif
 
   unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
   if (myid == 0)
index b1c62bd727bc2dbab1c2cf41c6af48394db4f6b4..c2a9a502cc34d51a963f67e4077a25c937594d94 100644 (file)
@@ -15,7 +15,7 @@
 
 
 
-// like the same test in deal.II but this time use a
+// like the dofs/dof_handler_number_cache test but this time use a
 // parallel::distributed::Triangulation object. We still use only a
 // single processor so the end result should be the same but we use
 // entirely different code paths
@@ -107,12 +107,7 @@ void test()
 
 int main(int argc, char *argv[])
 {
-#ifdef DEAL_II_WITH_MPI
   Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1);
-#else
-  (void)argc;
-  (void)argv;
-#endif
 
   unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
   if (myid == 0)
index 480e695238771a0c4c3c7d1a41b823a73b37ed4d..d04bdfa70ed3f076ec0a980de737d14f2eede7dd 100644 (file)
@@ -41,7 +41,7 @@
 
 
 template <int dim>
-void test(std::ostream & /*out*/)
+void test()
 {
   deallog << "hyper_cube" << std::endl;
 
@@ -81,12 +81,9 @@ int main(int argc, char *argv[])
 {
   Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1);
 
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog ();
 
   deallog.push("2d");
-  test<2>(logfile);
+  test<2>();
   deallog.pop();
-
-
 }
index 928bb688f6fe1e3eb7a552bd6ad2718820bc1676..4fefc18585ed4379d3eb930b5d7445fc2b21305e 100644 (file)
@@ -112,12 +112,7 @@ void test()
 
 int main(int argc, char *argv[])
 {
-#ifdef DEAL_II_WITH_MPI
   Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1);
-#else
-  (void)argc;
-  (void)argv;
-#endif
 
   unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
   if (myid == 0)
index e1bbdbdf5e37a32ce50dd05b8a29bdfecb397bba..1e7401b19b1817805fb605db5fde0df22537f8ea 100644 (file)
@@ -78,12 +78,7 @@ void test()
 
 int main(int argc, char *argv[])
 {
-#ifdef DEAL_II_WITH_MPI
   Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1);
-#else
-  (void)argc;
-  (void)argv;
-#endif
 
   unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
   if (myid == 0)
index f5ae269504e729948fbe6b795cf637dfe4c4f761..45bf55e0bf179da76c03d58b61b06b7b7c572a94 100644 (file)
@@ -15,7 +15,7 @@
 
 
 
-// like the same test in deal.II but this time use a
+// like the dofs/dof_handler_number_cache test but this time use a
 // parallel::distributed::Triangulation object. We still use only a
 // single processor so the end result should be the same but we use
 // entirely different code paths
@@ -114,12 +114,7 @@ void test()
 
 int main(int argc, char *argv[])
 {
-#ifdef DEAL_II_WITH_MPI
   Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1);
-#else
-  (void)argc;
-  (void)argv;
-#endif
 
   unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
   if (myid == 0)

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.