Create view for .geo file script
Hi all,
I have a script .geo to mesh half of my domain and it is called in a script .py which then mesh the rest of the domain.
I would like to create a postprocessing view showing a colormap of the cell volume for the mesh of the entire domain.
I manage to create the view for the mesh associated with the .py script but not for the mesh associated with the .geo script. Here is the outline of my .py script:
gmsh.initialize()
gmsh.model.add("DWFS")
gmsh.merge('test.geo')
gmsh.model.occ.synchronize()
# blablabla
# Meshing of the rest of the domain (imported with test.geo)
# blablabla
# Creating the view
_, eleTags , _ = gmsh.model.mesh.getElements(dim=3)
q = gmsh.model.mesh.getElementQualities(eleTags[0], "volume")
t = gmsh.view.add("Element sizes")
gmsh.view.addHomogeneousModelData(t, 0, "DWFS", "ElementData", eleTags[0], q)
It only show my the colormap for the mesh associated with the .py script. My questions are the following:
- How can I set a model name in the .geo script? If yes, can I use it in the call of the .py script postview?
- If not, what are the solution to display the cell volume of the entire mesh without traducing the .geo script into .py?
Thanks a lot!
Edited by Martin David