| Large-scale floods are one of the major events that we have to face every year during the flood season,which is related to the national economy and people’s livelihood.Understanding the behavior of water flow in rivers plays a vital role in early warning of flood disasters and saving lives.The flow behavior of floods can be described by the solution of the Saint-Venant equations.However,since the solution of partial differential equations requires high computing power,it is difficult to simulate and predict floods using numerical methods in the early days.With the rapid development of computer technology in recent years,it is possible to directly solve the Saint-Venant equations to accurately simulate the details of the confluence.In this paper,the surface water flow is taken as the research object,and the numerical simulation of the water flow process is carried out.In order to predict and simulate the evolution of the flood,a mathematical model with initial conditions and boundary conditions was established by using the two-dimensional Saint-Venant partial differential equation.The model is discretized using the explicit finite difference method,the central difference scheme is used in space,and the time is optimized from the forward difference scheme to the central difference scheme.The temporal central difference scheme is also called the leapfrog scheme.For testing and experimental purposes,we used a simple cuboid flow channel for simulation.Through numerical simulation,the output parameters at different time steps,such as the height and speed of the water flow,are obtained,and then these parameters are processed and visualized.We have successively completed serial implementation,smallscale implementation of Open MP,parallel implementation of MPI+Open MP,small-scale implementation of Open CL.Based on these previous implementations,a large-scale heterogeneous parallel implementation based on MPI,Open MP,Pthread,and Open CL has been completed on domestic advanced computing systems “Sun Rising-1”.The heterogeneous strategy is then optimized by running logic optimization,overlapping computing communication,work group optimization,and local memory optimization.And multi-angle strong and weak expansion tests and acceleration performance comparisons are carried out.Finally,a heterogeneous parallel solution for the two-dimensional large-scale Saint-Venant equations with high scalability is obtained. |