Installation
spectral_galerkin_heat uses uv to manage its environment.
Prerequisites
Python: 3.12 or higher.
uv: A fast Python package installer and resolver.
For GPU support (optional):
CUDA Toolkit: Compatible with CuPy.
NVIDIA Driver: Matching your CUDA version.
Installing the Project
Clone the repository:
git clone https://github.com/theo-andrieux/spectral_galerkin_heat.git cd spectral_galerkin_heat
Sync the environment (CPU):
uv syncThis creates an isolated virtual environment and installs the dependencies defined in
pyproject.toml.(Optional) Sync for GPU: For a compatible NVIDIA GPU:
uv sync --extra gpu
Running Simulations
The project is driven by YAML configuration files.
# General invocation
uv run python simulations/main.py <path_to_config.yaml>
# Run the quickstart example (finishes in seconds)
uv run python simulations/main.py simulations/examples/01_quickstart.yaml
See Examples for the full walkthrough of the examples.
Building the Documentation
Requires make (available via your system package manager: apt install make, brew install make, etc.).
uv run make -C docs html
The HTML output is written to docs/_build/html/. Open docs/_build/html/index.html in a browser to view it.