ADMESH: an advanced, automatic unstructured mesh generator for 2D shallow-water models.
Reason this release was yanked:
Relicensed under PolyForm Noncommercial 1.0.0; install the latest version.
Project description
ADMESH: An ADvanced, automatic unstructured MESH generator for 2D shallow-water models.
Colton J. Conroy1, Ethan J. Kubatko1, Dustin W. West1
1Computational Hydrodynamics and Informatics Lab (CHIL), The Ohio State University
Ocean Dynamics 62, 1503–1517 (2012) · doi:10.1007/s10236-012-0574-0
Python implementation maintained by Dominik Mattioli (Penn State University).
Install
🚧 0.1.0 in progress. Spec 002 lands default size-field stack + ADCIRC paired-edge BC support; first PyPI tag follows when Tier-2 / WNAT structural-validity gate green (issue #10). Until then, install from source.
pip install admesh2D # core (when 0.1.0 ships)
pip install admesh2D[viz] # adds matplotlib for mesh.plot()
From source (current):
git clone https://github.com/domattioli/ADMESH.git
cd ADMESH
pip install -e ".[dev]"
Requires Python ≥ 3.10. Core deps: NumPy, SciPy, Numba, Shapely.
Quickstart
🚧
triangulate()defaults stabilizing across spec 002. 3-line idiom below works today; advanced kwargs (enable_curvature,enable_medial_axis,bathymetry,tide_period,default_depth, …) documented inspecs/002-size-field-defaults/contracts/python-api-default-stack.md.
import admesh
domain = admesh.domain_from_polygon([outer_ring_xy, hole_ring_xy])
mesh = admesh.triangulate(domain)
mesh.to_fort14("out.14")
mesh = frozen Mesh dataclass — typed nodes, elements, boundary segments (with BoundaryType codes), per-element quality.
Round-trip with ADCIRC fort.14
mesh = admesh.read_fort14("input.14")
mesh.to_fort14("output.14")
assert mesh.equals(admesh.read_fort14("output.14"))
Custom size-field contribution
def refine_near_breaker(pts):
return 50.0 + 0.2 * np.abs(pts[:, 0] - 1500.0)
mesh = admesh.triangulate(domain, user_contribs=[refine_near_breaker])
Built-in size-field stages (curvature, medial axis, bathymetry, tide) min-stack identically to MATLAB. User contributions compose on top via user-chosen combiner (default elementwise minimum).
Status
Under construction. v1 plan + task list live in specs/001-pythonize-and-fort14-integration/ (shipped) + specs/002-size-field-defaults/ (in progress — wires MATLAB-faithful size-field stack as default Phase-1 in triangulate() + extends fort.14 for IBTYPE 3 / 4 / 13 / 24 paired-edge BC records). Faithful Python port of original 13-stage pipeline = production path (now 250+ tests passing); Pythonic API + fort.14 I/O = 0.1.0 deliverables.
Upstream
Reference MATLAB implementation = coltonjconroy/ADMESH, maintained by original author. That repo may carry features beyond what this port currently covers; new functionality adopted here as it's pulled across.
Related projects
- ADMESH-Domains — federated registry of ADCIRC-compatible meshes (domains) for discovery, lineage tracking, community contribution. Built as companion to this library.
Citation
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
Copy included at papers/Conroy-2012-ADMESH.pdf.
Contact
- Theory (algorithm, size-field formulation, ADCIRC integration): Ethan J. Kubatko — kubatko.3@osu.edu
- Code (this repository): Dominik Mattioli — github.com/domattioli
License
Apache 2.0 — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file admesh2d-0.2.0.tar.gz.
File metadata
- Download URL: admesh2d-0.2.0.tar.gz
- Upload date:
- Size: 127.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7e2f846b6c6bc34e7ca110f6a2ed7cb2d0d2d1898a5fe77add22eb868eb889e
|
|
| MD5 |
169833b33e5124214ebcd75e520d6754
|
|
| BLAKE2b-256 |
ae3e5cae67777d457d6326649f40a52c994c20724687b05673d19a51b6bcd2a3
|
File details
Details for the file admesh2d-0.2.0-py3-none-any.whl.
File metadata
- Download URL: admesh2d-0.2.0-py3-none-any.whl
- Upload date:
- Size: 86.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10f27bbbcd938d8382fe30c1a380b85ca999198a42685d36d554f02fa3387ff0
|
|
| MD5 |
32ed21d7b5df59d210ccf8b8b8bc8eba
|
|
| BLAKE2b-256 |
588858e8db6f4a04eb86eca54a5f60f7c1ee18a3183384aee03934cba5599c2f
|