Using a template engine as a computer algebra tool

07/15/2021
by   Migran N. Gevorkyan, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/24/2023

Stability of step size control based on a posteriori error estimates

A posteriori error estimates based on residuals can be used for reliable...
research
06/11/2020

Weak variable step-size Euler schemes for stochastic differential equations based on controlling conditional moments

We address the weak numerical solution of stochastic differential equati...
research
02/04/2021

Efficient adaptive step size control for exponential integrators

Traditional step size controllers make the tacit assumption that the cos...
research
02/05/2021

WKB-based scheme with adaptive step size control for the Schrödinger equation in the highly oscillatory regime

This paper is concerned with an efficient numerical method for solving t...
research
11/15/2019

Role-Oriented Code Generation in an Engine for Solving Hyperbolic PDE Systems

The development of a high performance PDE solver requires the combined e...
research
04/14/2021

Optimized Runge-Kutta Methods with Automatic Step Size Control for Compressible Computational Fluid Dynamics

We develop error-control based time integration algorithms for compressi...
research
04/17/2013

Fast exact digital differential analyzer for circle generation

In the first part of the paper we present a short review of applications...

Please sign up or login with your details

Forgot password? Click here to reset