mesh-partition v3.2.3¶
Mercurial revision 5786:5c8b45563631 | 2026-08-04
Description¶
mesh-partition is a tool that uses the METIS 4.0 program to partition a mesh. It is designed to work with METIS 4.0, so compatibility errors may occur with newer versions of METIS.
Usage¶
mesh-partition [OPTIONS] -m input
Options¶
Option |
Description |
|---|---|
|
Display this help message and exit. |
|
Required. Input mesh file or element list. |
|
Path to the METIS programs directory. Default: |
|
Use this flag if you have installed METIS 5.x instead of METIS 4.x. |
|
Number of desired partitions. Default: |
Deprecated Options¶
Warning: These options are no longer supported and may be removed in future versions.
Option |
Description |
|---|---|
|
Output file (deprecated). |
|
Pre-set zone to limit the working area (deprecated). |
Examples¶
Basic Usage¶
Partition a mesh file into 4 parts using the default METIS 4.0 path:
mesh-partition -m input_mesh.nc
Custom METIS Path¶
Specify a custom path for METIS programs:
mesh-partition --metis-path /custom/path/to/metis/ -m input_mesh.nc
Partition into 8 Parts¶
Partition the mesh into 8 parts:
mesh-partition -m input_mesh.nc -p 8
Using METIS 5.x¶
Use METIS 5.x instead of METIS 4.0:
mesh-partition --metis5 -m input_mesh.nc
Custom METIS Path with METIS 5.x¶
Combine a custom METIS path with METIS 5.x:
mesh-partition --metis-path /custom/path/to/metis5/ --metis5 -m input_mesh.nc -p 6
Environment Variables¶
mesh-partition relies on the METIS library. Ensure that:
The METIS programs (
partnmeshfor METIS 4.x ormpmetisfor METIS 5.x) are accessible via the specified--metis-path.The environment is configured to run METIS executables (e.g.,
PATHincludes the METIS directory if not using--metis-path).
Notes¶
Compatibility:
This tool is tested with METIS 4.0. Using METIS 5.x requires the
--metis5flag.If you encounter errors, verify that the METIS version matches the flag used (
--metis5for 5.x, no flag for 4.0).
Input File:
The input mesh file (
-m) must be in a supported format (e.g., NetCDF or element list).If the file cannot be read, the tool will exit with an error.
Output:
The partitioned mesh is saved as
mesh.metis.epart.<n>, where<n>is the number of partitions.The tool also generates intermediate files like
mesh.metisfor METIS processing.
Performance:
Partitioning large meshes may require significant memory and CPU resources.
Adjust
-pbased on the size of your mesh and available computational resources.
See Also¶
METIS Documentation (for METIS 4.0 and 5.x)
METIS 5.x Release Notes (for compatibility details)