高级检索

基于WebAssembly和WebGPU的在线高效有限元计算

Online Efficient Finite Element Calculation Based on WebAssembly and WebGPU

  • 摘要: 针对目前缺少既能通过网页浏览器便捷访问, 又能利用本地计算资源在浏览器中进行高效计算的在线有限元计算平台的问题, 提出基于WebAssembly和WebGPU的浏览器端在线有限元计算方法. 在有限元方程组求解过程中, 分析预处理共轭梯度法、系数矩阵的存储方式以及预处理共轭梯度法的GPU并行化方法, 确定关键算法; 利用WebAssembly和WebGPU进行编程, 搭建在线有限元计算平台. 选取单元和节点数不同的有限元模型进行热传导计算和结构计算数值实验. 结果表明, 在浏览器中, 基于WebAssembly的串行有限元计算的计算效率与本地C++程序的接近, 基于WebGPU的并行有限元计算在百万维度方程组求解中表现出数十倍的加速效果, 可实现在线高效计算.

     

    Abstract: In response to the lack of platforms for online finite element calculation that can be easily accessed through Web browsers and perform efficient computing in Web browsers using local computing resources, a method of online finite element calculation based on WebAssembly and WebGPU in Web browsers is proposed. In the process of solving finite element systems, preconditioned conjugate gradient method, the way a coefficient matrix is stored and the parallelization of preconditioned conjugate gradient method on GPU platform are discussed and the key algorithm is determined. WebAssembly and WebGPU are used for programming and establishing a platform for online finite element calculation. Finite element models with different element and node number were selected for numerical experiments of heat conduction calculation and structural calculation. The results demonstrate that in the Web browser, the computing efficiency of serial finite element calculation based on WebAssembly is close to that of native C++ program and the parallel finite element calculation based on WebGPU shows a speedup of two orders of magnitude in solving million-dimensional systems, which achieves online efficient computing.

     

/

返回文章
返回