arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

具有多分辨率稀疏哈希表内核查找的G-Scheme刚性常微分方程求解器的C++实现

A C++ implementation of the G-Scheme stiff ODE solver with multi-resolution sparse hash-table kernel lookup

Riccardo Malpica Galassi, Mauro Valorani

arXiv 2607.14918首次发表:更新:

AI 中文总结

研究刚性常微分方程求解问题,核心方法是用多分辨率稀疏哈希表策略代替在线内核计算,实现C++版本的G-Scheme。贡献在于性能提升显著,对总误差贡献小,且相关软件开源。

AI 中文摘要

G-Scheme是一种用于刚性常微分方程组的显式自适应积分框架,利用雅可比矩阵(内核集)的特征系统提供的局部时间尺度分解。其计算成本主要由每个时间步的新内核集评估决定。在最近一篇论文中,我们介绍了一种多分辨率稀疏哈希表策略,用预计算查找表检索代替在线内核计算,已在Python中演示。本文展示了cpp-gscheme,这是G-Scheme和多分辨率哈希表的生产级C++实现,以及保证与Python参考行为等效的移植方法:相同的缩放、分箱和哈希语义,积分器中的按位惰性检索钩子,以及化学源项的完全原生评估路径。在33个正庚烷自燃机制(涵盖56 - 459种物质加上详细的654种物质机制)上,哈希表化的C++ G-Scheme检索了100%的内核集,执行零在线特征分解,比原生编译的CVODE求解器性能提升2.7倍(56种物质)至9.3倍(654种物质)不等,观察到成本缩放约为N的1.4次方,而CVODE为N的1.9次方。三项指标精度评估表明,求解器对总误差预算贡献可忽略不计,主要误差由骨架简化主导。因此,80种物质的骨架机制实现了5%的点火延迟目标,在详细机制上比CVODE快225倍。软件、训练集构建器和基准驱动程序作为开源发布。

英文摘要

The G-Scheme is an explicit, adaptive integration framework for stiff systems of ordinary differential equations that exploits a local time-scale decomposition provided by the eigensystem of the Jacobian (the kernel set). Its computational cost is dominated by the evaluation of a new kernel set at each time step. In a recent paper [R.Malpica Galassi and M.Valorani, Combust. Theory Model. 2025], we introduced a multi-resolution sparse hash-table strategy that replaces online kernel computation with retrieval from a precomputed lookup table, demonstrated in Python. Here we present cpp-gscheme, a production-grade C++ implementation of both the G-Scheme and the multi-resolution hash table, together with the porting methodology that guarantees behavioural equivalence with the Python reference: identical scaling, binning and hashing semantics, a bitwise-inert retrieval hook in the integrator, and a fully native evaluation path for the chemical source terms. On 33 n-heptane autoignition mechanisms spanning 56-459 species plus the detailed 654-species mechanism, the hash-tabulated C++ G-Scheme retrieves 100 percent of the kernel sets, performs zero online eigen decompositions, and outperforms the natively compiled CVODE solver by a factor increasing from 2.7x (56 species) to 9.3x (654 species), with observed cost scaling of approximately N power 1.4 versus CVODE's N power 1.9. A three-metric accuracy assessment (ignition delay, equilibrium state, and accumulated entropy-progress error) shows that the solver contributes negligibly to the overall error budget, which is dominated by skeletal reduction. Consequently, a 5 percent ignition-delay target is achieved by the 80-species skeletal mechanism with a 225x speed-up over CVODE on the detailed mechanism. The software, training-set builders, and benchmark drivers are released as open source.

Comments30 pages, 11 figures

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑