A C++ implementation of the G-Scheme stiff ODE solver with multi-resolution sparse hash-table kernel lookup
Riccardo Malpica Galassi, Mauro Valorani
Abstract
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.
Create a lesson
Related papers
2-Morita Theory of E2-Algebras and Module Categories
Rongge Xu, Holiverse Yang
Multiscale Loop Vertex Expansion for Cumulants, the ϕ42 Model
Vincent Rivasseau
Quasi-polynomiality and N-point functions of single connected leaky completed Hurwitz numbers
Chongyu Wang, Chenglang Yang
Coupled stochastic variational principles for multiscale surface gravity waves -- Part I: theoretical framework
Etienne Mémin, Arnaud Debussche
The Sharp Spectral Transition for Almost Mathieu Operators via Alternating Resonances
Jiawei He, Xueyin Wang
Dynamical classical-field limit of Bosonic Gibbs states: Renormalized Hartree NLS correlations in 2D and 3D
Phan Thành Nam, Rongchan Zhu, Xiangchan Zhu