# mesh-diagnostics v3.2.3 **Mercurial revision 5786:5c8b45563631 | 2026-08-04** --- ## Description `mesh-diagnostics` is a tool designed to **print the characteristics of an input mesh** and perform additional diagnostic operations such as disassembly, center-line generation, and mesh quality checks. --- ## Usage ```bash mesh-diagnostics [OPTIONS] -m input ``` --- ## Options ### **General Options** | Option | Description | | -------------- | ------------------------------------ | | `--help`, `-h` | Display help and exit. | | `-m ` | **Required.** Mesh file to diagnose. | --- ### **Diagnostic Options** | Option | Description | | --------------- | ------------------------------------------------------------------------------------------- | | `--debug` | Activate verbose debug mode for `--disassembly`. | | `--disassembly` | Split the mesh into a **polygon file** (boundary) and a **node file**. | | `--center-line` | Generate 3 additional meshes from nodes using different cleaning methods. | | `-r ` | Root name for output files when using `--disassembly` or `--center-line`. Default is empty. | --- ### **Deprecated Options** > **Note:** These options are **no longer recommended** and may be removed in future versions. | Option | Description | | ------------------ | ----------------------------------------------------- | | `--no_renum` | Disable mesh renumbering. | | `--no_reshape` | Disable mesh reshaping. | | `--delaunay` | Use Delaunay triangulation. | | `--nghmax ` | Set maximum number of neighbors. | | `-c` | Check channels. | | `-d ` | Maximum resolution for refinement. | | `-g` | Check geometry. | | `-p ` | Limit actions to the interior of a specified polygon. | | `-o ` | Output path for results. | | `-s` | Set safety mode. | | `-z ` | Limit actions to a specified rectangular zone. | --- ## Examples ### **Basic Mesh Diagnosis** Print the characteristics of a mesh file: ```bash mesh-diagnostics -m input_mesh.nc ``` ### **Disassemble a Mesh** Split a mesh into boundary and node files: ```bash mesh-diagnostics -m input_mesh.nc --disassembly -r output_root ``` ### **Generate Center-Line Meshes** Generate 3 cleaned meshes from nodes: ```bash mesh-diagnostics -m input_mesh.nc --center-line -r output_root ``` ### **Debug Disassembly** Enable verbose debug mode for disassembly: ```bash mesh-diagnostics -m input_mesh.nc --disassembly --debug -r output_root ``` ### **Check Mesh Geometry** > **Note:** Uses deprecated option `-g` for backward compatibility. ```bash mesh-diagnostics -m input_mesh.nc -g ``` --- ## Environment Variables `mesh-diagnostics` does not use any specific environment variables. However, it may inherit standard system environment variables for file paths, permissions, and parallel processing (if applicable). --- ## Notes 1. **Input Mesh:** - The input mesh file (`-m`) **must** be provided. - Supported formats: **TRIGRID** (default). 2. **Output Files:** - If `-r` is not specified, output files will use default names. - For `--disassembly`, two files are generated: one for the boundary (polygon) and one for the nodes. - For `--center-line`, three additional meshes are generated. 3. **Aspect Ratio:** - The tool automatically computes and displays the **aspect ratio** of each triangle in the mesh. - Triangles with an aspect ratio **> 0.25** are flagged. - The worst aspect ratio and its location are reported. 4. **Deprecated Options:** - Deprecated options are **not recommended** for new workflows. - They are included for backward compatibility but may be removed in future versions. --- ## See Also - [TRIGRID Mesh Format](https://www.example.com) (Replace with actual documentation link if available) - [Delaunay Triangulation](https://en.wikipedia.org/wiki/Delaunay_triangulation) - [Mesh Quality Metrics](https://www.example.com) (Replace with actual documentation link if available)