# Algorithmic Design of an FPGA-Based Calculator for Fast Evaluation of Tsunami Wave Danger
## 2 Materials and Methods
### HLS-Based Algorithm Porting
First of all, it should be noted that the comparison of the results of calculations of the test problems using MOST (the most used tsunami simulation software package worldwide) and the MacCormack scheme implemented on the FPGA with the exact solutions for the model bottom topographies showed their good correspondence. A computational experiment to simulate a catastrophic tsunami on 11 March 2011 off the northeastern coast of Japan (caused by the Great Tohoku Earthquake) gave results similar to those of other authors (e.g., [12]). At the same time, the processing time was an order of magnitude less than even calculations using GPU. This makes it possible to obtain the distribution of the expected tsunami wave heights along the entire coast in 1-2 min, and the use of the nested grids method provides a detailed forecast

Figure 4: Distribution of the tsunami height maxima in the entire computational domain, obtained via numerical modeling using the proposed approach. for the tsunami-hazardous segments of the coast in which we are interested. The authors expect that the application of the described approaches will make it possible in the future to create a system of local forecasting of the tsunami wave hazard, working in the data entry mode. It should be noted that GPUs are currently a very popular tool for parallel calculations. In the considered case of the numerical solution of the system of shallow water equations, the performance of the proposed solution based on an FPGA and using a Tesla K-40 GPU was compared. It turned out that the execution time per iteration of the computational algorithm in double precision was 20 ms for the Tesla K-40 GPU and 5.23 ms for the VC709 FPGA. This can be explained by the fact that a special computational pipeline was designed for the use of VC709 FPGA, taking into account the specifics of the proposed implementation of the MacCormack algorithm. This explains the higher performance compared to the standard GPU architecture of the Tesla K-40. Currently, more powerful GPUs--namely, Volta (V100) and Ampere (A100) series--whose peak performance in double precision is 4.94 times better (V100) and 11.72 times better (A100) than the K-40, have been developed. However, the peak performance is usually far from being achieved when solving systems of equations of mathematical physics. In addition, these GPUs are very expensive and server-oriented. The released versions of these GPU series for use in PCs have a reduced memory size and a smaller number of computing cores, while the proposed FPGA-based calculator is designed to work in PCs. Conceptualization, M.L., M.S. and A.M.; methodology, K.L. and M.S. ; software, K.O. ; visualization of numerical results--A.M.; writing--original draft preparation, K.O. and A.M.; writing--review and editing, M.L., K.O. and A.M. All authors have read and agreed to the published version of the manuscript. This research was supported by the state contract with IAE SB RAS (121041800012-8) and with ICMMG SB RAS (0315-2019-0005). Not applicable. The authors declare no conflict of interest. ## References

* [PERSON] et al. (2020) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Hardware Acceleration of Tsunami Wave Propagation Modeling in the Southern Part of Japan. _Appl. Sci._**2020**, _10_, 4159. [CrossRef]
* IEEE 1364-2001--IEEE Standard Verilog Hardware Description Language. Available online: [[https://standards.ieee.org/standard/1364-2001.html](https://standards.ieee.org/standard/1364-2001.html)]([https://standards.ieee.org/standard/1364-2001.html](https://standards.ieee.org/standard/1364-2001.html)) (accessed on 20 November 2021). * [PERSON] (1972) [PERSON]; [PERSON] Computational Efficiency Achieved by Time Splitting of Finite-Difference Operators. In Proceedings of the 10 th Aerospace Sciences Meeting, San Diego, CA, USA, 17-19 January 1972; AIAA Paper. pp. 72-154. * [PERSON] et al.