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.0 (2026-10-02). Next: 1.0.5 (unreleased); 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 (unreleased). 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.5

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.5
File Size Uploaded
admesh2d-1.0.5.tar.gz 128.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for admesh2D 1.0.5
File
admesh2d-1.0.5-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.5-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
admesh2d-1.0.5-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details
admesh2d-1.0.5-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.5-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
admesh2d-1.0.5-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details
admesh2d-1.0.5-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.5-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
admesh2d-1.0.5-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details
admesh2d-1.0.5-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.5-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
admesh2d-1.0.5-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details

Total release size: 2.9 MB

Release files / admesh2d-1.0.5.tar.gz

Download URL admesh2d-1.0.5.tar.gz
Size 128.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a64b341b3683f65acd2d4df4006fdd09f64fa1438f8fd52a29c6995c8865d432
BLAKE2b-256 checksum
How to use checksums
e7d9224221bc8a5972e368f736227de0ea6ebdc14c53439f26cdec5a1f06dbbf
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.5-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL admesh2d-1.0.5-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 239.7 kB
Tags CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5c88b4ec6c72481e0e12a835a29d33aa421651fa967006e790cef2c4d50ce654
BLAKE2b-256 checksum
How to use checksums
9d06e245dc727a8f20fa9bf9e99dec7a58dff11d105c0d8e0c3a978b8d7b31a4
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.5-cp313-cp313-macosx_11_0_arm64.whl

Download URL admesh2d-1.0.5-cp313-cp313-macosx_11_0_arm64.whl
Size 225.6 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
84b56e2615c3a9fed2ab7d899fc7b11a738b8a300c88c452c46be5b297421046
BLAKE2b-256 checksum
How to use checksums
74a801716c5e097dc6dabb5f8afd15bc2ba1d597fca93731b71344e19c5c8bc7
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.5-cp313-cp313-macosx_10_13_x86_64.whl

Download URL admesh2d-1.0.5-cp313-cp313-macosx_10_13_x86_64.whl
Size 230.2 kB
Tags CPython 3.13 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
554d69c04f8f2a26c4bf741177b27045bed6f2687fc47d7a7880faed8a0ebae6
BLAKE2b-256 checksum
How to use checksums
c2612224e928086037aa20be9b1263f44f62317ab3df728370dad33926e0f52d
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.5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL admesh2d-1.0.5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 239.7 kB
Tags CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b8e0f3738c58a3a4546a036f91957c9652e8a6d60e24d8e693b288f55063a8d8
BLAKE2b-256 checksum
How to use checksums
136cb403a8f4d372f9de43b542abc5de91df3e90ffa003cfc358d9cf535b2a01
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.5-cp312-cp312-macosx_11_0_arm64.whl

Download URL admesh2d-1.0.5-cp312-cp312-macosx_11_0_arm64.whl
Size 225.6 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f315052e422c57ff3885e4ec13c408d7193bf8b6fa231b99c4622dec2afac2e8
BLAKE2b-256 checksum
How to use checksums
feedd9db7a7a5d78529d18f19866da9f4aded92823c9e2e7efe1909dd59ea2a7
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.5-cp312-cp312-macosx_10_13_x86_64.whl

Download URL admesh2d-1.0.5-cp312-cp312-macosx_10_13_x86_64.whl
Size 230.1 kB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
48314cf1aa8f0489460d8a2e7fdee65535c102d43e74462e06396c59ed8f53c1
BLAKE2b-256 checksum
How to use checksums
7315deece3759eb4316701e7a784ce9b02e289e5c31c8f7bccc762474a93a750
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.5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL admesh2d-1.0.5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 238.5 kB
Tags CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6b680dba4aa36abb847e88fd43d7aa1859d551b4472bf6b8adbaa410436f76a2
BLAKE2b-256 checksum
How to use checksums
f524d4f5a32e8be0b0ded1964b3b1af279709d82fbcf47b18391b4275801f3e8
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.5-cp311-cp311-macosx_11_0_arm64.whl

Download URL admesh2d-1.0.5-cp311-cp311-macosx_11_0_arm64.whl
Size 224.0 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
32f7da97c21911b2786104d64d0eb09f8b446398a5eaeffce6add9e82543b834
BLAKE2b-256 checksum
How to use checksums
490036aa4d959b9553f9743cb1918a26424d057d461bbb8fd0a95597f006b0c3
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.5-cp311-cp311-macosx_10_9_x86_64.whl

Download URL admesh2d-1.0.5-cp311-cp311-macosx_10_9_x86_64.whl
Size 228.4 kB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
1a0a2ea7a94b96d7720782b86655d958159e05d29c53b0fd9eeab50dc2d7df5c
BLAKE2b-256 checksum
How to use checksums
748572d9661913d3e0a52183a14ea49f7295c7c5c0fd923b5f8b64f638cde469
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.5-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL admesh2d-1.0.5-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 237.4 kB
Tags CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f8649b2955d12109047e23ebfd6fbebd828a60c540021377fee5192b3aa4e1cf
BLAKE2b-256 checksum
How to use checksums
67627a844e5924492861ae72539bc712973f22b294b7f8980ec9e6d233a1b551
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.5-cp310-cp310-macosx_11_0_arm64.whl

Download URL admesh2d-1.0.5-cp310-cp310-macosx_11_0_arm64.whl
Size 222.8 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0f5dba3667289a6827a75c5c4309a5f1bb6d11ee9f851493a8c1d70a9c44ed33
BLAKE2b-256 checksum
How to use checksums
ab7ee6b2283214de4bba9ddb42a80113ba25abfef517f0e3fe95b520de34b2be
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.5-cp310-cp310-macosx_10_9_x86_64.whl

Download URL admesh2d-1.0.5-cp310-cp310-macosx_10_9_x86_64.whl
Size 226.9 kB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
b5e59f39e221a01ca130b1db75bb1064118bce4224ed91493bdbb77487e9d811
BLAKE2b-256 checksum
How to use checksums
5160e924d381412d26714eccfff8a49adc471dfa9ff9e7eafa552c46a67bcec2
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

1.0.6

15 release files

This release

1.0.5 This release

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