科学计算库的自动回归测试方法:SPHinXsys 示例

IF 2.5 3区 工程技术
Bo Zhang, Chi Zhang, Xiangyu Hu
{"title":"科学计算库的自动回归测试方法:SPHinXsys 示例","authors":"Bo Zhang, Chi Zhang, Xiangyu Hu","doi":"10.1007/s42241-024-0042-6","DOIUrl":null,"url":null,"abstract":"<p>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 verified. 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 scientific computing library, its underlying principles are generic and can be easily adapted for use with other libraries, achieving equal effectiveness.</p>","PeriodicalId":637,"journal":{"name":"Journal of Hydrodynamics","volume":null,"pages":null},"PeriodicalIF":2.5000,"publicationDate":"2024-07-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Automated regression test method for scientific computing libraries: Illustration with SPHinXsys\",\"authors\":\"Bo Zhang, Chi Zhang, Xiangyu Hu\",\"doi\":\"10.1007/s42241-024-0042-6\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<p>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 verified. 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 scientific computing library, its underlying principles are generic and can be easily adapted for use with other libraries, achieving equal effectiveness.</p>\",\"PeriodicalId\":637,\"journal\":{\"name\":\"Journal of Hydrodynamics\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":2.5000,\"publicationDate\":\"2024-07-26\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Journal of Hydrodynamics\",\"FirstCategoryId\":\"5\",\"ListUrlMain\":\"https://doi.org/10.1007/s42241-024-0042-6\",\"RegionNum\":3,\"RegionCategory\":\"工程技术\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Hydrodynamics","FirstCategoryId":"5","ListUrlMain":"https://doi.org/10.1007/s42241-024-0042-6","RegionNum":3,"RegionCategory":"工程技术","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

科学计算库,无论是内部库还是开源库,都见证了工程和科学研究的巨大进步。因此,重要的是要确保由错误修复或新功能开发引起的源代码修改不会损害已经验证和确认的准确性和功能性。本文以开源多物理场库 SPHinXsys 为例,介绍了一种建立和实施自动回归测试环境的方法。最初,每个基准测试的参考数据库都是根据多次执行中的观测数据生成的。这个综合数据库囊括了不同策略的最大指标变化范围,包括时间平均法、集合平均法和动态时间扭曲法。它考虑到了并行计算、粒子松弛、物理不稳定性等引起的不确定性。随后,源代码修改后获得的新结果将根据与参考数据库的曲线相似性对比进行测试。每当源代码更新时,所有测试用例都会自动执行回归测试,从而对当前结果的有效性进行全面评估。该回归测试环境已成功应用于 SPHinXsys 中的所有动态测试案例,包括流体动力学、固体力学、流固耦合、热扩散和质量扩散、反应扩散及其多物理耦合,并展示了测试不同问题的强大能力。值得注意的是,虽然当前的测试环境是为特定的科学计算库构建和实施的,但其基本原理是通用的,可以轻松地调整用于其他库,实现同等效果。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Automated regression test method for scientific computing libraries: Illustration with SPHinXsys

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 verified. 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 scientific computing library, its underlying principles are generic and can be easily adapted for use with other libraries, achieving equal effectiveness.

求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
12.00%
发文量
2374
审稿时长
4.6 months
期刊介绍: Journal of Hydrodynamics is devoted to the publication of original theoretical, computational and experimental contributions to the all aspects of hydrodynamics. It covers advances in the naval architecture and ocean engineering, marine and ocean engineering, environmental engineering, water conservancy and hydropower engineering, energy exploration, chemical engineering, biological and biomedical engineering etc.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信