sympy2c

sympy2c: generating fast C/C++ functions and ODE solvers from symbolic expressions  

The Python package sympy2c allows creation and compilation of fast C/C++ based extension modules from symbolic representations, using external pagesympy.
sympy2c offers functionalities which are beyond the code generation capabilities already provided by external pagesympy. This includes creating fast code for the solution of high dimensional ODEs, or numerical evaluation of integrals where sympy fails to compute an anti-derivative.
Based on the symbolic formulation of a stiff ODE, sympy2c analyzes sparsity patterns in the Jacobian matrix of the ODE, and generates loop-less fast code by unrolling loops in the internally used LU factorization algorithm and by avoiding unnecessary computations involving known zeros.
We use sympy2c within PyCosmo, see also the external pagelatest publication. The accompanying publication which describes sympy2c in more detail is available at external pagehttps://arxiv.org/abs/2203.11945
.

Code release and documentation

If you are interested in installing the software, here you can find the latest public release: .
Documentation about the software can be found at the link: https://cosmo-docs.phys.ethz.ch/sympy2c/.
 

JavaScript has been disabled in your browser