]> https://gitweb.dealii.org/ - dealii.git/commitdiff
step-40: fix pvtu filename 855/head
authorTimo Heister <timo.heister@gmail.com>
Mon, 20 Apr 2015 19:28:04 +0000 (15:28 -0400)
committerTimo Heister <timo.heister@gmail.com>
Mon, 20 Apr 2015 19:31:21 +0000 (15:31 -0400)
Paraview gets confused by the additional .0000 numbering and refuses
to load all .pvtu files together. Fix this by the more sensible naming
of solution-XX.pvtu

examples/step-40/step-40.cc

index 15ed3db10bbc032badc3d7e7daa634144696d44f..7f17aea51b01430652801d72e49a32e7be2f3ccf 100644 (file)
@@ -573,7 +573,7 @@ namespace Step40
     data_out.build_patches ();
 
     // The next step is to write this data to disk. We choose file names of
-    // the form <code>solution-XX-PPPP.vtu</code> where <code>XX</code>
+    // the form <code>solution-XX.PPPP.vtu</code> where <code>XX</code>
     // indicates the refinement cycle, <code>PPPP</code> refers to the
     // processor number (enough for up to 10,000 processors, though we hope
     // that nobody ever tries to generate this much data -- you would likely
@@ -606,7 +606,9 @@ namespace Step40
                                Utilities::int_to_string (i, 4) +
                                ".vtu");
 
-        std::ofstream master_output ((filename + ".pvtu").c_str());
+        std::ofstream master_output (("solution-" +
+                                      Utilities::int_to_string (cycle, 2) +
+                                      ".pvtu").c_str());
         data_out.write_pvtu_record (master_output, filenames);
       }
   }

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.