Choosing save path for vtk files

Good morning everyone. I have been practising with FreeFem++ (Windows 11) for a couple of months and now i’m catching up with expert tutorial 2022 made by Professor Pierre Joliviet in order to learn parallel computing. I have some issues with “savevtk” function. When I launch the script with mpiexec, the vtu files are saved in the same directory of mpiexec. Is it possible to choose an arbitrary save path for the savevtk function? Because i’d like to save this output in a folder on the desktop, for example.
Sorry for such a naive question and thanks to everyone for the help.
Best regards

Yes, you can use savevtk("some_path/name_of_file.vtu", ...).

It seems not to work because it recognises the entire path as the filename. I wrote the line this way:
savevtk(“C:\Users\Utente\Desktop\tirocinio e tesi portatile\free fem\esercizi freefem\decomposition\pierre7\rank.vtu”,Th, outputForParaview);
I basically copied and pasted the path before the filename that is rank.vtu.
Or even just
savevtk(“C:\Users\Utente\Desktop\rank.vtu”,Th, outputForParaview);
does not work as well.
Where am I wrong?
Thank you

Ok it’s just about using “/” and not backslash when writing the path.
So I write
savevtk(“C:/Users/Utente/Desktop/rank.vtu”,Th, outputForParaview);
and it works
Thanks for the help

Yes, handling paths in Windows can be tricky…

1 Like