From 2adcedcf26497634449803fbbb4f7f52b8933677 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@uliege.be>
Date: Mon, 21 Mar 2022 20:35:08 +0100
Subject: [PATCH] cleanup

---
 CHANGELOG.txt          |  4 +--
 tutorials/c++/t8.cpp   |  7 +++---
 tutorials/python/t8.py | 23 +++++++++---------
 tutorials/t8.geo       | 55 ++++++------------------------------------
 4 files changed, 25 insertions(+), 64 deletions(-)

diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index a90d4d8f36..7ba740214d 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -9,8 +9,8 @@ API; "Attractor" field is now just a synonym for the newer (and more efficient)
 * Incompatible API changes: additional const qualifiers in C API; removed
   mesh/computeCohomology; new arguments to occ/getCurveLoops and
   occ/getSurfaceLoops, changed arguments of mesh/computeHomology; new optional
-  arguments to model/addPhysicalGroup, model/geo/addPhysicalGroup and
-  mesh/removeDuplicateNodes, mesh/setRecombine.
+  arguments to model/addPhysicalGroup, model/geo/addPhysicalGroup,
+  mesh/removeDuplicateNodes and mesh/setRecombine.
 
 4.9.5 (February 21, 2022): dynamic Gmsh library now also only exports public
 symbols on macOS and Linux, like it does on Windows; better handling of
diff --git a/tutorials/c++/t8.cpp b/tutorials/c++/t8.cpp
index c4357d57a5..a446a6e757 100644
--- a/tutorials/c++/t8.cpp
+++ b/tutorials/c++/t8.cpp
@@ -151,9 +151,10 @@ int main(int argc, char **argv)
 
       if(num == 3) {
         // Uncomment the following lines to save each frame to an image file
-        // gmsh::write("t2-" + std::to_string(num2) + ".gif");
-        // gmsh::write("t2-" + std::to_string(num2) + ".ppm");
-        // gmsh::write("t2-" + std::to_string(num2) + ".jpg");
+
+        // gmsh::write("t8-" + std::to_string(num2) + ".gif");
+        // gmsh::write("t8-" + std::to_string(num2) + ".ppm");
+        // gmsh::write("t8-" + std::to_string(num2) + ".jpg");
       }
     }
 
diff --git a/tutorials/python/t8.py b/tutorials/python/t8.py
index ec0222eb9c..3232a5f1a3 100644
--- a/tutorials/python/t8.py
+++ b/tutorials/python/t8.py
@@ -177,20 +177,21 @@ for num in range(1, 4):
         # Draw the scene
         gmsh.graphics.draw()
 
-        # Uncomment the following lines to save each frame to an image file
-        # if num == 3:
-        #     gmsh.write("t2-{:.2g}.gif".format(num2))
-        #     gmsh.write("t2-{:.2g}.ppm".format(num2))
-        #     gmsh.write("t2-{:.2g}.jpg".format(num2))
+        if num == 3:
+            # Uncomment the following lines to save each frame to an image file
+
+            # gmsh.write("t8-{}.gif".format(num2))
+            # gmsh.write("t8-{}.ppm".format(num2))
+            # gmsh.write("t8-{}.jpg".format(num2))
+            pass
 
     if num == 3:
-        pass
-        # Here we could make a system call to generate a movie. For example:
+        # Here we could make a system call to generate a movie. For example,
+        # with ffmeg:
+
         # import subprocess
-        # call_ffmpeg1 = "ffmpeg -hq -r 5 -b 800 -vcodec mpeg1video -i t8-%02d.jpg t8.mpg"
-        # call_ffmpeg2 = "ffmpeg -hq -r 5 -b 800 -i t8-%02d.jpg t8.asf"
-        # subprocess.call(call_ffmpeg1.split(' '))
-        # subprocess.call(call_ffmpeg2.split(' '))
+        # subprocess.call("ffmpeg -i t8-%d.jpg t8.mpg".split(' '))
+        pass
 
 if '-nopopup' not in sys.argv:
     gmsh.fltk.run()
diff --git a/tutorials/t8.geo b/tutorials/t8.geo
index dba8a7ce48..2888f1dc4b 100644
--- a/tutorials/t8.geo
+++ b/tutorials/t8.geo
@@ -113,59 +113,18 @@ For num In {1:3}
       // `Print' command saves the graphical window; the `Sprintf' function
       // permits to create the file names on the fly):
 
-      // Print Sprintf("t8-%02g.gif", num2);
-      // Print Sprintf("t8-%02g.ppm", num2);
-      // Print Sprintf("t8-%02g.jpg", num2);
+      // Print Sprintf("t8-%g.gif", num2);
+      // Print Sprintf("t8-%g.ppm", num2);
+      // Print Sprintf("t8-%g.jpg", num2);
     EndIf
 
   EndFor
 
   If(num == 3)
-    // Here we could make a system call to generate a movie. For example,
-
-    // with whirlgif:
-    /*
-    System "whirlgif -minimize -loop -o t8.gif t8-*.gif";
-    */
-
-    // with mpeg_encode (create parameter file first, then run encoder):
-    /*
-    Printf("PATTERN I") > "t8.par";
-    Printf("BASE_FILE_FORMAT PPM") >> "t8.par";
-    Printf("GOP_SIZE 1") >> "t8.par";
-    Printf("SLICES_PER_FRAME 1") >> "t8.par";
-    Printf("PIXEL HALF") >> "t8.par";
-    Printf("RANGE 10") >> "t8.par";
-    Printf("PSEARCH_ALG EXHAUSTIVE") >> "t8.par";
-    Printf("BSEARCH_ALG CROSS2") >> "t8.par";
-    Printf("IQSCALE 1") >> "t8.par";
-    Printf("PQSCALE 1") >> "t8.par";
-    Printf("BQSCALE 25") >> "t8.par";
-    Printf("REFERENCE_FRAME DECODED") >> "t8.par";
-    Printf("OUTPUT t8.mpg") >> "t8.par";
-    Printf("INPUT_CONVERT *") >> "t8.par";
-    Printf("INPUT_DIR .") >> "t8.par";
-    Printf("INPUT") >> "t8.par";
-    tmp = Sprintf("t8-*.ppm [01-%02g]", frames);
-    Printf(tmp) >> "t8.par";
-    Printf("END_INPUT") >> "t8.par";
-    System "mpeg_encode t8.par";
-    */
-
-    // with mencoder:
-    /*
-    System "mencoder 'mf://*.jpg' -mf fps=5 -o t8.mpg -ovc lavc
-            -lavcopts vcodec=mpeg1video:vhq";
-    System "mencoder 'mf://*.jpg' -mf fps=5 -o t8.mpg -ovc lavc
-           -lavcopts vcodec=mpeg4:vhq";
-    */
-
-    // with ffmpeg:
-    /*
-    System "ffmpeg -hq -r 5 -b 800 -vcodec mpeg1video
-            -i t8-%02d.jpg t8.mpg"
-    System "ffmpeg -hq -r 5 -b 800 -i t8-%02d.jpg t8.asf"
-    */
+    // Here we could make a system call to generate a movie. For example, with
+    // ffmpeg:
+
+    // System "ffmpeg -i t8-%d.jpg t8.mpg"
   EndIf
 
 EndFor
-- 
GitLab