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.11+ 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.10009711), 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.1.0 (2026-11-11); 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.

  • Now: 1D–2D constraint extraction (#186).
  • Next: single-mesh parallel speed-up (#216, #218).
  • Later: 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.11 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; a port of the MIT-licensed ADMESH (see NOTICE). A non-binding request about AI training is in AI-TRAINING.md.

Metadata

Release files for admesh2D 1.1.0

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.1.0
File Size Uploaded Provenance Actions
admesh2d-1.1.0.tar.gz 139.8 kB Without provenance Details for admesh2d-1.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for admesh2D 1.1.0
File Actions
admesh2d-1.1.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details for admesh2d-1.1.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
admesh2d-1.1.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details for admesh2d-1.1.0-cp314-cp314-macosx_11_0_arm64.whl
admesh2d-1.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details for admesh2d-1.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
admesh2d-1.1.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for admesh2d-1.1.0-cp313-cp313-macosx_11_0_arm64.whl
admesh2d-1.1.0-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details for admesh2d-1.1.0-cp313-cp313-macosx_10_13_x86_64.whl
admesh2d-1.1.0-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 for admesh2d-1.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
admesh2d-1.1.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for admesh2d-1.1.0-cp312-cp312-macosx_11_0_arm64.whl
admesh2d-1.1.0-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details for admesh2d-1.1.0-cp312-cp312-macosx_10_13_x86_64.whl
admesh2d-1.1.0-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 for admesh2d-1.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
admesh2d-1.1.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for admesh2d-1.1.0-cp311-cp311-macosx_11_0_arm64.whl
admesh2d-1.1.0-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details for admesh2d-1.1.0-cp311-cp311-macosx_10_9_x86_64.whl

Total release size: 2.8 MB

Release files / admesh2d-1.1.0.tar.gz

Download URL admesh2d-1.1.0.tar.gz
Size 139.8 kB
Tags Source
SHA-256 checksum
How to use checksums
15ed7f19bedde10656374750420c20026c565ba25fe5f5be6a1964c89d661cf9
BLAKE2b-256 checksum
How to use checksums
841608d8874d0ac8bc1e728f62382688a1a53194342f5f402cef887c5604ed69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

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

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

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

Download URL admesh2d-1.1.0-cp314-cp314-macosx_11_0_arm64.whl
Size 238.6 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6e34b01ef1fbf8b4d51074233129268a945fbc3b436fa10d8c1c3fdfb968fd09
BLAKE2b-256 checksum
How to use checksums
634e4f6ab0241af132132db8fa74d9a0e8b277ee94b94908eb44fc5e46fb1008
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

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

Download URL admesh2d-1.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 253.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
1bcb4a8c9bb8e9810cf684a9000fc54a7cba6816fef44adc569e23ddfe41811a
BLAKE2b-256 checksum
How to use checksums
b036e605451ae979b7ae55dead1608e3ee918120685450e29785c1a12b904cad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

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

Download URL admesh2d-1.1.0-cp313-cp313-macosx_11_0_arm64.whl
Size 238.4 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
32c7f099c11348679cadaabbe21ad1951bdda646d0427024b330eefe8153584a
BLAKE2b-256 checksum
How to use checksums
16b700acc564e7a63a63c654beaf4d29b203bbc5b7f82ed7cc99789189708207
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

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

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

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

Download URL admesh2d-1.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 253.6 kB
Tags CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
24d85a6b0a81585baa15f80e390de4bdd590f9cbfd6e6532604ce6083e228fa5
BLAKE2b-256 checksum
How to use checksums
e1595757c873ec7bd1a1dd261ab25b114511a643781354bde7fb9568930cb096
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

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

Download URL admesh2d-1.1.0-cp312-cp312-macosx_11_0_arm64.whl
Size 238.4 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
20e97bbbe426bb5245c0b589a7b6c3b83f73c45837876f7c0eb7785b045a2990
BLAKE2b-256 checksum
How to use checksums
3129fbfc8fab6a2eecbf5aae3ff250a7e79ef3cc08c7f6c54ea42507d554cf83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

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

Download URL admesh2d-1.1.0-cp312-cp312-macosx_10_13_x86_64.whl
Size 242.9 kB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
6c786496f83b7feacac2592f836d700c9a0f8f0f88f0ff87d8a1e3efd64f308e
BLAKE2b-256 checksum
How to use checksums
7a0b159b60a1776f73eefa21cc59637cb567d636ea5512fb1ca8505981f699ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

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

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

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

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

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

Download URL admesh2d-1.1.0-cp311-cp311-macosx_10_9_x86_64.whl
Size 241.2 kB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
102b68b3e2447d5201447600bbd93bad6b5f56ca8c027a7066b8dac689587147
BLAKE2b-256 checksum
How to use checksums
93e2ed801df7c8eb71adc3e2c579d406d422c14e78aa31f7a9c7ec9acade4c80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Security for admesh2D 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.0 This release

12 release files No provenance

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