Skip to content
Snippets Groups Projects
Commit 2adcedcf authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

cleanup

parent 23f6f61b
No related branches found
No related tags found
No related merge requests found
...@@ -9,8 +9,8 @@ API; "Attractor" field is now just a synonym for the newer (and more efficient) ...@@ -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 * Incompatible API changes: additional const qualifiers in C API; removed
mesh/computeCohomology; new arguments to occ/getCurveLoops and mesh/computeCohomology; new arguments to occ/getCurveLoops and
occ/getSurfaceLoops, changed arguments of mesh/computeHomology; new optional occ/getSurfaceLoops, changed arguments of mesh/computeHomology; new optional
arguments to model/addPhysicalGroup, model/geo/addPhysicalGroup and arguments to model/addPhysicalGroup, model/geo/addPhysicalGroup,
mesh/removeDuplicateNodes, mesh/setRecombine. mesh/removeDuplicateNodes and mesh/setRecombine.
4.9.5 (February 21, 2022): dynamic Gmsh library now also only exports public 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 symbols on macOS and Linux, like it does on Windows; better handling of
......
...@@ -151,9 +151,10 @@ int main(int argc, char **argv) ...@@ -151,9 +151,10 @@ int main(int argc, char **argv)
if(num == 3) { if(num == 3) {
// Uncomment the following lines to save each frame to an image file // 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("t8-" + std::to_string(num2) + ".gif");
// gmsh::write("t2-" + std::to_string(num2) + ".jpg"); // gmsh::write("t8-" + std::to_string(num2) + ".ppm");
// gmsh::write("t8-" + std::to_string(num2) + ".jpg");
} }
} }
......
...@@ -177,20 +177,21 @@ for num in range(1, 4): ...@@ -177,20 +177,21 @@ for num in range(1, 4):
# Draw the scene # Draw the scene
gmsh.graphics.draw() gmsh.graphics.draw()
if num == 3:
# Uncomment the following lines to save each frame to an image file # 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: # gmsh.write("t8-{}.gif".format(num2))
# gmsh.write("t8-{}.ppm".format(num2))
# gmsh.write("t8-{}.jpg".format(num2))
pass pass
# Here we could make a system call to generate a movie. For example:
if num == 3:
# Here we could make a system call to generate a movie. For example,
# with ffmeg:
# import subprocess # import subprocess
# call_ffmpeg1 = "ffmpeg -hq -r 5 -b 800 -vcodec mpeg1video -i t8-%02d.jpg t8.mpg" # subprocess.call("ffmpeg -i t8-%d.jpg t8.mpg".split(' '))
# call_ffmpeg2 = "ffmpeg -hq -r 5 -b 800 -i t8-%02d.jpg t8.asf" pass
# subprocess.call(call_ffmpeg1.split(' '))
# subprocess.call(call_ffmpeg2.split(' '))
if '-nopopup' not in sys.argv: if '-nopopup' not in sys.argv:
gmsh.fltk.run() gmsh.fltk.run()
......
...@@ -113,59 +113,18 @@ For num In {1:3} ...@@ -113,59 +113,18 @@ For num In {1:3}
// `Print' command saves the graphical window; the `Sprintf' function // `Print' command saves the graphical window; the `Sprintf' function
// permits to create the file names on the fly): // permits to create the file names on the fly):
// Print Sprintf("t8-%02g.gif", num2); // Print Sprintf("t8-%g.gif", num2);
// Print Sprintf("t8-%02g.ppm", num2); // Print Sprintf("t8-%g.ppm", num2);
// Print Sprintf("t8-%02g.jpg", num2); // Print Sprintf("t8-%g.jpg", num2);
EndIf EndIf
EndFor EndFor
If(num == 3) If(num == 3)
// 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
// ffmpeg:
// with whirlgif:
/* // System "ffmpeg -i t8-%d.jpg t8.mpg"
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"
*/
EndIf EndIf
EndFor EndFor
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment