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

if no mesh file name is specified, use the problem name to construct one
parent 2b9036d5
No related branches found
No related tags found
No related merge requests found
......@@ -265,15 +265,17 @@ elif cmdline.has_key('--options'):
Gmsh.send('--noaverage', Gmsh.OPTION)
Gmsh.send('--average', Gmsh.OPTION)
else:
if not cmdline.has_key('--mesh'):
Gmsh.send("No mesh specified.", Gmsh.ERROR)
sys.exit(1)
if not cmdline.has_key('--results'):
Gmsh.send("No results specified.", Gmsh.ERROR)
sys.exit(1)
if not cmdline.has_key('--mesh'):
mshname = cmdline['--results'].split('.')[0] + '.msh'
else:
mshname = cmdline['--mesh']
try:
mshfile = open(cmdline['--mesh'])
mshfile = open(mshname)
csvfile = open(cmdline['--results'])
except:
Gmsh.send(str(sys.exc_info()[1]), Gmsh.ERROR)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment