<div dir="ltr">Hello, I would like to mesh a model, refine that mesh and save it from the command line, in one shot, that is without having to call gmsh twice (it seems that doing `gmsh file.geo -2 -refine -o output.msh` does not work...).<div><div><br></div><div>I have found most of the options for this (eg using "Mesh 2;" followed by "RefineMesh;" in the geo file).</div><div><br></div><div>I have now two questions:</div><div>1. How do I save the mesh using the same filename as the geo file? Is there a way to retrieve the filename from within the geo file? I have seen the "General.FileName" option, but typing "Save General.FileName;" at the end of the geo file does not work.</div><div><br></div><div>2. I would like to run this from the command line, without the GUI appearing. Since the mesh command is already in the geo file, I cannot just call `gmsh -2` since that will perform the meshing twice...</div></div><div><br></div><div>Thanks,</div><div>Jeremy</div></div>