Metadata-Version: 2.4
Name: geotransport
Version: 1.0.0
Summary: Python Library: Stochastic Geomorphological Transport for Terrain Erosion Simulation
Keywords: geotransport,erosion,cuda,gpu,erosiv
Author-Email: Nicholas McDonald <nick@erosiv.studio>
Maintainer-Email: Nicholas McDonald <nick@erosiv.studio>
License-Expression: MIT
Project-URL: Homepage, https://erosiv.studio/publications/stochastic-geomorphological-transport
Project-URL: Documentation, https://github.com/erosiv/geotransport.git
Project-URL: Repository, https://github.com/erosiv/geotransport.git
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# geotransport


<p align="center" style="font-size: 150%;">Stochastic Geomorphological Transport for Terrain Erosion Simulation</p>
<p align="center" style="font-size: 120%;">Official Source Code Repository</p>

<img alt="A simulated terrain generated with this method." src="image/showcase_cropped.png" align="center"/>
<p align="center" style="font-size: 75%;">A simulated terrain generated with this method.</p>

<p align="center" style="font-size: 100%;">
  <a href="https://erosiv.studio/publications/stochastic-geomorphological-transport">Project Page</a>
</p>
<p align="center" style="width: 100%; display: flex; justify-content: space-evenly;">
  <a href="https://erosiv.studio">Nicholas McDonald</a>
  <a href="https://www-sop.inria.fr/members/Guillaume.Cordonnier/">Guillaume Cordonnier</a>
</p>

## Reading the Source Code

This repository contains a minimal reference implementation of our core algorithm - the generalized stochastic integration procedure - and includes example code for reproducing our error convergence plot and computing stochastic linear transport across a digital elevation model.

Note that this repository doesn't contain the full source code to perform the erosion simulation, but a version can be found in [soillib](https://github.com/erosiv/soillib). The reason for this separation is that this repository can remain archived with this reference implementation, while soillib can change continuously to adapt to needs.

This also helps keep the reference implementation simple and with minimal assumptions.

### Using this Repository

The primary algorithm is implemented as a CUDA kernel operating on a `silt::tensor` ([dependency: silt](https://github.com/erosiv/silt)), exposed to python through nanobind. The easiest way to run the example scripts is to install the wheel file provided in the releases section of this repository using `pip`.

### Repository Structure

- `/example`: Example scripts and data
- `/ext`: Submodule dependencies
- `/python`: Python bindings generated w. [nanobind](https://github.com/wjakob/nanobind)
- `/source`: C++/CUDA primary implementation

### Building from Source

> Note: Tested and working on Windows

After cloning, update the submodules:

```bash
git submodule update --init --recursive
```

Build from source and install from this repository using `pip`:

```bash
pip install .
```

Re-building for development:

```bash
pip install --no-build-isolation -ve .
```

Build directly using CMake:

```bash
cmake -S . -B build
cmake --build build
```

Build Wheel Distributable:

```bash
pip wheel .
```

#### Details

If you are building from source, please follow the instructions in `silt` to make sure you have all required dependencies.