Meshing with PUMGen¶

PUMGen¶

PUMGen (https://github.com/SeisSol/PUMGen/wiki) is a tool for creating and exporting meshes in an efficient format (see PUML Mesh format). We recommend using PUMGen, in particular when large meshes have to be generated. PUMGen uses SimModeler libraries for meshing. Here is a basic example of use:
pumgen -s simmodsuite -l SimModelerLib.lic --mesh "Mesh case 1" --analysis "Analysis case 1" test.smd test

The Analysis and meshing attributes of the model file test.smd have been first defined using the GUI of SimModeler, as detailed in Meshing with SimModeler. In particular, the –mesh and –analysis attributes are set according to the mesh attributes and analysis attributes defined in the mesh and analysis tabs (SimModeler GUI). This script will generate 2 files: test and test.xdmf describing the mesh (see PUML Mesh format).

The “Minimum insphere found” output of PUMgen allows checking the mesh quality. The minimum insphere of a quality mesh is about 1/10 or more of the minimum mesh size specified. Smaller values might impact your time step, and then your simulation time, but not so much if using local time stepping. Also note the –analyseAR option of PUMgen, allowing to produce a histogram of the mesh aspect ratios, similarly to SimModeler GUI.

PUMGen can be used to convert an ASCII *.neu mesh file (for instance from the GUI of SimModeler) to the xmdf mesh format:
pumgen test.neu test

PUMGen can be also used to convert a netcdf mesh file (older SeisSol mesh file format) to the xmdf mesh format:
pumgen -s netcdf test.nc test


Or to convert a gmsh mesh file (msh2) to the xmdf mesh format:

pumgen -s msh2 test.msh test

Multiprocessing can be used to speed up the process:
mpirun -n 4 pumgen -s netcdf test.nc test

Note that version < 10 of Simulation Modeling Suite do not support parallel volume meshing.

Parametrizing PUMGen with an xml file¶

The parametrization of meshing and analysis attributes using the GUI of SimModeler can be tedious, particularly for heavy models (>Gb smd file, with finely sampled topography or fault surface) or when running parametric studies with different meshes or analysis attributes. The –xml option of PUMGen offers a way to tag boundary conditions surfaces and to set mesh attributes using an xml file. In addition, this allows keeping track of the meshing parameters in an xml file. A typical xml file can be found here.
A typical use of the parametrization through xml file could be:
pumgen -s simmodsuite -l SimModelerLib.lic --xml meshAttributes.xml test.smd test


The GUI of SimModeler can be used to find the correspondence between region/surface and id.