Verify a precomputed mesh intersection against its source and target meshes. After a parallel run of mbtempest (or any other intersection generator) produces an intersection mesh, this tool checks that the per-element areas balance correctly between source / target / intersection.
For each source element, sum the areas of all intersection polygons that claim it as their source parent — that sum should equal the source element's own area, to within a configurable tolerance. Same check on the target side. Mismatches are written as element-level tags to per-side verification files.
Binary name on disk is
mbintx_check.
| Flag | Default | Description |
|---|---|---|
-s <file>, --source <file> | — | Source mesh (parent on one side of the intersection). |
-t <file>, --target <file> | — | Target mesh (parent on the other side). |
-i <file>, --intersection <file> | — | Precomputed intersection mesh. Each element carries srcParent / tgtParent tags pointing back into the source/target. |
-v <file>, --verif_source <file> | — | Output: source mesh with per-cell area_error tag written. |
-w <file>, --verif_target <file> | — | Output: target mesh with per-cell area_error tag written. |
-m <eps>, --threshold_source <eps> | small | Pass/fail threshold for the per-cell source-area error. |
-q <eps>, --threshold_target <eps> | small | Pass/fail threshold for the per-cell target-area error. |
-p {0\|1}, --sphere <flag> | 1 | Mesh sits on a sphere (1) or in a plane (0); affects how areas are computed. |
-n {0\|1}, --old_convention <flag> | 0 | Use the legacy parent tag names (pre-current convention). Set this if the intersection file was produced by an older mbtempest. |
i:s = srcParent[i] and target parent t = tgtParent[i].area(i) into the running totals src_sum[s] and tgt_sum[t].If the intersection is correct, both errors are zero to floating-point precision. Non-zero errors indicate missing or duplicated intersection polygons.
After a parallel mbtempest run that produced intx.h5m:
Open source_verif.h5m and target_verif.h5m in ParaView/VisIt and color by the area_error tag to spot regions where the intersection is incomplete.
The -p flag selects the geometric model:
-p 1 (default): areas are computed as spherical-polygon areas on the unit sphere. Use for climate / atmosphere / ocean grids.-p 0: areas are computed as planar-polygon areas. Use for 2-D regional or Cartesian meshes.mbIntxCheck verifies