]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Ensure initlog() is used in tests/manifold and tests/mappings. 7080/head
authorDavid Wells <drwells@email.unc.edu>
Sat, 18 Aug 2018 16:37:30 +0000 (12:37 -0400)
committerDavid Wells <drwells@email.unc.edu>
Sat, 18 Aug 2018 23:51:35 +0000 (19:51 -0400)
42 files changed:
tests/manifold/polar_manifold_01.cc
tests/manifold/polar_manifold_06.cc
tests/manifold/spherical_manifold_02.cc
tests/mappings/fe_face_values_1d_mapping_cartesian.cc
tests/mappings/fe_face_values_1d_mapping_q2.cc
tests/mappings/mapping.cc
tests/mappings/mapping_c1.cc
tests/mappings/mapping_fe_field_real_to_unit_b1.cc
tests/mappings/mapping_fe_field_real_to_unit_b2_curved.cc
tests/mappings/mapping_fe_field_real_to_unit_b2_mask.cc
tests/mappings/mapping_fe_field_real_to_unit_b3_curved.cc
tests/mappings/mapping_fe_field_real_to_unit_b4_curved.cc
tests/mappings/mapping_fe_field_real_to_unit_b5_curved.cc
tests/mappings/mapping_fe_field_real_to_unit_q1.cc
tests/mappings/mapping_fe_field_real_to_unit_q2_curved.cc
tests/mappings/mapping_fe_field_real_to_unit_q2_mask.cc
tests/mappings/mapping_fe_field_real_to_unit_q3_curved.cc
tests/mappings/mapping_fe_field_real_to_unit_q4_curved.cc
tests/mappings/mapping_fe_field_real_to_unit_q5_curved.cc
tests/mappings/mapping_manifold_03.cc
tests/mappings/mapping_manifold_step-3.cc
tests/mappings/mapping_q1_eulerian.cc
tests/mappings/mapping_q1_eulerian_01.cc
tests/mappings/mapping_q_eulerian.cc
tests/mappings/mapping_q_eulerian_01.cc
tests/mappings/mapping_q_eulerian_02.cc
tests/mappings/mapping_q_eulerian_03.cc
tests/mappings/mapping_q_eulerian_04.cc
tests/mappings/mapping_q_eulerian_05.cc
tests/mappings/mapping_q_eulerian_06.cc
tests/mappings/mapping_q_manifold_01.cc
tests/mappings/mapping_q_mixed_manifolds_01.cc
tests/mappings/mapping_q_mixed_manifolds_02.cc
tests/mappings/mapping_real_to_unit_02.cc
tests/mappings/mapping_real_to_unit_q1.cc
tests/mappings/mapping_real_to_unit_q1_singular.cc
tests/mappings/mapping_real_to_unit_q4_curved.cc
tests/mappings/mapping_real_to_unit_q4_curved_codim.cc
tests/mappings/mapping_real_to_unit_q4_sphere_x.cc
tests/mappings/mapping_real_to_unit_q4_sphere_y.cc
tests/mappings/mapping_real_to_unit_q4_sphere_z.cc
tests/mappings/mapping_real_to_unit_q4_straight.cc

index 93b8755064e12c0e8fd8ca5b611100522ad4d218..ae48c39809a0a6973e4ec411c23fff7219cc9cac 100644 (file)
@@ -66,6 +66,4 @@ main()
 
   test<2, 2>();
   test<3, 3>();
-
-  return 0;
 }
index 9bb904467fc508f0d601653fe1f5d17dd18289ed..c8da88f7f4b971c23a95ca7f97eced5609d15875 100644 (file)
@@ -54,13 +54,9 @@ test()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test<2, 2>();
   test<2, 3>();
-
   test<3, 3>();
-
-  return 0;
 }
index c3c8b9bdc52bf09c20327146d0e88745a57a1d57..e784b66d38fe4c3e5d8ce59b6a50769741647cca 100644 (file)
@@ -98,13 +98,13 @@ test(MappingEnum::type mapping_name, unsigned int refinements = 1)
   triangulation.refine_global(refinements);
   dof_handler.distribute_dofs(fe);
 
-  {
-    // Save mesh to file for visualization
-    GridOut       grid_out;
-    std::ofstream grid_file("grid.vtk");
-    grid_out.write_vtk(triangulation, grid_file);
-    // deallog << "Grid has been saved into grid.vtk" << std::endl;
-  }
+  if (false) // reenable for visualization
+    {
+      GridOut       grid_out;
+      std::ofstream grid_file("grid.vtk");
+      grid_out.write_vtk(triangulation, grid_file);
+      // deallog << "Grid has been saved into grid.vtk" << std::endl;
+    }
 
   // deallog << "Surface mesh has " << triangulation.n_active_cells()
   //           << " cells."
@@ -174,6 +174,4 @@ main()
   for (unsigned int i = 1; i < 8; ++i)
     test(MappingEnum::MappingQ, i);
   deallog << bar << std::endl;
-
-  return 0;
 }
index fa594f2d55e8db23ad1843fa23a211e0b270d34d..e826a3aba4d5e20cc6e07f6581d2f5464a3a59c1 100644 (file)
@@ -176,9 +176,8 @@ mapping_test()
 int
 main()
 {
-  std::ofstream logfile("output");
+  initlog();
   deallog << std::setprecision(PRECISION);
-  deallog.attach(logfile);
 
   // -----------------------
   // Tests for dim=1
index 702e37b398d7039c2597fab1d22fd01d74ee2fc7..df59400f2fa4abd0264bca1fa6f048391ab3b2f9 100644 (file)
@@ -176,9 +176,8 @@ mapping_test()
 int
 main()
 {
-  std::ofstream logfile("output");
+  initlog();
   deallog << std::setprecision(PRECISION);
-  deallog.attach(logfile);
 
   // -----------------------
   // Tests for dim=1
index ea505c03554caa53f6a372af4c6d0100011dc595..48279d61aaf026bfcb3f83aeebe71aa258d826d3 100644 (file)
@@ -556,9 +556,8 @@ mapping_test()
 int
 main()
 {
-  std::ofstream logfile("output");
+  initlog();
   deallog << std::setprecision(PRECISION);
-  deallog.attach(logfile);
 
   // -----------------------
   // Tests for dim=1
index 5fdd80812f12357a397b1b5fafde4572b69ff4df..5e17940f03ccaf6cd847280d342d4240826942bb 100644 (file)
 int
 main()
 {
-  std::ofstream logfile("output");
+  initlog();
   deallog << std::fixed;
   deallog << std::setprecision(PRECISION) << std::fixed;
-  deallog.attach(logfile);
 
   // create grid of circle, somehow
   // arbitrarily from only one cell,
index 490a21f3c06a1889d15e788fb9a348262a7ef469..f3274028692baeaf7ef4353ab2d5d0a747830ae8 100644 (file)
@@ -135,8 +135,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test_real_to_unit_cell<1, 1>();
   test_real_to_unit_cell<2, 2>();
@@ -145,6 +144,4 @@ main()
   test_real_to_unit_cell<1, 2>();
   test_real_to_unit_cell<1, 3>();
   test_real_to_unit_cell<2, 3>();
-
-  return 0;
 }
index bc570a3b214c916956c013d3d27306493912516c..5c6e794fe2a90aa84581121262a605b2d40fb27d 100644 (file)
@@ -136,8 +136,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test_real_to_unit_cell<1, 1>();
   test_real_to_unit_cell<2, 2>();
@@ -147,5 +146,4 @@ main()
   test_real_to_unit_cell<2, 3>();
 
   // test_real_to_unit_cell<1,3>();
-  return 0;
 }
index 2abd8f387691a8c6413e304a726667fd63a4d37d..96b8d98fbb9fc94e408719cba549084d57c8f72f 100644 (file)
@@ -138,8 +138,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test_real_to_unit_cell<1, 1>();
   test_real_to_unit_cell<2, 2>();
@@ -149,5 +148,4 @@ main()
   test_real_to_unit_cell<2, 3>();
 
   // test_real_to_unit_cell<1,3>();
-  return 0;
 }
index 2c2dfda64adb38ef3e06d7f9de21821f5335bce6..0531148f3db188f4d056ff33e1759b416339cb0f 100644 (file)
@@ -136,8 +136,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test_real_to_unit_cell<1, 1>();
   test_real_to_unit_cell<2, 2>();
@@ -146,7 +145,5 @@ main()
   test_real_to_unit_cell<1, 2>();
   test_real_to_unit_cell<2, 3>();
 
-
   // test_real_to_unit_cell<1,3>();
-  return 0;
 }
index fe6d80d726f1e6882b59bc806d550ddd9cf00c6d..c7f80618df9cc36c2e29f590474d7efc9fd5f15b 100644 (file)
@@ -135,8 +135,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test_real_to_unit_cell<1, 1>();
   test_real_to_unit_cell<2, 2>();
@@ -145,7 +144,5 @@ main()
   test_real_to_unit_cell<1, 2>();
   test_real_to_unit_cell<2, 3>();
 
-
   // test_real_to_unit_cell<1,3>();
-  return 0;
 }
index 01810923556f222504f3c6c5a3116aebe106627d..9f086cc15b9d3a9eae8c2aacceb55f56f572d571 100644 (file)
@@ -135,8 +135,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test_real_to_unit_cell<1, 1>();
   test_real_to_unit_cell<2, 2>();
@@ -145,7 +144,5 @@ main()
   test_real_to_unit_cell<1, 2>();
   test_real_to_unit_cell<2, 3>();
 
-
   // test_real_to_unit_cell<1,3>();
-  return 0;
 }
index b485e66aab2928d5552c0c688c4efd607582a858..ac784f8dc0931d40989e339be8782072cb3bba85 100644 (file)
@@ -133,8 +133,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test_real_to_unit_cell<1, 1>();
   test_real_to_unit_cell<2, 2>();
@@ -143,6 +142,4 @@ main()
   test_real_to_unit_cell<1, 2>();
   test_real_to_unit_cell<1, 3>();
   test_real_to_unit_cell<2, 3>();
-
-  return 0;
 }
index c037bf752fd292d0e202b8e5bca7ddc968d2a86b..4d96dab647c57f4928513894733990af37ab0f17 100644 (file)
@@ -135,8 +135,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test_real_to_unit_cell<1, 1>();
   test_real_to_unit_cell<2, 2>();
@@ -146,5 +145,4 @@ main()
   test_real_to_unit_cell<2, 3>();
 
   // test_real_to_unit_cell<1,3>();
-  return 0;
 }
index 427ecf04cf925ef8e27ed8a9c3264ae86ecaaa41..1dbabdb561bc7592a4cc7b08ca38d536e7357260 100644 (file)
@@ -139,8 +139,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test_real_to_unit_cell<1, 1>();
   test_real_to_unit_cell<2, 2>();
@@ -149,6 +148,4 @@ main()
   test_real_to_unit_cell<1, 2>();
   test_real_to_unit_cell<1, 3>();
   test_real_to_unit_cell<2, 3>();
-
-  return 0;
 }
index 890a08cb693b5df8f611e35834da751d4ad9d05e..2f0a60d37c88089f4d8126c8445220aa7e407916 100644 (file)
@@ -135,8 +135,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test_real_to_unit_cell<1, 1>();
   test_real_to_unit_cell<2, 2>();
index 7356bb6b3d83828e53f2bb701e1bc4f9b2db77d7..9190c53cd062ea0c4d1b8e2e71515d1f27d6875c 100644 (file)
@@ -134,8 +134,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test_real_to_unit_cell<1, 1>();
   test_real_to_unit_cell<2, 2>();
@@ -144,7 +143,5 @@ main()
   test_real_to_unit_cell<1, 2>();
   test_real_to_unit_cell<2, 3>();
 
-
   // test_real_to_unit_cell<1,3>();
-  return 0;
 }
index c5d330b0b1a592bdfa94ee26dc47b76c7512cc2c..7d300e3ec555ebebeec6f5498daac59bc035c024 100644 (file)
@@ -135,8 +135,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test_real_to_unit_cell<1, 1>();
   test_real_to_unit_cell<2, 2>();
@@ -145,7 +144,5 @@ main()
   test_real_to_unit_cell<1, 2>();
   test_real_to_unit_cell<2, 3>();
 
-
   // test_real_to_unit_cell<1,3>();
-  return 0;
 }
index 23a32ae7856a51ea25fec9b65cc0b30d2e575bed..696605097b30b4e25e9525273cc821927a521ec8 100644 (file)
@@ -99,8 +99,7 @@ test()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test<1, 1>();
   test<1, 2>();
@@ -110,6 +109,4 @@ main()
   test<2, 3>();
 
   test<3, 3>();
-
-  return 0;
 }
index b870c06e643e0d1f341314706e01e94bf0aa15a5..4e3293df269f5e49d02c069a8e4a45674b33016b 100644 (file)
 
 #include "../tests.h"
 
-std::ofstream logfile("output");
-
-
-
 class LaplaceProblem
 {
 public:
@@ -221,10 +217,9 @@ LaplaceProblem::run()
 int
 main()
 {
+  initlog();
   deallog << std::setprecision(2);
-  logfile << std::setprecision(2);
-
-  deallog.attach(logfile);
+  deallog.get_file_stream() << std::setprecision(2);
 
   LaplaceProblem laplace_problem;
   laplace_problem.run();
index 94ac443be0e0333680f3f3814c7b24f817dd0942..ae8012966daacbfc58b668d5e57dbd927b34b0bf 100644 (file)
@@ -105,12 +105,9 @@ show_values()
 int
 main()
 {
-  std::ofstream logfile("output");
+  initlog();
   deallog << std::setprecision(2);
   deallog << std::fixed;
-  deallog.attach(logfile);
-
-
 
   deallog.push("1d");
   show_values<1>();
@@ -123,6 +120,4 @@ main()
   deallog.push("3d");
   show_values<3>();
   deallog.pop();
-
-  return 0;
 }
index b73594138b2f3144522265628bf834ce144bd255..ffe46648fa8b9c005551aad6e18c696cfd5d61bc 100644 (file)
@@ -117,10 +117,8 @@ test()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
   deallog << std::setprecision(4);
-  logfile << std::setprecision(4);
 
   test<1>();
   test<2>();
index 851889f4228e427e517dd12b43747a32d8561481..aa82f0bbf2eb74bc18c79e52faacb181a9522a2d 100644 (file)
@@ -46,8 +46,6 @@
 #include <deal.II/numerics/matrix_tools.h>
 #include <deal.II/numerics/vector_tools.h>
 
-#include <iostream>
-
 #include "../tests.h"
 
 
@@ -260,10 +258,9 @@ MappingTest<dim>::graphical_output()
 int
 main()
 {
-  std::ofstream logfile("output");
+  initlog();
   deallog << std::setprecision(2);
   deallog << std::fixed;
-  deallog.attach(logfile);
 
   // convergence studies
 
index 4cd6a799f8e6f51d859a1e563fbbbd9bec458de0..32e210863f7d65077e06058459bc8b4f33a779f6 100644 (file)
@@ -115,10 +115,8 @@ test()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
   deallog << std::setprecision(4);
-  logfile << std::setprecision(4);
 
   test<1>();
   test<2>();
index 6879b4c065738ec0d61dc7a48ddd7f28d580e75f..118688c0cd7a83743b1d272e9245fa9ab3fc40c1 100644 (file)
@@ -117,10 +117,9 @@ test()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
   deallog << std::setprecision(4);
-  logfile << std::setprecision(4);
+  deallog.get_file_stream() << std::setprecision(4);
 
   test<1>();
   test<2>();
index b0ba465366995ff9b34f4eab110d76a09bb00b20..104a0f901c82abd32e0250a1772e487155f66c56 100644 (file)
@@ -118,10 +118,8 @@ test()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
   deallog << std::setprecision(4);
-  logfile << std::setprecision(4);
 
   test<1>();
   test<2>();
index 2e0d6c756202939c426890ba8db4b81754540356..baf028348e26804846ed830629d59facdc68b37a 100644 (file)
@@ -40,8 +40,6 @@
 
 #include <string>
 
-std::ofstream logfile("output");
-
 template <int dim, int spacedim>
 void
 test()
@@ -61,7 +59,7 @@ test()
 
   GridOut grid_out;
   grid_out.set_flags(GridOutFlags::Ucd(true));
-  grid_out.write_ucd(tria, logfile);
+  grid_out.write_ucd(tria, deallog.get_file_stream());
 
   QTrapez<dim>                                     quad;
   MappingQ1Eulerian<dim, Vector<double>, spacedim> mapping(shift_dh, shift);
@@ -89,11 +87,9 @@ test()
 int
 main()
 {
-  deallog.attach(logfile);
+  initlog();
 
   test<1, 1>();
   test<2, 2>();
   test<3, 3>();
-
-  return 0;
 }
index ae6b365561376a27db991d43bfe531637ecc2a97..52eacede433e694748402b450d4598651dcec669 100644 (file)
@@ -38,8 +38,6 @@
 
 #include <string>
 
-std::ofstream logfile("output");
-
 template <int dim, int spacedim>
 void
 test(unsigned int degree)
@@ -59,7 +57,7 @@ test(unsigned int degree)
 
   GridOut grid_out;
   grid_out.set_flags(GridOutFlags::Ucd(true));
-  grid_out.write_ucd(tria, logfile);
+  grid_out.write_ucd(tria, deallog.get_file_stream());
 
   QTrapez<dim>                                    quad;
   MappingQEulerian<dim, Vector<double>, spacedim> mapping(degree,
@@ -89,7 +87,7 @@ test(unsigned int degree)
 int
 main()
 {
-  deallog.attach(logfile);
+  initlog();
 
   test<1, 1>(1);
   test<2, 2>(1);
@@ -98,5 +96,4 @@ main()
   test<1, 1>(2);
   test<2, 2>(2);
   test<3, 3>(2);
-  return 0;
 }
index f71de3cf788e6f0937c6cfa04a64e26daac1ae91..118cb9ab8ade6d943ce1ec1faa3756e9deea3e78 100644 (file)
@@ -36,8 +36,6 @@
 
 #include <string>
 
-std::ofstream logfile("output");
-
 void
 test(unsigned int degree)
 {
@@ -83,10 +81,9 @@ test(unsigned int degree)
 int
 main()
 {
-  deallog.attach(logfile);
+  initlog();
 
   test(1);
   test(2);
   test(3);
-  return 0;
 }
index df4dabb17148cd14db68143b549fb23701ec161f..e23978fec03e378ab53455eef7ac10476cf5fa36 100644 (file)
@@ -218,23 +218,25 @@ test(const FiniteElement<dim> &fe)
 
       deallog << mapping.get_degree() << "\t" << diff.l2_norm() << std::endl;
 
-      DataOut<dim>  data_out;
-      std::ofstream output(
-        ("output_" + Utilities::int_to_string(mapping_p) + ".vtk").c_str());
-      data_out.attach_dof_handler(dof_handler);
-      data_out.add_data_vector(v, "v");
-      data_out.add_data_vector(diff, "e");
-      data_out.build_patches(mapping, fe.degree);
-      data_out.write_vtk(output);
-      output.close();
+      if (false) // enable for visualization
+        {
+          DataOut<dim>  data_out;
+          std::ofstream output(
+            ("output_" + Utilities::int_to_string(mapping_p) + ".vtk").c_str());
+          data_out.attach_dof_handler(dof_handler);
+          data_out.add_data_vector(v, "v");
+          data_out.add_data_vector(diff, "e");
+          data_out.build_patches(mapping, fe.degree);
+          data_out.write_vtk(output);
+        }
     }
 }
 
 int
 main()
 {
+  initlog();
   deallog << std::setprecision(5);
-  deallog.attach(std::cout);
   deallog.depth_console(0);
 
   const static unsigned dim = 3;
index c08b590c7c534245287849d192911749af7f42fa..4e1cbef552ea0902f47123ae0f1cbd282c9559bc 100644 (file)
@@ -114,8 +114,7 @@ test()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test<2>();
   test<3>();
index 32fad4e2ea0a5b5f6bf02ab4cedc349aa38237d7..20d228f1098a2a226837daf994089a79f53c16c1 100644 (file)
@@ -251,8 +251,7 @@ test()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test<2>();
   test<3>();
index 20468dd46f752ce77859ec214473502b15903920..82b8c5ce01fe9789824e9ea1bcc1e6d03483eb13 100644 (file)
@@ -82,10 +82,7 @@ test2()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test2<2>();
-
-  return 0;
 }
index 25c7339869020672f3b09ce6abbdd1d586a6ce1c..6eaabc904e5e55734e92b8f65542eb36115091bd 100644 (file)
@@ -114,9 +114,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
-
+  initlog();
 
   test_real_to_unit_cell<1, 1>();
   test_real_to_unit_cell<2, 2>();
@@ -125,6 +123,4 @@ main()
   test_real_to_unit_cell<1, 2>();
   test_real_to_unit_cell<1, 3>();
   test_real_to_unit_cell<2, 3>();
-
-  return 0;
 }
index f3ac51c3f957f948a5b03f850093bec8196bbcc5..28b41786e7e5a0336efa2ed0408d94c9d3e07292 100644 (file)
@@ -62,10 +62,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test_real_to_unit_cell<2>();
-
-  return 0;
 }
index 42ccfa5ca3a1499321520808633fae3887fc54e4..ed5303bfe5f29d8e6a30e3e48e79aa6483b16e07 100644 (file)
@@ -114,9 +114,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
-
+  initlog();
 
   test_real_to_unit_cell<1, 1>();
   test_real_to_unit_cell<2, 2>();
@@ -126,6 +124,4 @@ main()
 
   // the following is not currently implemented
   //  test_real_to_unit_cell<1,3>();
-
-  return 0;
 }
index 515d3a1ae54d3f9787cf620c4a0f1feb13635c9c..6530a89543ae86f0a689c914ce60bf4dbdfd8c65 100644 (file)
@@ -114,11 +114,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
-
+  initlog();
 
   test_real_to_unit_cell<2, 3>();
-
-  return 0;
 }
index 910a7efb1e1e4bbf6934dfae09fceba359ef316c..f4917077de4b4a8e23f0d59710450948c9413f2f 100644 (file)
@@ -95,8 +95,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test_real_to_unit_cell();
 
index 2be4b3b1fadc63723dd6ed6a48d958037d9bf69e..d3515cc9ef3a387fda053a779556580b826f3b82 100644 (file)
@@ -103,10 +103,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test_real_to_unit_cell();
-
-  return 0;
 }
index b1348c7851800f2f9df88b1032ad93b732919eab..6acfc1fcd14443635780aef8de2fab46cd5c9df7 100644 (file)
@@ -86,10 +86,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
+  initlog();
 
   test_real_to_unit_cell();
-
-  return 0;
 }
index 6a962c77d090bb800f9d31384a31028c6113f166..32f3d7c3bcc39d84c311f70683eb4d85f4af401f 100644 (file)
@@ -119,9 +119,7 @@ test_real_to_unit_cell()
 int
 main()
 {
-  std::ofstream logfile("output");
-  deallog.attach(logfile);
-
+  initlog();
 
   test_real_to_unit_cell<1, 1>();
   test_real_to_unit_cell<2, 2>();
@@ -132,6 +130,4 @@ main()
   // the following is not currently implemented
   //  test_real_to_unit_cell<1,3>();
   test_real_to_unit_cell<2, 3>();
-
-  return 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.