Using a Template Engine as a Computer Algebra Tool

Abstract: In research problems that involve the use of numerical methods for solving systems of ordinary differential equations (ODEs), it is often required to select the most efficient method for a particular problem. To solve a Cauchy problem for a system of ODEs, Runge–Kutta methods (explicit or implicit ones, with or without step-size control, etc.) are employed. In that case, it is required to search through many implementations of the numerical method and select coefficients or other parameters of its numerical scheme. This paper proposes a library and scripts for automated generation of routine functions in the Julia programming language for a set of numerical schemes of Runge–Kutta methods. For symbolic manipulations, we use a template substitution tool. The proposed approach to automated generation of program code allows us to use a single template for editing, instead of modifying each individual function to be compared. On the one hand, this provides universality in the implementation of a numerical scheme and, on the other hand, makes it possible to minimize the number of errors in the process of modifying the compared implementations of the numerical method. We consider Runge–Kutta methods without step-size control, embedded methods with step-size control, and Rosenbrock methods with step-size control. The program codes for the numerical schemes, which are generated automatically using the proposed library, are tested by solving numerically several well-known problems. © 2021, Pleiades Publishing, Ltd.

Number of issue
1
Language
English
Pages
17-24
Status
Published
Volume
47
Year
2021
Organizations
  • 1 Department of Applied Informatics and Probability Theory, Peoples’ Friendship University of Russia, ul. Miklukho-Maklaya 6, Moscow, 117198, Russian Federation
  • 2 Laboratory of Information Technologies, Joint Institute for Nuclear Research, ul. Zholio-Kyuri 6, Dubna, Moscow oblast 141980, Russian Federation
Keywords
Algebra; Ordinary differential equations; Problem oriented languages; Runge Kutta methods; Software testing; Automated generation; Numerical scheme; Research problems; Rosenbrock methods; Routine functions; Step-size controls; Symbolic manipulation; Systems of ordinary differential equations; Numerical methods
Date of creation
20.04.2021
Date of change
20.04.2021
Short link
https://repository.rudn.ru/en/records/article/record/72311/
Share

Other records