Issue with generating mp4 animations with mirror() function

80 views
Skip to first unread message

Vrionis Yiannis

unread,
Oct 18, 2022, 4:35:27 AM10/18/22
to basilisk-fr

Hello everyone,
I am having an issue with the mirror function (Basilisk - src/draw.h). I am fairly new with the use of the view.h header functionality so maybe I am missing something really basic.
I am trying to create a movie animation of a 2D simulation (Quadtree grid) based on a scalar field I have defined though an event, i.e.

scalar h[];
 ... 
event movie(t+=0.01) { 
 view(width=800, height=800); 
 clear(); 
 squares("h", min=0, max=0.5, linear=1); 
 isoline("h", 0.1, lc={0,1,0}, lw=2.0); 

 mirror( {0,1} ) { 
     cells(lw=0.5); 
     squares("level", map=cool_warm, min=LEVEL_IN-1, max=LEVEL_MAX);
 } 
 char timestring[15]; 
 sprintf(timestring, "t=%06.02f", t); 
 draw_string(timestring, lc={0,0,0}, lw = 2); 
 save("animation.mp4"); 
} 
...

So, the issue is that the mirror function does nothing when I perform the simulation in serial (using OpenMP). On the other hand, when using MPI, I get fragmented parts of the animation that seems to be influenced by the mesh decomposition. I have attached some screenshots to illustrate the problem. Also, the mirroring process does not respect the defined symmetry plane. The source code is compiled for OpenMP simulations using
qcc -O2 -Wall -fopenmp code.c -o run.exe -L${BASILISK}/gl -lglutils -lfb_osmesa -lOSMesa -lGLU -lm
or MPI using
CC99='mpicc -std=c99' qcc -O2 -D_MPI=1 -Wall code.c -o run.exe -L${BASILISK}/gl -lglutils -lfb_osmesa -lOSMesa -lGLU -lm

Has anybody faced anything similar? If so, what was the solution?


Thank you in advance,
Yiannis

4_procs.png
6_procs.png
openmP.png
Reply all
Reply to author
Forward
0 new messages