]> https://gitweb.dealii.org/ - dealii.git/commitdiff
tests: move cat_file to other header
authorTimo Heister <timo.heister@gmail.com>
Thu, 19 Sep 2013 14:54:21 +0000 (14:54 +0000)
committerTimo Heister <timo.heister@gmail.com>
Thu, 19 Sep 2013 14:54:21 +0000 (14:54 +0000)
git-svn-id: https://svn.dealii.org/trunk@30827 0785d39b-7218-0410-832d-ea1e28bc413d

tests/mpi/coarse_grid_common.h
tests/tests.h

index a07b28d1193d849f30dbf578ef1dd3fcad566907..8590520d62e2094be21aee54d1eb22ba0a2964e0 100644 (file)
 #include <unistd.h>
 
 
-// given the name of a file, copy it to deallog
-// and then delete it
-void cat_file(const char *filename)
-{
-  std::ifstream in(filename);
-  Assert (in, ExcIO());
-
-  while (in)
-    {
-      std::string s;
-      std::getline(in, s);
-      deallog.get_file_stream() << s << "\n";
-    }
-  in.close();
-
-  std::remove (filename);
-}
 
 
 template <int dim>
index 9378b1bf29de4963e0af854759d9926e43cbb63d..0bb6b97f58b3e2dc9731fb90d439ab57c1feb1ec 100644 (file)
 #include <iomanip>
 
 
+// given the name of a file, copy it to deallog
+// and then delete it
+inline void cat_file(const char *filename)
+{
+  std::ifstream in(filename);
+  Assert (in, dealii::ExcIO());
+
+  while (in)
+    {
+      std::string s;
+      std::getline(in, s);
+      dealii::deallog.get_file_stream() << s << "\n";
+    }
+  in.close();
+
+  std::remove (filename);
+}
+
+
 #ifdef DEAL_II_WITH_PETSC
 #include <petscsys.h>
 

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.