pycodegen.
Python Packages for Scientific Code Generation
Python Packages
pystencils
Describe stencil-based numerical schemes
using symbolic algebra and generate highly
efficient kernels for the latest CPU and GPU
hardware.
lbmpy
Define lattice Boltzmann methods in a
symbolic mathematical framework and derive
highly optimized collision and boundary
handling kernels.
pystencils-sfg
Integrate pystencils with your build system
and embed generated kernels into C++ HPC
applications of all scales.
Learning Resources

The official tutorial to the pycodegen software
suite, including interactive introductions to
pystencils and lbmpy.
Cite Us
pystencils
-
Bauer, M., Hötzer,
J., Ernst, D., Hammer, J., Seiz, M., Hierl, H.,
Hönig, J., Köstler, H., Wellein, G., Nestler, B.,
& Rüde, U. (2019).
Code generation for massively parallel
phase-field simulations.
Proceedings of the International Conference
for High Performance Computing, Networking, Storage
and Analysis. SC ’19: The International Conference
for High Performance Computing, Networking, Storage,
and Analysis ACM..
https://doi.org/10.1145/3295500.3356186
lbmpy
-
Hennig, F., Holzer,
M., & Rüde, U. (2023).
Advanced Automatic Code Generation for Multiple
Relaxation-Time Lattice Boltzmann Methods.
SIAM Journal on Scientific Computing (Vol.
45, Issue 4, pp. C233–C254). Society for Industrial
& Applied Mathematics (SIAM).
https://doi.org/10.1137/22m1531348
-
Holzer, M., Bauer,
M., Köstler, H., & Rüde, U. (2021).
Highly efficient lattice Boltzmann multiphase
simulations of immiscible fluids at high-density
ratios on CPUs and GPUs through code generation.
The International Journal of High
Performance Computing Applications (Vol. 35, Issue
4, pp. 413–427).SAGE Publications.
https://doi.org/10.1177/10943420211016525
-
Bauer, M., Köstler,
H., & Rüde, U. (2021).
lbmpy: Automatic code generation for efficient
parallel lattice Boltzmann methods.
Journal of Computational Science (Vol. 49,
p. 101269). Elsevier BV..
https://doi.org/10.1016/j.jocs.2020.101269