============== A tool for preparing the partitioned mesh for OpenGeoSys (OGS) 5 (https://github.com/ufz/ogs5) for parallel computing. METIS is used as the partitioning application. Once the source code is compiled, one gets two executable files, partmesh and mpmetis.
Assuming that a mesh save in file foo.msh is going to be partitioned, a partitioning can be conducted as follows for two different OGS 5 compilations for parallel FEM computing.
-
Convert the OGS mesh data to METIS input data
partmesh --ogs2metis foo -
Partition mesh data
[full path]/partmesh --metis2ogs -np 5 -s -e foowhere option
-smeans to call mpmetis via sysem call to partition the mesh, and option-emeans element wise partitioning. Alternatively, mpmetis can be run beforehand to save memory usage for large mesh, and then run parmesh without -s option. For example,[full path]/mpmetis foo.mesh 5[full path]/partmesh --metis2ogs -np 5 -e fooOption
-ogsmshcan be used here to output the partitioned mesh data into files for Gmsh for visualization.Note, in this step the command must be run with its full path.
-
Convert the OGS mesh data to METIS input data
For modelling with linear elements (processes excluding deformation), run command
partmesh --ogs2metis fooFor modelling with quadratic elements (processes including deformation, e.g. M, TM, HM, H2M), run command
partmesh --ogs2metis -q fooOption
-qindicates quadratic element. -
Partition mesh data
[full path]/partmesh --metis2ogs -np 5 -s -n foowhere option
-smeans to call mpmetis via sysem call to partition the mesh, , and option-nmeans node wise partitioning. Option '-q' has to be selected if it is already used in the first step in converting OGS mesh data to METIS input data.Alternatively, mpmetis can be run beforehand to save memory usage for large mesh, and then run parmesh without -s option. For example,
[full path]/mpmetis foo.mesh 5[full path]/partmesh --metis2ogs -np 5 -n fooOption
-odomcan be used here to output the partitioned mesh data into VTK files for visualization.Note, in this step the command must be run with its full path.
Always, the full options of the tool can be displayed by run command
``partmesh --help``