Metadata-Version: 2.4
Name: grid-generator
Version: 0.4.0
Summary: Structured grid generation utilities for Python
Author-email: Christoph Hader <christoph.hader@gmail.com>
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/uahypersonics/grid-generator
Project-URL: Repository, https://github.com/uahypersonics/grid-generator
Project-URL: Documentation, https://uahypersonics.github.io/grid-generator
Keywords: grid,structured-grid,mesh,cfd
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: canonical-geometries>=0.2.0
Requires-Dist: cfd-io>=0.3.0
Requires-Dist: numpy>=2.0.0
Requires-Dist: pydantic>=2.0
Requires-Dist: typer>=0.9.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: zensical; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.24; extra == "docs"
Dynamic: license-file

# grid-generator

Structured grid generation utilities for Python.

[![PyPI](https://img.shields.io/pypi/v/grid-generator)](https://pypi.org/project/grid-generator/)
[![Docs](https://img.shields.io/badge/docs-zensical-blue)](https://uahypersonics.github.io/grid-generator/)
[![License](https://img.shields.io/badge/license-GPL--3.0--or--later-blue.svg)](LICENSE)
[![Python](https://img.shields.io/badge/python-%E2%89%A53.11-blue.svg)](https://www.python.org/downloads/)

`grid-generator` builds structured computational grids and writes them through
the canonical `cfd-io` data model.

## Install

```bash
pip install grid-generator
```

## Quick Start

```bash
grid-generator cartesian init
grid-generator cartesian run cartesian.toml
```

The generated TOML file defines required `grid.x` and optional `grid.y` and
`grid.z` point distributions. Omitting optional axes creates singleton
dimensions, so Cartesian grids always use the structured `(ni, nj, nk)` array
contract.

The same workflow is available from Python:

```python
from grid_generator import generate_cartesian

dataset = generate_cartesian("cartesian.toml")
print(dataset.grid.shape)
```

Body-fitted 2D grids around blunt bodies (blunted plate, wedge, sphere-cone, tangent ogive)
use the geometry definitions from
[canonical-geometries](https://github.com/uahypersonics/canonical-geometries):

```bash
grid-generator plate init
grid-generator plate run plate.toml
```

## Features

- One-, two-, and three-dimensional Cartesian tensor-product grids
- Constant-height body-fitted 2D grids with a polar nose block, SU2 boundary
  markers, and a grid quality report
- Extrusion of plate and wedge grids in z into 3D grids
- Equidistant, geometric, tanh, and segmented point distributions
- `distribution info` reference of the distribution types and their keys, and
  `distribution init/run` for 1D point files (.dat, .csv, .txt)
- Composable cubic and quintic transitions between equidistant regions
- Focused `cartesian`, `plate`, `wedge`, `cone` and `tangent-ogive` CLI workflows, each with `init/run`
- HDF5 and SU2 output through `cfd-io`
- Typed Python configuration and generation API

## Documentation

Documentation site: https://uahypersonics.github.io/grid-generator/

## Releasing

This project publishes to PyPI from Git tags that match `v*`.

```bash
git tag -a v0.1.0 -m "Release v0.1.0"
git push origin v0.1.0
```

The GitHub Actions publish workflow will build the package, run tests, and then
publish to PyPI using Trusted Publishing.

## License

GNU General Public License v3.0 or later. See [LICENSE](LICENSE) for the
complete license terms.
