PyLith has specific requirements for how boundary conditions and materials are marked in Gmsh. If the mesh entities are marked using the Gmsh GUI the same way as they are marked in a Python script, then the Gmsh files will be equivalent. The PETSc Gmsh reader can handle both binary and ASCII Gmsh files.
So theoretically you can use the Gmsh GUI to create a mesh. The advantage of a Python script is that you can make use of the helper functions in
The create_group
and create_material
functions are the most important as they show how we mark the boundaries and materials for use in PyLith. We create physical groups at all lower dimensions for the boundaries; for a 2D mesh, we create 1D (curves) and 0D (verices) physical groups. The names of the material groups must be of the form material-id:{tag} where tag is the tag of the physical group.