UDG - Upwind Discontinuous Galerkin Method
A minimal python implementation of the upwind discontinuous galerkin method for solving scalar advection equations.
Installation
pip install udg
Or with uv:
uv pip install udg
Quick Start
Step 1: Run the DGSEM solver (Kopriva et al., 2009)
python -m udg.cli sem-dg
Step 2: Run the Nodal-DG solver (Hesthaven et al., 2008)
python -m udg.cli nodal-dg
Step 3: Run the entropy-stable DG solver (Gassner et al., 2013)
python -m udg.cli entropy-dg
Step 4: Run the upwind summation-by-parts DG solver
python -m udg.cli upwind-dg
Development
Setup
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and install
git clone https://github.com/jaisw7/udg.git
cd udg
uv sync --all-extras
# Activate virtual environment
source .venv/bin/activate
# Install pre-commit hooks (optional)
pre-commit install
Code Quality
# Format code
make format
# Run linting
make lint
# Type checking
make type-check
# Run all checks
make pre-commit
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Run
make pre-committo ensure code quality - Submit a pull request
License
MIT License - See LICENSE file for details
Disclaimer
This software is for educational and research purposes only.
Support
For issues, questions, or contributions:
- Open an issue on GitHub
- Check documentation
- Review test examples
References
- Kopriva, David A. Implementing spectral methods for partial differential equations: Algorithms for scientists and engineers. Springer Science & Business Media, 2009.
- Hesthaven, Jan S., and Tim Warburton. Nodal Discontinuous Galerkin Methods: Algorithms, Analysis, and Applications. Springer Science & Business Media, 2008.
- Gassner, Gregor J. "A skew-symmetric discontinuous Galerkin spectral element discretization and its relation to SBP-SAT finite difference methods." SIAM Journal on Scientific Computing 35.3 (2013): A1233-A1253.
Results
DGSEM
Nodal-DG
Entropy-Stable DG
Upwind DG
Metadata
Release files for udg 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| udg-0.1.1.tar.gz | 132.6 kB | With provenance | Details for udg-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| udg-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for udg-0.1.1-py3-none-any.whl |
Total release size: 145.8 kB
Release files / udg-0.1.1.tar.gz
| Download URL | udg-0.1.1.tar.gz |
|---|---|
| Size | 132.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
81d6573b03f097b7734021c874eb71629edcc0608e00a36bfb8e0f5bfa01269f
|
|
BLAKE2b-256 checksum How to use checksums |
15402f01941f7aee620f11449f803cd06d7ffeeca852026a5bed8b9542f11fd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 25, 2025.
Transparency logRelease files / udg-0.1.1-py3-none-any.whl
| Download URL | udg-0.1.1-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9d9a82edc095efc444ae4207fd0c5fee05bc1f7d8609b47834626b6c9431643
|
|
BLAKE2b-256 checksum How to use checksums |
396c1c503f0b744a593f84343441889549dc46e027439a623bf69451b1e45f60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 25, 2025.
Transparency logSecurity for udg 0.1.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for udg-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 25, 2025.
Transparency logA 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.