Skip to content
Snippets Groups Projects
Commit e6bdff9e authored by Boman Romain's avatar Boman Romain
Browse files

change option filename

parent 4e473005
No related branches found
No related tags found
No related merge requests found
Pipeline #7111 passed
......@@ -305,7 +305,10 @@ void Post::write()
{
gmsh::option::setNumber("Mesh.Binary", 1); // writes files in binary format
gmsh::write("mesh.opt"); // save the options
gmsh::write("post.opt"); // save the options
// some data is missing in mesh.opt (mesh deformation)
// View[i].UseGeneralizedRaise = 1;
// View[i].GeneralizedRaiseView = 3;
gmsh::write("mesh.msh"); // only save the mesh
// save the views (without the mesh)
......
......@@ -111,7 +111,7 @@ def view_results():
gmsh.option.setNumber("General.Verbosity", 3)
# load views from the option file
views = []
with open('mesh.opt') as f:
with open('post.opt') as f:
import re
viewregex = re.compile('View\[(.+)\].FileName = "(.+)";')
for l in f.readlines():
......@@ -123,7 +123,7 @@ def view_results():
print(f'loading "{v[1]}"')
gmsh.merge(v[1])
print('loading options...')
gmsh.merge('mesh.opt')
gmsh.merge('post.opt')
print('starting Gmsh GUI, please wait...')
gmsh.fltk.run()
......@@ -267,12 +267,12 @@ if __name__ == "__main__":
create_workspace(workspace, testname)
tee = cxxfem.Tee('stdout.txt') # split streams (stdout + logfile)
try:
if action == 'run':
tee = cxxfem.Tee('stdout.txt') # split streams (stdout + logfile)
run_simulation(testname)
elif action == 'post':
tee = cxxfem.Tee('post.txt')
view_results()
except Exception as err:
print(f'\n** ERROR: {err}\n')
......
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