TriMe++: Multi-threaded triangular meshing in two dimensions

IF 7.2 2区 物理与天体物理 Q1 COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS
Jiayin Lu , Chris H. Rycroft
{"title":"TriMe++: Multi-threaded triangular meshing in two dimensions","authors":"Jiayin Lu ,&nbsp;Chris H. Rycroft","doi":"10.1016/j.cpc.2024.109442","DOIUrl":null,"url":null,"abstract":"<div><div>We present <span>TriMe++</span>, a multi-threaded software library designed for generating two-dimensional meshes for intricate geometric shapes using the Delaunay triangulation. Multi-threaded parallel computing is implemented throughout the meshing procedure, making it suitable for fast generation of large-scale meshes. Three iterative meshing algorithms are implemented: the DistMesh algorithm, the centroidal Voronoi diagram meshing, and a hybrid of the two. We compare the performance of the three meshing methods in <span>TriMe++</span>, and show that the hybrid method retains the advantages of the other two. The software library achieves significant parallel speedup when generating large-scale meshes containing between 10<sup>4</sup> to 10<sup>7</sup> points. <span>TriMe++</span> can handle complicated geometries and generates adaptive meshes of high quality.</div></div><div><h3>Program summary</h3><div><em>Program title:</em> <span>TriMe++</span></div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/jxcsxtywtw.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/jiayinlu19960224/TriMe</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> BSD 3-clause</div><div><em>Programming language:</em> C++</div><div><em>External routines/libraries:</em> OpenMP, multi-threaded <span>Voro++</span></div><div><em>Nature of problem:</em> Multi-threaded geometry meshing in two dimension using the Delaunay triangulation</div><div><em>Solution method:</em> The <span>TriMe++</span> library is built around several C++ classes that follows a structured meshing pipeline. During initialization, the <span>shape_2d</span> class reads the geometry input and generates a signed distance field using a grid-based data structure to represent the shape. The <span>sizing_2d</span> class subsequently produces adaptive element sizing and density fields for the mesh. It uses an adaptive quad-tree data structure, enabling efficient refinement of sizing and density values in areas with complex geometries. In the meshing procedure, the <span>parallel_meshing_2d</span> class iteratively improves point positions in the mesh. In each meshing iteration, the multi-threaded <span>Voro++</span> library generates the Delaunay triangulation of the points. Users can select from three meshing algorithms, the DistMesh algorithm in the <span>mesh_alg_2d_dm</span> class, the centroidal Voronoi diagram meshing algorithm in the <span>mesh_alg_2d_cvd</span> class, and a hybrid method of the two in the <span>mesh_alg_2d_hybrid</span> class Throughout this meshing workflow, we use OpenMP for multi-threaded parallel computations.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"308 ","pages":"Article 109442"},"PeriodicalIF":7.2000,"publicationDate":"2024-11-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computer Physics Communications","FirstCategoryId":"101","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0010465524003655","RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS","Score":null,"Total":0}
引用次数: 0

Abstract

We present TriMe++, a multi-threaded software library designed for generating two-dimensional meshes for intricate geometric shapes using the Delaunay triangulation. Multi-threaded parallel computing is implemented throughout the meshing procedure, making it suitable for fast generation of large-scale meshes. Three iterative meshing algorithms are implemented: the DistMesh algorithm, the centroidal Voronoi diagram meshing, and a hybrid of the two. We compare the performance of the three meshing methods in TriMe++, and show that the hybrid method retains the advantages of the other two. The software library achieves significant parallel speedup when generating large-scale meshes containing between 104 to 107 points. TriMe++ can handle complicated geometries and generates adaptive meshes of high quality.

Program summary

Program title: TriMe++
CPC Library link to program files: https://doi.org/10.17632/jxcsxtywtw.1
Developer's repository link: https://github.com/jiayinlu19960224/TriMe
Licensing provisions: BSD 3-clause
Programming language: C++
External routines/libraries: OpenMP, multi-threaded Voro++
Nature of problem: Multi-threaded geometry meshing in two dimension using the Delaunay triangulation
Solution method: The TriMe++ library is built around several C++ classes that follows a structured meshing pipeline. During initialization, the shape_2d class reads the geometry input and generates a signed distance field using a grid-based data structure to represent the shape. The sizing_2d class subsequently produces adaptive element sizing and density fields for the mesh. It uses an adaptive quad-tree data structure, enabling efficient refinement of sizing and density values in areas with complex geometries. In the meshing procedure, the parallel_meshing_2d class iteratively improves point positions in the mesh. In each meshing iteration, the multi-threaded Voro++ library generates the Delaunay triangulation of the points. Users can select from three meshing algorithms, the DistMesh algorithm in the mesh_alg_2d_dm class, the centroidal Voronoi diagram meshing algorithm in the mesh_alg_2d_cvd class, and a hybrid method of the two in the mesh_alg_2d_hybrid class Throughout this meshing workflow, we use OpenMP for multi-threaded parallel computations.
TriMe++:多线程三角形网格在二维
我们介绍了trime++,一个多线程软件库,用于使用Delaunay三角剖分生成复杂几何形状的二维网格。在整个网格划分过程中实现了多线程并行计算,适用于大规模网格的快速生成。实现了三种迭代网格划分算法:DistMesh算法、质心Voronoi图网格划分以及两者的混合。比较了三种网格划分方法在trime++中的性能,表明混合方法保留了另外两种方法的优点。当生成包含104到107个点的大规模网格时,软件库实现了显著的并行加速。trime++可以处理复杂的几何图形并生成高质量的自适应网格。程序摘要程序标题:trime++ CPC库链接到程序文件:https://doi.org/10.17632/jxcsxtywtw.1Developer's存储库链接:https://github.com/jiayinlu19960224/TriMeLicensing条款:BSD 3- clause编程语言:c++外部例程/库:OpenMP,多线程voro++问题的性质:多线程几何网格在二维使用Delaunay三角解决方案方法:trime++库是围绕几个遵循结构化网格管道的c++类构建的。在初始化期间,shape_2d类读取几何输入,并使用基于网格的数据结构生成带符号距离字段来表示形状。sizing_2d类随后为网格生成自适应的元素大小和密度场。它使用自适应四叉树数据结构,能够在具有复杂几何形状的区域中有效地细化大小和密度值。在网格划分过程中,parallel_meshing_2d类迭代地改进网格中的点位置。在每次网格迭代中,多线程voro++库生成点的Delaunay三角剖分。用户可以选择三种网格划分算法,即mesh_alg_2d_dm类中的DistMesh算法,mesh_alg_2d_cvd类中的质心Voronoi图网格划分算法,以及mesh_alg_2d_hybrid类中两者的混合方法。在整个网格划分工作流程中,我们使用OpenMP进行多线程并行计算。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Computer Physics Communications
Computer Physics Communications 物理-计算机:跨学科应用
CiteScore
12.10
自引率
3.20%
发文量
287
审稿时长
5.3 months
期刊介绍: The focus of CPC is on contemporary computational methods and techniques and their implementation, the effectiveness of which will normally be evidenced by the author(s) within the context of a substantive problem in physics. Within this setting CPC publishes two types of paper. Computer Programs in Physics (CPiP) These papers describe significant computer programs to be archived in the CPC Program Library which is held in the Mendeley Data repository. The submitted software must be covered by an approved open source licence. Papers and associated computer programs that address a problem of contemporary interest in physics that cannot be solved by current software are particularly encouraged. Computational Physics Papers (CP) These are research papers in, but are not limited to, the following themes across computational physics and related disciplines. mathematical and numerical methods and algorithms; computational models including those associated with the design, control and analysis of experiments; and algebraic computation. Each will normally include software implementation and performance details. The software implementation should, ideally, be available via GitHub, Zenodo or an institutional repository.In addition, research papers on the impact of advanced computer architecture and special purpose computers on computing in the physical sciences and software topics related to, and of importance in, the physical sciences may be considered.
×
引用
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学术文献互助群
群 号:604180095
Book学术官方微信