Computer Physics Communications Program Library Programs in Physics & Physical Chemistry
 [Licence| Download | New Version Template] aesd_v1_0.tar.gz(1924 Kbytes) Manuscript Title: Automatic code generator for higher order integrators Authors: Asif Mushtaq, Kåre Olaussen Program title: HOMsPy Catalogue identifier: AESD_v1_0Distribution format: tar.gz Journal reference: Comput. Phys. Commun. 185(2014)1461 Programming language: Python 2.7. Computer: PCs or higher performance computers. Operating system: Linux, MacOS, MSWindows. RAM: Kilobytes to a several gigabytes (problem dependent). Keywords: Splitting methods, Modified integrators, Higher order methods, Automatic code generation. Classification: 4.3, 5. External routines: SymPy library [1] for generating the code. NumPy library [2], and optionally mpmath [3] library for running the generated code. The matplotlib [4] library for plotting results. Nature of problem:We have developed algorithms [5] for numerical solution of Hamilton's equations. qdota = δH(q,p)/δpa, pdota= -δH(q,p)/δqa, a=1.....,N     (1) for Hamiltonians of the form H(q,p)= T(p) + V(q) = 1/2pTMp+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, in particular for larger N Solution method:We use computer algebra to perform all analytic calculations required for a specific model, and to generate the Python code for numerical solution of this model, including example programs using that code. Restrictions:In our implementation the mass matrix is assumed to be equal to the unit matrix, and V(q) must be sufficiently differentiable. Running time:Subseconds to eons (problem dependent). See discussion in the main article. References: [1] SymPy Developement Team, http://sympy.org/ [2] NumPy Developers, http://numpy.org/ [3] F. Johansson et. al., Python library for arbitrary-precision floating-point arithmetic, http://code.google.code/p/mpmath/ (2010) [4] J.D. Hunter, Matplotlib: A 2D graphics environment, Computing in Science and Engineering 9, 90-95 (2007) [5] A. Mushtaq, A. Kværnø, K. Olaussen, Higher order Geometric Integrators for a class of Hamiltonian systems, International Journal of Geometric Methods in Modern Physics, vol 11, no. 1 (2014), 1450009-1-1450009-20. DOI: 10.1142/S0219887814500091.arXiv.org:1301.7736
 Disclaimer | ScienceDirect | CPC Journal | CPC | QUB