]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Implement merging files.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 20 Apr 2005 22:22:39 +0000 (22:22 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 20 Apr 2005 22:22:39 +0000 (22:22 +0000)
git-svn-id: https://svn.dealii.org/trunk@10552 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-19/step-19.cc

index b5b3611d2def62a7f4a976167d1031c23aedfcfa..b0add28665995f877449228feb84a47249d0d6ad 100644 (file)
@@ -4,7 +4,7 @@
 /*    $Id$       */
 /*    Version: $Name$                                          */
 /*                                                                */
-/*    Copyright (C) 2000, 2004, 2005 by the deal.II authors */
+/*    Copyright (C) 2005 by the deal.II authors */
 /*                                                                */
 /*    This file is subject to QPL and may not be  distributed     */
 /*    without copyright and license information. Please refer     */
@@ -33,6 +33,17 @@ void do_convert (const std::vector<std::string> &input_files,
   DataOutReader<dim,spacedim> intermediate_data;  
   intermediate_data.read (intermediate_stream);
 
+                                  // for all following input files
+  for (unsigned int i=1; i<input_files.size(); ++i)
+    {
+      std::ifstream additional_stream (input_files[i].c_str());
+      AssertThrow (additional_stream, ExcIO());
+
+      DataOutReader<dim,spacedim> additional_data;  
+      additional_data.read (additional_stream);
+      intermediate_data.merge (additional_data);
+    } 
+  
   std::ofstream output_stream (output_file.c_str());
   AssertThrow (output_stream, ExcIO());
 

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.