当前位置: X-MOL 学术Program. Comput. Softw. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Using a Template Engine as a Computer Algebra Tool
Programming and Computer Software ( IF 0.7 ) Pub Date : 2021-02-23 , DOI: 10.1134/s0361768821010047
M. N. Gevorkyan , A. V. Korol’kova , D. S. Kulyabov

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.



中文翻译:

使用模板引擎作为计算机代数工具

摘要

在涉及使用数值方法求解常微分方程(ODE)系统的研究问题中,通常需要针对特定​​问题选择最有效的方法。为了解决ODE系统的柯西问题,使用了Runge-Kutta方法(显式或隐式方法,带有或不带有步长控制等)。在那种情况下,需要搜索数值方法的许多实现并选择其数值方案的系数或其他参数。本文提出了一种库和脚本,用于使用Julia编程语言自动生成一系列Runge–Kutta方法的数值方案的例行函数。对于符号操作,我们使用模板替换工具。提出的自动生成程序代码的方法使我们可以使用单个模板进行编辑,而无需修改要比较的每个单独功能。一方面,这在数值方案的实现中提供了通用性,另一方面,使得可以在修改数值方法的比较实现的过程中使错误数量最小化。我们考虑不带步长控制的Runge-Kutta方法,带步长控制的嵌入式方法和带步长控制的Rosenbrock方法。通过使用数字方法解决几个众所周知的问题,可以测试使用所提出的库自动生成的用于数字方案的程序代码。这在数值方案的实现中提供了通用性,另一方面,使得在修改数值方法的比较实现中的过程中的错误数量最小化成为可能。我们考虑不带步长控制的Runge-Kutta方法,带步长控制的嵌入式方法和带步长控制的Rosenbrock方法。通过使用数字方法解决几个众所周知的问题,可以测试使用所提出的库自动生成的用于数字方案的程序代码。这在数值方案的实现中提供了通用性,另一方面,它使得在修改数值方法的比较实现中的过程中的错误数量最小化成为可能。我们考虑不带步长控制的Runge-Kutta方法,带步长控制的嵌入式方法和带步长控制的Rosenbrock方法。通过使用数字方法解决几个众所周知的问题,可以测试使用所提出的库自动生成的用于数字方案的程序代码。和具有步长控制的Rosenbrock方法。通过使用数字方法解决几个众所周知的问题,可以测试使用所提出的库自动生成的用于数字方案的程序代码。和具有步长控制的Rosenbrock方法。通过使用数字方法解决几个众所周知的问题,可以测试使用所提出的库自动生成的用于数字方案的程序代码。

更新日期:2021-02-23
down
wechat
bug