]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make clang happy
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 5 Oct 2013 11:46:11 +0000 (11:46 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 5 Oct 2013 11:46:11 +0000 (11:46 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31142 0785d39b-7218-0410-832d-ea1e28bc413d

tests/mpi/coarse_grid_common.h

index 8590520d62e2094be21aee54d1eb22ba0a2964e0..9c915f0c275b258fa978fbe90643b5c04bed0a36 100644 (file)
 
 template <int dim>
 void write_vtk (const parallel::distributed::Triangulation<dim> &tria,
-                const char                                *dirname,
                 const char                                *filename)
 {
   deallog << "Checksum: "
           << tria.get_checksum ()
           << std::endl;
 
-  chdir (dirname);
   tria.write_mesh_vtk (filename);
 
   if (false)
@@ -71,20 +69,17 @@ void write_vtk (const parallel::distributed::Triangulation<dim> &tria,
             }
         }
     }
-
-
-  chdir ("..");
 }
 
 
 template <int dim>
-void assert_tria_equal(const char *testdir, const Triangulation<dim> &a, const Triangulation<dim> &b)
+void assert_tria_equal(const Triangulation<dim> &a, const Triangulation<dim> &b)
 {
   Assert (a.n_active_cells() == b.n_active_cells(),
           ExcInternalError());
 
-  std::string file1=std::string(testdir)+"/tmp_grid1";
-  std::string file2=std::string(testdir)+"/tmp_grid2";
+  std::string file1 = "tmp_grid1";
+  std::string file2 = "tmp_grid2";
 
   std::ofstream out1(file1.c_str());
   GridOut().write_gnuplot (a, out1);
@@ -113,3 +108,14 @@ operator << (LogStream &out,
     out << v[i] << (i == v.size()-1 ? "" : " ");
   return out;
 }
+
+
+template <typename T>
+std::ostringstream &
+operator << (std::ostringstream &out,
+             const std::vector<T> &v)
+{
+  for (unsigned int i=0; i<v.size(); ++i)
+    out << v[i] << (i == v.size()-1 ? "" : " ");
+  return out;
+}

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.