Automatic code generator for higher order integrators
收藏资源简介:
Abstract Some explicit algorithms for higher order symplectic integration of a large class of Hamilton’s equations have recently been discussed by Mushtaq et al. Here we present a Python program for automatic numerical implementation of these algorithms for a given Hamiltonian, both for double precision and multiprecision computations. We provide examples of how to use this program, and illustrate behavior of both the code generator and the generated solver module(s). Title of program: HOMsPy Catalogue Id: AESD_v1_0 Nature of problem We have developed algorithms [5] for numerical solution of Hamilton's equations. qdot a = ΔH(q,p)/Δp a , pdot a = -ΔH(q,p)/Δq a , a=1.....,N (1) for Hamiltonians of the form H(q,p)= T(p) + V(q) = 1/2p T M p +V(q), (2) with M a symmetric positive definite matrix. The algorithms preserve the symplectic property of the time evolution exactly, and are of orders Τ N (for 2 ≤N ≤ 8) in the timestep Τ. Although explicit, the algorithms are time-consuming and error-prone to implement numerically by hand, ... Versions of this program held in the CPC repository in Mendeley Data AESD_v1_0; HOMsPy; 10.1016/j.cpc.2014.01.012 This program has been imported from the CPC Program Library held at Queen's University Belfast (1969-2019)
**摘要** Mushtaq等人近期探讨了针对一大类哈密顿方程(Hamilton's equations)的高阶辛积分(symplectic integration)显式算法。本文提出一款Python程序,可针对给定哈密顿量(Hamiltonian)自动实现上述算法的数值计算,支持双精度(double precision)与多精度(multiprecision)两种计算模式。文中提供了该程序的使用示例,并演示了代码生成器与所生成的求解器模块的运行特性。 程序名称:HOMsPy 目录编号:AESD_v1_0 **问题属性** 我们已开发出用于哈密顿方程数值求解的算法[5],针对形如 $H(q,p)= T(p) + V(q) = frac{1}{2}oldsymbol{p}^ ext{T} oldsymbol{M} oldsymbol{p} + V(q)$(式2)的哈密顿量,其中$oldsymbol{M}$为对称正定矩阵(symmetric positive definite matrix),其哈密顿方程形式为: $$dot{q}_a = frac{partial H(q,p)}{partial p_a}, quad dot{p}_a = -frac{partial H(q,p)}{partial q_a}, quad a=1,2,dots,N ag{1}$$ 该类算法可严格保留时间演化的辛特性,且在时间步长$ au$(timestep)下的收敛阶为$ au^N$($2leq Nleq8$)。尽管该算法为显式格式,但手动进行数值实现时往往耗时且极易出错。 **Mendeley数据平台CPC仓库收录版本** AESD_v1_0;HOMsPy;DOI:10.1016/j.cpc.2014.01.012 本程序源自贝尔法斯特女王大学托管的CPC程序库(1969-2019年)



