水动力学研究与进展B辑2024,Vol.36Issue(3) :466-478.DOI:10.1007/s42241-024-0042-6

Automated regression test method for scientific computing libraries:Illustra-tion with SPHinXsys

Bo Zhang Chi Zhang Xiangyu Hu
水动力学研究与进展B辑2024,Vol.36Issue(3) :466-478.DOI:10.1007/s42241-024-0042-6

Automated regression test method for scientific computing libraries:Illustra-tion with SPHinXsys

Bo Zhang 1Chi Zhang 1Xiangyu Hu1
扫码查看

作者信息

  • 1. TUM School of Engineering and Design,Technical University of Munich,Munich,Germany
  • 折叠

Abstract

Scientific computing libraries,whether in-house or open-source,have witnessed enormous progress in both engineering and scientific research.Therefore,it is important to ensure that modifications to the source code,prompted by bug fixing or new feature development,do not compromise the accuracy and functionality that have been already validated and verifiied.This paper introduces a method for establishing and implementing an automatic regression test environment,using the open-source multi-physics library SPHinXsys as an illustrative example.Initially,a reference database for each benchmark test is generated from observed data across multiple executions.This comprehensive database encapsulates the maximum variation range of metrics for different strategies,including the time-averaged,ensemble-averaged,and dynamic time warping methods.It accounts for uncertainties arising from parallel computing,particle relaxation,physical instabilities,and more.Subsequently,new results obtained after source code modifications undergo testing based on a curve-similarity comparison against the reference database.Whenever the source code is updated,the regression test is automatically executed for all test cases,providing a comprehensive assessment of the validity of the current results.This regression test environment has been successfully implemented in all dynamic test cases within SPHinXsys,including fluid dynamics,solid mechanics,fluid-structure interaction,thermal and mass diffusion,reaction-diffusion,and their multi-physics couplings,and demonstrates robust capabilities in testing different problems.It is noted that while the current test environment is built and implemented for a particular scientifiic computing library,its underlying principles are generic and can be easily adapted for use with other libraries,achieving equal effectiveness.

Key words

Scientific computing/open-source library/verification and validation/regression test/automatic test environment/curve similarity comparison/smoothed particle hydrodynamics

引用本文复制引用

基金项目

China Scholarship Council(202006230071)

Deutsche Forschungsgemeinschaft(DFG)(DFG HU 1527/12-4)

出版年

2024
水动力学研究与进展B辑
中国船舶科学研究中心

水动力学研究与进展B辑

CSTPCDEI
影响因子:0.596
ISSN:1001-6058
段落导航相关论文