A minimal python implementation of the upwind discontinuous galerkin method for solving scalar advection equations.
pip install udgOr with uv:
uv pip install udgpython -m udg.cli sem-dgpython -m udg.cli nodal-dgpython -m udg.cli entropy-dgpython -m udg.cli upwind-dg# 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# Format code
make format
# Run linting
make lint
# Type checking
make type-check
# Run all checks
make pre-commitContributions 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
MIT License - See LICENSE file for details
This software is for educational and research purposes only.
For issues, questions, or contributions:
- Open an issue on GitHub
- Check documentation
- Review test examples
- 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.



