跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

天体物理学 > 天体物理仪器与方法

arXiv:2203.11945 (astro-ph)
[提交于 2022年3月22日]

标题:sympy2c: from symbolic expressions to fast C/C++ functions and ODE solvers in Python

作者:Uwe Schmitt, Beatrice Moser, Christiane S. Lorenz, Alexandre Refregier
查看论文《sympy2c: from symbolic expressions to fast C/C++ functions and ODE solvers in Python》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Computer algebra systems play an important role in science as they facilitate the development of new theoretical models. The resulting symbolic equations are often implemented in a compiled programming language in order to provide fast and portable codes for practical applications. We describe sympy2c, a new Python package designed to bridge the gap between the symbolic development and the numerical implementation of a theoretical model. sympy2c translates symbolic equations implemented in the SymPy Python package to C/C++ code that is optimized using symbolic transformations. The resulting functions can be conveniently used as an extension module in Python. sympy2c is used within the PyCosmo Python package to solve the Einstein-Boltzmann equations, a large system of ODEs describing the evolution of linear perturbations in the Universe. After reviewing the functionalities and usage of sympy2c, we describe its implementation and optimization strategies. This includes, in particular, a novel approach to generate optimized ODE solvers making use of the sparsity of the symbolic Jacobian matrix. We demonstrate its performance using the Einstein-Boltzmann equations as a test case. sympy2c is widely applicable and may prove useful for various areas of computational physics. sympy2c is publicly available at https://cosmology.ethz.ch/research/software-lab/sympy2c.html
评论: 28 pages, 5 figures, 5 tables, Link to package: https://cosmology.ethz.ch/research/software-lab/sympy2c.html, the described packaged sympy2c is used within arXiv:2112.08395
主题: 天体物理仪器与方法 (astro-ph.IM); 宇宙学与河外天体物理学 (astro-ph.CO); 数学软件 (cs.MS); 计算物理 (physics.comp-ph)
引用方式: arXiv:2203.11945 [astro-ph.IM]
  (或者 arXiv:2203.11945v1 [astro-ph.IM] 对于此版本)
  https://doi.org/10.48550/arXiv.2203.11945

提交历史

来自:Uwe Schmitt
[v1] 2022年3月22日 星期二 15:51:55 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

astro-ph.IM
< 上一篇   |   下一篇 >
最新 | 近期 | 2022-03
切换浏览方式为:
astro-ph
astro-ph.CO
cs.MS
physics.comp-ph

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站