Skip to main content

ADMESH meshing Delaware Bay through three stages: initialized point cloud, DistMesh truss-solver relaxation, then FEM smoothing; element color tracks quality from magenta (poor) to cyan (equilateral).

An ADvanced, automatic unstructured MESH generator for 2D shallow-water models
Automatic unstructured mesh generation for shallow-water models, in Python and MATLAB

Dominik Mattioli1†, Colton Conroy, Dustin West, Ethan Kubatko2
†Corresponding author | 1Unaffiliated | 2Ohio State University (CHIL)

Latest release, including pre-releases Python 3.10+ Tests Open issues DOI License

Background: Two branches of ADMESH descend from the 2012 original by Conroy et al.. The original group's MATLAB line is ADMESH+ v3 (OSU-CHIL/ADMESH; 10.5281/zenodo.10242565), maintained by Younghun Kang and Ethan Kubatko (Kang & Kubatko, 2024). This repository is the parallel branch: the 2012 library in Python, with the MATLAB source alongside at src/matlab/.

Table of Contents

  1. Status & Roadmap
  2. Overview
  3. Installation
  4. Quick start
  5. Meshes from the Valence registry
  6. Pipeline
  7. Performance
  8. Limitations
  9. Citation
  10. Documentation, Contributing, License

1. Status & Roadmap

Current release: 1.0.6 (2026-10-12); see CHANGELOG. The public API (admesh.__all__, listed in docs/api/index.md) is fixed for 1.x. The admesh.<stage> compatibility modules stay through 1.x and are removed no earlier than 2.0.

  • Roadmap: 1D–2D constraint extraction (#186); single-mesh parallelization (#216); 3D ADMESH (#220); integration with QuADMESH (quads) and CHILmesh (mesh data structure and smoothing).

2. Overview

triangulate() takes a domain (a Domain, TOML or JSON polygon file, fort.14, or registry filename) and two edge-length bounds, and returns a validated mesh. Without a size field, the size is uniform at h_max. Physics-based sizing and background="octree" are opt-in. The 13 numerical stages exist in both Python and MATLAB; a Numba solver replaces the original C MEX.

3. Installation

pip install admesh2D                 # core: NumPy, SciPy, Numba, Shapely
pip install "admesh2D[viz]"          # + chilmesh for mesh.plot()

The PyPI distribution is admesh2D; the import name is admesh. (pip install admesh installs an unrelated STL library.) Requires Python 3.10 or newer. From source: git clone https://github.com/domattioli/ADMESH.git && cd ADMESH && pip install -e ".[dev]".

4. Quick start

import admesh
from admesh import domains

# Built-in domain, uniform sizing at h_max.
mesh = admesh.triangulate(domains.NOTCHED_RECTANGLE, h_max=0.2, h_min=0.02)
mesh.to_fort14("notched.14")
# Re-mesh an existing ADCIRC grid at a new resolution.
old = admesh.read_fort14("legacy.14")
mesh = admesh.triangulate(admesh.Domain.from_mesh(old), h_min=50.0, h_max=2000.0)

mesh is a frozen Mesh dataclass with nodes, elements, boundaries, optional bathymetry, and per-element quality. Built-in domains: UNIT_SQUARE, UNIT_DISK, L_SHAPE, ANNULUS, NOTCHED_RECTANGLE. The full call list is in docs/api/index.md.

5. Meshes from the Valence registry

The HTTP registry client ships in admesh2D 1.0.5 and later. Meshes come through Valence, a token-gated mesh service.

Sign in with GitHub at https://valence-api.iqh766c2.workers.dev . A GitHub account at least 30 days old gets a token at once, shown once. Each token allows 500 downloads per token per day (reset at midnight UTC) and expires after one year.

export VALENCE_TOKEN=<your token>
import admesh
domain = admesh.load_domain_from_registry("rectangular_mesh_triangle1.14")
mesh = admesh.triangulate(domain)

Each download is checked against its SHA-256 hash. See the Registry API contract.

6. Pipeline

triangulate() composes the stage modules in admesh/_stages/, which match the MATLAB library one to one and are locked.

Domain, then background grid (uniform or octree), then size field (curvature, medial axis, bathymetry, tide; min-stacked), then distmesh2d truss relaxation (Numba), then a validated Mesh (fort.14 or .msh).

7. Performance

Numba kernels cut end-to-end generation on the Western North Atlantic benchmark from 1257.5 s (v0.2.1) to 47.2 s (v0.5.0), a 26.6x speedup. triangulate_batch runs 5.09x faster on 8 workers than a serial loop. Tables, method and reproduction commands: docs/BENCHMARK_DELIVERABLE.md.

8. Limitations

  • Triangles only, in 2-D. For quads use QuADMESH; for 3-D or anisotropy use Gmsh.
  • The 2012 algorithm as published. The vector-distance-transform medial axis of Kang & Kubatko (2024) is the opt-in medial_method="vdt"; the 1D–2D constraint extraction is not implemented.
  • Default sizing is uniform. The physics-based size contributions are not wired in by default (issue #65).
  • Generated meshes carry no bathymetry, and fort.14 IBTYPE 3/4/13/24 paired-node and weir columns are not preserved.
  • One process per mesh, CPU only. The distmesh relaxation dominates wall-clock time on large domains.
  • Browser app: admesh.domattioli.com runs ADMESH in the page through Pyodide, without Numba.

9. Citation

  • Algorithm: Conroy, C.J., Kubatko, E.J. & West, D.W. (2012). ADMESH: an advanced, automatic unstructured mesh generator for shallow water models. Ocean Dynamics 62, 1503–1517. https://doi.org/10.1007/s10236-012-0574-0
  • This software: Mattioli, D.O., Conroy, C.J., West, D.W., Kubatko, E.J. (2026). ADMESH: automatic unstructured triangular mesh generator for 2D shallow-water models (Python). Zenodo. https://doi.org/10.5281/zenodo.20264085
  • Upstream MATLAB line: Kang, Y. & Kubatko, E.J. (2024). An automatic mesh generator for coupled 1D–2D hydrodynamic models. Geoscientific Model Development 17, 1603–1625. https://doi.org/10.5194/gmd-17-1603-2024
  • A CITATION.cff feeds GitHub's "Cite this repository" button. Version-specific DOIs are on the Zenodo record.

10. Documentation, Contributing, License

Acknowledgement. Code added after the original MATLAB port was written using AI coding tools built on Anthropic and OpenAI models. The 13 ported stages are checked against the MATLAB reference tests.

License. Apache 2.0, see LICENSE.

Metadata

Release files for admesh2D 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for admesh2D 1.0.6
File Size Uploaded
admesh2d-1.0.6.tar.gz 133.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for admesh2D 1.0.6
File
admesh2d-1.0.6-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
admesh2d-1.0.6-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
admesh2d-1.0.6-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
admesh2d-1.0.6-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
admesh2d-1.0.6-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details
admesh2d-1.0.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
admesh2d-1.0.6-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
admesh2d-1.0.6-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details
admesh2d-1.0.6-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
admesh2d-1.0.6-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
admesh2d-1.0.6-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details
admesh2d-1.0.6-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
admesh2d-1.0.6-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
admesh2d-1.0.6-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details

Total release size: 3.4 MB

Release files / admesh2d-1.0.6.tar.gz

Download URL admesh2d-1.0.6.tar.gz
Size 133.5 kB
Tags Source
SHA-256 checksum
How to use checksums
74dd559dfcf558e0ac5ac6a6835ac714a01c9c093795c9e6822fc56ff3137d7e
BLAKE2b-256 checksum
How to use checksums
79953e22448b77d88cf6fc621e21bf4e808023c3a02a732e1f94690da1fe7701
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / admesh2d-1.0.6-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL admesh2d-1.0.6-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 243.6 kB
Tags CPython 3.14 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f036256ea09ca86a27a6848c5f49e4de5f68226ace03942003cc0a0fbefb2e58
BLAKE2b-256 checksum
How to use checksums
b072ae2557acd46e0e95f6171b2d8e210c81f34d071896a9346aa5394b11606e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / admesh2d-1.0.6-cp314-cp314-macosx_11_0_arm64.whl

Download URL admesh2d-1.0.6-cp314-cp314-macosx_11_0_arm64.whl
Size 228.4 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b2882fa88bc4b5fbecb05fe38abadf2de5ac769727d174eec0d20eef7334803c
BLAKE2b-256 checksum
How to use checksums
320b6d2d9b669c1fcddd1db1a4aedc7f9c89ab9979b2bf07be963b247f9cb10f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / admesh2d-1.0.6-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL admesh2d-1.0.6-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 243.5 kB
Tags CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0df6dcf919e650e593052558e4249e0fbb61a44986228e9f4c365fd8c39bd6f3
BLAKE2b-256 checksum
How to use checksums
65ddf5eff1d9d2c896aafbe9b5bcd49bf59afef3782bd3ec383d2188214fdabe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / admesh2d-1.0.6-cp313-cp313-macosx_11_0_arm64.whl

Download URL admesh2d-1.0.6-cp313-cp313-macosx_11_0_arm64.whl
Size 228.3 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
44c45fc2caab48c63d4fddfc609b8c91aa01e944fc12a2fbb3ed0902d26d2623
BLAKE2b-256 checksum
How to use checksums
ffdbb2fdb3fa9ca041a267cd8902ccd33d113bdef38a507bda48acc78a42906e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / admesh2d-1.0.6-cp313-cp313-macosx_10_13_x86_64.whl

Download URL admesh2d-1.0.6-cp313-cp313-macosx_10_13_x86_64.whl
Size 232.9 kB
Tags CPython 3.13 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
a83654c88c04a0de2d10251a56c95604adc525086cc961cca4488481db085663
BLAKE2b-256 checksum
How to use checksums
ff99ebbae7c35684b87336082c8991ec5e3f27b3598e06f7e4928d7737ae6987
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / admesh2d-1.0.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL admesh2d-1.0.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 243.5 kB
Tags CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4da098e4f70a229b13b7d3d0405f46f603425be17ba758450402a6336bb209be
BLAKE2b-256 checksum
How to use checksums
c7137ce9058dea3eba5c4094e9f955a212d13ec7eaa95200154de2d4b1eb6fa7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / admesh2d-1.0.6-cp312-cp312-macosx_11_0_arm64.whl

Download URL admesh2d-1.0.6-cp312-cp312-macosx_11_0_arm64.whl
Size 228.3 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9d8f388755c49b53b74e5e24330ae76857c2d06225b4eebcff7559bbac43359a
BLAKE2b-256 checksum
How to use checksums
7431b782ea4f38834ed2f9f1d82746f847ef7d51a66a90d02bbcb895fba7d4bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / admesh2d-1.0.6-cp312-cp312-macosx_10_13_x86_64.whl

Download URL admesh2d-1.0.6-cp312-cp312-macosx_10_13_x86_64.whl
Size 232.8 kB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
5277ea724158722f8dee8485e040bb3a22320e757ddeb83ec47d19089bac014b
BLAKE2b-256 checksum
How to use checksums
971307f17fc9165929d2cc546ac1e3f29606fdb778100c7ee2126bf7e6ac9da0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / admesh2d-1.0.6-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL admesh2d-1.0.6-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 240.9 kB
Tags CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c952c201d38eb3fbffb11a24aa02cc77b4152032da6c53317ed4ac4d7558b8fc
BLAKE2b-256 checksum
How to use checksums
8ca922f26e45eb4f5b3b72487db703919e23614dc24e2daa66790384e38f47c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / admesh2d-1.0.6-cp311-cp311-macosx_11_0_arm64.whl

Download URL admesh2d-1.0.6-cp311-cp311-macosx_11_0_arm64.whl
Size 226.7 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e2ed62db5c0ce4e8e867eadf1f70371238fa4dc2ad206c646e9692b43ef27c7c
BLAKE2b-256 checksum
How to use checksums
bc8447f2d410145ea037d6b93fa63fe8e9c55e244f663cc00e0f4f864d2dc222
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / admesh2d-1.0.6-cp311-cp311-macosx_10_9_x86_64.whl

Download URL admesh2d-1.0.6-cp311-cp311-macosx_10_9_x86_64.whl
Size 231.0 kB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
5f00d1789f2f7291193f99c90544041dc4a2145f7de7586d544e16009920099c
BLAKE2b-256 checksum
How to use checksums
f7514cbcf5114d6ef1dd127595c76ed29d2d9b6da60d8a92fdb54d18b25b7755
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / admesh2d-1.0.6-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL admesh2d-1.0.6-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 240.2 kB
Tags CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d16dc83f3bcd6add5297a5060ef6444732daaac233419c9e94511b2d622ccde2
BLAKE2b-256 checksum
How to use checksums
643b2bcd6668abc79e0b277b38db5286bcdcc7e0d563cae3345bd631fe2e937d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / admesh2d-1.0.6-cp310-cp310-macosx_11_0_arm64.whl

Download URL admesh2d-1.0.6-cp310-cp310-macosx_11_0_arm64.whl
Size 225.4 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ecccefa3548b982f3e82e73573c842889a4bd1f1f436d1e8a78e04885d0f4df6
BLAKE2b-256 checksum
How to use checksums
21db931fe1d1006fcc647a6eef2ae60cdd6e6eb9ede5d6cb091f74a0cebf7e8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / admesh2d-1.0.6-cp310-cp310-macosx_10_9_x86_64.whl

Download URL admesh2d-1.0.6-cp310-cp310-macosx_10_9_x86_64.whl
Size 229.6 kB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
752871ff202c404c6fd490a88d1c25e76f7cf38c318fd7b94cea6d13cc264070
BLAKE2b-256 checksum
How to use checksums
314fb174e634af80998a02775651ec63480c1380e2d48ae255784e0b6707d38f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release history Release notifications | RSS feed

This release

1.0.6 This release

15 release files

1.0.5

13 release files

0.5.1

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page