]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove visit add comments 8963/head
authorPeter Munch <peterrmuench@gmail.com>
Tue, 5 Nov 2019 22:31:38 +0000 (23:31 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Tue, 5 Nov 2019 22:31:38 +0000 (23:31 +0100)
examples/step-18/step-18.cc

index 9ef36d5c585c925c625e8ace42a92b2ef14d1e2d..82ec97b2b6d393414789a595fa3953d432d7d5f2 100644 (file)
@@ -1271,9 +1271,20 @@ namespace Step18
     // all these solution and other data vectors:
     data_out.build_patches();
 
-    // Let us open a file and write the data we have generated into it:
-    const auto pvtu_master_filename = data_out.write_vtu_with_pvtu_record(
-      "./", "solution", timestep_no, 4, mpi_communicator);
+    // Let us call a function that opens the necessary output files and writes
+    // the data we have generated into them. The function automatically
+    // constructs the file names from the given directory name (the first
+    // argument) and file name base (second argument). It augments the resulting
+    // string by pieces that result from the time step number and a "piece
+    // number" that corresponds to a part of the overall domain that can consist
+    // of one or more subdomains.
+    //
+    // The function also writes a record files (with suffix `.pvd`) for Paraview
+    // that describes how all of these output files combine into the data for
+    // this single time step:
+    const std::string pvtu_master_filename =
+      data_out.write_vtu_with_pvtu_record(
+        "./", "solution", timestep_no, 4, mpi_communicator);
 
     // The record files must be written only once and not by each processor,
     // so we do this on processor 0:
@@ -1288,13 +1299,6 @@ namespace Step18
           std::pair<double, std::string>(present_time, pvtu_master_filename));
         std::ofstream pvd_output("solution.pvd");
         DataOutBase::write_pvd_record(pvd_output, times_and_names);
-
-        std::ofstream visit_output("solution.visit");
-        static std::vector<std::pair<double, std::vector<std::string>>>
-          times_and_pieces;
-        times_and_pieces.emplace_back(
-          present_time, std::vector<std::string>(1, pvtu_master_filename));
-        DataOutBase::write_visit_record(visit_output, times_and_pieces);
       }
   }
 

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.