]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Delete temporary file after concatenating it to deallog.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 11 Sep 2011 17:56:41 +0000 (17:56 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 11 Sep 2011 17:56:41 +0000 (17:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@24305 0785d39b-7218-0410-832d-ea1e28bc413d

tests/mpi/coarse_grid_common.h

index 76b260ab6017b1f7e34509c7dab1619401e9e2c3..e2a2b39b5fbd7e069e36d9c8d5391dbe1cd7ec48 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id: coarse_grid_01.cc 16363 2008-06-16 20:42:57Z bangerth $
 //    Version: $Name$
 //
-//    Copyright (C) 2008, 2009 by the deal.II authors
+//    Copyright (C) 2008, 2009, 2011 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -23,6 +23,9 @@
 #include <iomanip>
 #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);
@@ -32,6 +35,9 @@ void cat_file(const char * filename)
       std::getline(in, s);
       deallog.get_file_stream() << s << "\n";
     }
+  in.close();
+
+  std::remove (filename);
 }
 
 

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.