当前位置: X-MOL 学术arXiv.cs.SC › 论文详情
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
arXiv - CS - Symbolic Computation Pub Date : 2021-07-15 , DOI: arxiv-2107.07461
Migran N. Gevorkyan, Anna V. Korolkova, Dmitry S. Kulyabov

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 numerical solution of several well-known problems.

中文翻译:

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

在涉及使用数值方法求解常微分方程 (ODE) 系统的研究问题中,通常需要为特定问题选择最有效的方法。为了解决 ODE 系统的柯西问题,使用了 Runge-Kutta 方法(显式或隐式方法,有或没有步长控制等)。在这种情况下,需要搜索数值方法的许多实现并选择其数值方案的系数或其他参数。本文提出了一个库和脚本,用于在 Julia 编程语言中为 Runge-Kutta 方法的一组数值方案自动生成例程函数。对于符号操作,我们使用模板替换工具。建议的自动生成程序代码的方法允许我们使用单个模板进行编辑,而不是修改要比较的每个单独的函数。一方面,这为数值方案的实现提供了普遍性,另一方面,可以最大限度地减少修改数值方法的比较实现过程中的错误数量。我们考虑不带步长控制的 Runge-Kutta 方法、带步长控制的嵌入方法和带步长控制的 Rosenbrock 方法。使用所提出的库自动生成的数值方案的程序代码通过几个众所周知的问题的数值解决方案进行了测试。这为数值方案的实现提供了普遍性,另一方面,可以最大限度地减少修改数值方法的比较实现过程中的错误数量。我们考虑不带步长控制的 Runge-Kutta 方法、带步长控制的嵌入方法和带步长控制的 Rosenbrock 方法。使用所提出的库自动生成的数值方案的程序代码通过几个众所周知的问题的数值解决方案进行了测试。这为数值方案的实现提供了通用性,另一方面,可以最大限度地减少修改数值方法的比较实现过程中的错误数量。我们考虑不带步长控制的 Runge-Kutta 方法、带步长控制的嵌入方法和带步长控制的 Rosenbrock 方法。使用所提出的库自动生成的数值方案的程序代码通过几个众所周知的问题的数值解决方案进行了测试。和具有步长控制的 Rosenbrock 方法。使用所提出的库自动生成的数值方案的程序代码通过几个众所周知的问题的数值解决方案进行了测试。和具有步长控制的 Rosenbrock 方法。使用所提出的库自动生成的数值方案的程序代码通过几个众所周知的问题的数值解决方案进行了测试。
更新日期:2021-07-16
down
wechat
bug