GPU-based parallel tetrahedral mesh generation method and aircraft profile design method
Through the GPU-based parallel Delaunay tetrahedral mesh generation method, the problems of large-scale mesh generation time and resource consumption in the prior art are solved, and large-scale mesh generation is quickly generated with reliable quality and improved grid generation efficiency.
Patent Information
- Application Number
- CN202510086795.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-01-20
AI Technical Summary
The prior art is difficult to quickly generate large-scale grids with reliable quality, resulting in huge consumption of grid generation time and computing resources, and greatly reducing parallel efficiency in practical applications.
Using the GPU-based parallel Delaunay tetrahedral mesh generation method, the minimum distance and size ratio of the tetrahedron is calculated simultaneously through multiple GPU threads, tetrahedrons that do not meet the size requirements are selected, and multiple rounds of cavity growth, cavity repair and reconnection are carried out until all tetrahedrons meet the size requirements.
It realizes the rapid generation of large-scale tetrahedral mesh with reliable quality under the use of GPU parallel computing capabilities, which improves the rate and efficiency of mesh generation and avoids conflicts between synchronous growth cavity.
Smart Images

Figure CN120124181A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of numerical simulation, and in particular relates to a GPU-based parallel tetrahedron mesh generation method and an aircraft shape design method. Background Art
[0002] Mesh generation is a pre-processing process in numerical simulation techniques such as the finite element method, finite volume method, and finite difference method. This process divides a continuous geometric region into a combination of a finite number of basic geometric shapes, which are called mesh units. Common unit types include triangular units, quadrilateral units, tetrahedral units, and hexahedral units. The number and quality of mesh units have a direct impact on the accuracy and efficiency of numerical calculations. In order to meet the needs of high-precision complex model simulation, large-scale mesh generation is often used in industry, resulting in huge time consumption and computing resource overhead. How to quickly generate large-scale meshes with reliable quality has become an urgent problem to be solved in the field of mesh generation.
[0003] Delaunay triangulation has attracted the attention of researchers from the fields of computational geometry and numerical simulation due to its unique advantages such as good mathematical foundation, fast and efficient, and good quality of generated units, and has gradually become one of the mainstream methods in the field of mesh generation. Domestic and foreign researchers have proposed some multi-threaded parallel algorithms based on CPU. The theory shows that the parallel efficiency of Delaunay triangulation algorithm is high, but when used for actual mesh generation, its parallel efficiency is greatly reduced.
[0004] A GPU (Graphics Processing Unit) is a specialized electronic circuit designed to render display graphics to an output device. Unlike a CPU, which has a limited number of cores, a GPU is capable of running thousands or even tens of thousands of processing cores simultaneously. Although these cores run slower than CPU cores, they excel at the mathematical operations required for graphics rendering. This high degree of parallelism enables GPUs to be used for general-purpose computing. In recent years, with the increase in GPU computing power, the decrease in cost, and the widespread availability, using GPUs for mesh generation has become a viable option. Summary of the invention
[0005] The purpose of the present invention is to provide a GPU-based parallel Delaunay tetrahedron mesh generation method to meet the needs of large-scale unstructured grid generation in three-dimensional space, quickly generate large-scale grids with reliable quality based on three-dimensional geometric models, improve the rate of grid generation, and assist in the rapid optimization of aircraft shape design.
[0006] In a first aspect, the present invention provides a method for generating a parallel tetrahedron mesh based on a GPU, characterized in that it comprises the following steps: Step 1: Generate a triangular mesh covering the surface of the 3D geometric model; generate an initial tetrahedral mesh based on the triangular mesh.
[0007] Step 2: Use multiple GPU threads to simultaneously calculate the minimum distance size ratio of each tetrahedron; and based on the minimum distance size ratio, screen out the tetrahedrons that do not meet the size requirements in the tetrahedral mesh. Take some or all of the tetrahedrons that do not meet the size requirements as the starting tetrahedrons.
[0008] Step 3: Use multiple GPU threads to simultaneously perform multiple rounds of cavity growth on multiple starting tetrahedrons to obtain a set of non-overlapping cavities.
[0009] Step 4: Use multiple GPU threads to simultaneously set priorities according to the number of tetrahedrons; delete some cavities according to the priorities so that there are no common faces between the remaining cavities; and repair the remaining cavities.
[0010] Step 5: Use multiple GPU threads to simultaneously reconnect the cavities obtained in Step 4 to obtain an updated tetrahedral mesh.
[0011] Step 6: Repeat Steps 2 to 5 until all tetrahedrons meet the size requirements.
[0012] Preferably, part or all of the arrays recording the tetrahedral mesh information adopt a block storage structure; the block storage structure includes one or more expandable data blocks; in the block storage structure, a pointer array is used to index the starting address of each data block. When the space of all data blocks in an array is exhausted, the array adds one or more new data blocks, thus effectively solving problems such as space allocation, data copying, and memory fragmentation caused by frequent array expansion.
[0013] Preferably, the arrays recording the tetrahedral mesh information include the number of vertices, the number of tetrahedrons, the vertex array, the tetrahedron array, the neighbor tetrahedron array, the first cavity marking array, and the second cavity marking array. The vertex array records the coordinates and sizes of the vertices. The first cavity marking array and the second cavity marking array respectively record the tetrahedral cavity marking information before and after the operation.
[0014] Preferably, in Step 2, if the number of tetrahedrons that do not meet the size requirements is less than or equal to the GPU processing threshold, then all the tetrahedrons that do not meet the size requirements are used as the starting tetrahedrons. If the number of tetrahedrons that do not meet the size requirements is greater than the GPU processing threshold, then take part of the tetrahedrons less than or equal to the GPU processing threshold as the starting tetrahedrons. The GPU processing threshold is 2 or 4 or 8 or 16 times the number of GPU stream processors.
[0015] Preferably, in step two, when the number of tetrahedrons that do not meet the size requirements reaches the GPU processing threshold, stop taking the remaining tetrahedrons as the starting tetrahedrons.
[0016] Preferably, in step three, the process of cavity growth is as follows: Select expanding tetrahedrons starting from the starting tetrahedrons; for each starting tetrahedron, perform an inscribed sphere test on all its neighbor tetrahedrons. If the test is successful, modify the cavity mark of the neighbor tetrahedron through atomic operations. If the cavity mark of the neighbor tetrahedron is modified, remove the cavity to which it originally belonged, thus avoiding overlap of different cavities. If the cavity mark of the neighbor tetrahedron is not successfully modified, remove the cavity to which the starting tetrahedron belongs. If the cavity mark of the expanding tetrahedron is modified during the process of modifying the cavity mark of the neighbor tetrahedron, remove the cavity to which the expanding tetrahedron belongs. The above rules can effectively avoid overlap of different cavities.
[0017] Preferably, the process of cavity repair in step five is as follows: First, collect all the tetrahedrons located on the cavity boundary as boundary tetrahedrons. Then, calculate the directed volume of the tetrahedron formed by the cavity boundary surface and the candidate insertion point. If the obtained directed volume is positive, it indicates that the cavity boundary surface is valid; if the obtained directed volume is negative, remove the boundary tetrahedron from the cavity. Next, remove the isolated tetrahedrons generated in the cavity. Repeat the above process until all cavity boundary surfaces are valid.
[0018] In a second aspect, the present invention provides an aircraft shape design method, which includes the following steps: Step one, perform tetrahedral mesh generation on the initial three-dimensional geometric model of the aircraft through a parallel tetrahedral mesh generation method based on GPU as described in claim 1.
[0019] Step two, optimize the tetrahedral mesh generated in step one.
[0020] Step three, perform numerical simulation on the optimized tetrahedral mesh to determine whether the aircraft shape meets the design requirements. If it does not meet the requirements, adjust the aircraft shape design and re-execute step one and step two until an aircraft shape that meets the requirements is obtained.
[0021] In a third aspect, the present invention provides a parallel tetrahedral mesh generation system based on a GPU, which is used to execute the aforementioned parallel tetrahedral mesh generation method based on a GPU. The parallel tetrahedral mesh generation system includes a storage module and a graphics processing unit. The graphics processing unit is provided with a size inspection module, a cavity growth module, an independent cavity screening module, a cavity repair module, and a cavity reconnecting module. The storage module is used to store tetrahedral mesh data; the size inspection module is used to calculate the minimum distance size ratio of each tetrahedron in parallel and screen out the tetrahedrons that do not meet the size requirements. The cavity growth module is used to grow multiple initial tetrahedrons in parallel to form multiple cavities. The independent cavity screening module is used to delete the cavities with lower priority among the cavities with common faces. The cavity repair module deletes the tetrahedrons with negative directed volume in the cavities. The cavity reconnecting module is used to regenerate the tetrahedrons in the cavities by using the insertion points in the cavities.
[0022] In a fourth aspect, the present invention provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor. The memory stores the computer program; the processor executes the aforementioned parallel tetrahedral mesh generation method based on a GPU.
[0023] The beneficial effects of the present invention are 1. The present invention designs a block-based GPU tetrahedral mesh data structure and implements an efficient parallel tetrahedral mesh generation method based on this data structure. First, calculate the centroid of the tetrahedron and perform size inspection. If the size requirements are not met, use it as a starting point for multi-round iterative cavity growth. Then, select independent cavities with non-overlapping boundaries through a coloring algorithm. Next, repair these cavities through multi-round iterations to ensure that the directed volume of the tetrahedron formed by the cavity boundary surface and the candidate insertion point is positive. Finally, perform cavity reconnecting and update the topological information and neighbor information of the mesh. The above steps are repeated until all tetrahedrons meet the size requirements; based on the above process, the present invention can improve the mesh refinement efficiency by using the parallel computing power of the GPU while avoiding conflicts between simultaneously growing cavities, thereby realizing the rapid generation of high-quality large-scale tetrahedral meshes.
[0024] 2. The mesh generation method of the present invention can perform numerical simulation of the three-dimensional geometric model of the aircraft, and then realize the optimization of the aircraft shape design; at the same time, since the present invention can quickly generate high-quality large-scale tetrahedral meshes, the efficiency of aircraft shape design optimization is significantly improved, and the invention is also suitable for the large-scale tetrahedral mesh generation requirements of other complex models. Description of the Drawings
[0025] Figure 1 It is a schematic diagram of the block storage structure used in Embodiment 1 of the present invention; Figure 2 Schematic diagram for calculating the ratio of the centroid of a tetrahedron to the distance dimension in Embodiment 1 of the present invention; Figure 3 Schematic two-dimensional process diagram of cavity growth in Step 2 of Embodiment 1 of the present invention; Figure 4 Schematic two-dimensional process diagram of independent cavity screening in Step 3 of Embodiment 1 of the present invention; Figure 5 Surface mesh diagram generated for the Bomb model in Embodiment 1 of the present invention; Figure 6 Sectional view of tetrahedral mesh generated for the Bomb model in Embodiment 1 of the present invention. Detailed implementation manners
[0026] The present invention will be further described below with reference to the accompanying drawings.
[0027] Embodiment 1 A parallel tetrahedral mesh generation method based on GPU includes the following steps: Step 0: Design the GPU tetrahedral mesh data structure based on block as follows: The GPU tetrahedral mesh data structure includes the number of vertices, the number of tetrahedrons, vertex array, tetrahedron array, neighbor tetrahedron array, first cavity flag array, and second cavity flag array. The number of vertices, the number of tetrahedrons, tetrahedron array, neighbor tetrahedron array, first cavity flag array, and second cavity flag array adopt integer data types. The vertex array adopts double-precision floating-point data type.
[0028] The vertex array, tetrahedron array, neighbor tetrahedron array, first cavity flag array, and second cavity flag array adopt block storage structures.
[0029] As Figure 1 shown, the block storage structure includes one or more expandable data blocks; in the block storage structure, a pointer array is used to index the starting address of each data block. When the space of all data blocks in a certain array is exhausted, one or more new data blocks are added to this array, thus effectively solving problems such as space allocation, data copying, and memory fragmentation caused by frequent array expansion.
[0030] In the vertex array, each vertex is stored using 4 consecutive variables. In addition to the x, y, and z coordinates, it also includes the size of the vertex. In the tetrahedron array, the indices of the 4 vertices corresponding to each tetrahedron are stored; in the neighbor tetrahedron array, the indices of the 4 adjacent tetrahedrons corresponding to each tetrahedron are stored, and the two are stored in different arrays.
[0031] To efficiently traverse in tetrahedral meshing, the i-th face is defined as the face opposite to the i-th vertex in a tetrahedron, and the i-th neighbor tetrahedron refers to the tetrahedron adjacent to the i-th face of the current tetrahedron. To solve the label conflict problem during cavity construction, a first cavity label array and a second cavity label array are used to store the tetrahedral cavity label information before and after specific operations respectively.
[0032] Generate a triangular mesh covering the surface of the target 3D geometric model; then generate an initial CDT (Constrained Delaunay Triangulation) covering the computational domain.
[0033] Step 1: Calculate the centroid of each obtained tetrahedron and perform a size check. Tetrahedrons that do not meet the size requirements are used as the input for subsequent cavity growth, as follows: As Figure 2 shown, first calculate the centroid of the tetrahedron : (1) where represents the coordinates of the -th vertex of the tetrahedron.
[0034] Then calculate the ratio of the minimum distance between the centroid and each vertex of the tetrahedron to the size : (2) where, represents the distance between the centroid and the -th vertex of the tetrahedron; represents the size value of the -th vertex of the tetrahedron.
[0035] If the ratio of the minimum distance to the size , it means that the tetrahedron does not meet the size requirements and will be used as the starting point for subsequent cavity growth steps. The larger the ratio of the minimum distance to the size , the greater the difference between the tetrahedron and the target size. Such tetrahedrons should be refined first. Therefore, all tetrahedrons that do not meet the size requirements will be sorted in descending order according to the ratio of the minimum distance to the size to determine the priority in subsequent steps.
[0036] Maintain an array of tetrahedra that do not meet the size requirements; when the number of tetrahedra in it is greater than the GPU processing threshold, if all these tetrahedra are used as the starting points for the cavity growth step, a large number of conflicts will occur during the cavity growth process, significantly reducing the running speed of the program. To solve this problem, only take a part of the tetrahedra in the array of tetrahedra that do not meet the size requirements and whose number is less than or equal to the GPU processing threshold as the starting points for the cavity growth step, and execute the subsequent steps. The value of the GPU processing threshold is 8 times the number of GPU stream processors.
[0037] Step 2: Obtain a set of non-overlapping cavities through multiple rounds of cavity growth, specifically as follows: 2-1. Initialize the expanding tetrahedron.
[0038] One GPU thread is responsible for one starting tetrahedron; take the starting tetrahedron as the first expanding tetrahedron; in Step 2, each starting tetrahedron generates a cavity correspondingly, and the centroid of the starting tetrahedron is used as the candidate insertion point of the cavity. One cavity corresponds to one or multiple tetrahedra with the same cavity label.
[0039] 2-2. Cavity labeling.
[0040] Perform an InSphere test on the expanding tetrahedron. If the test is successful (the candidate insertion point is inside the circumsphere of the neighbor tetrahedron), then try to modify the cavity label of the neighbor tetrahedron through an atomic operation and take the neighbor tetrahedron as the pending tetrahedron. The modified cavity label corresponds to the index of the starting tetrahedron.
[0041] 2-3. Cavity verification.
[0042] According to the changes in the cavity labels of the expanding tetrahedron and its neighbor tetrahedra in Step 2-2, verify whether the cavities to which the expanding tetrahedron and its neighbor tetrahedra belong are invalid. Specifically, it can be divided into three cases: (1) If the cavity label of the neighbor tetrahedron changes before and after Step 2-2, then the cavity to which the neighbor tetrahedron belonged before Step 2-2 is invalid. (2) If the cavity label of the neighbor tetrahedron after Step 2-2 is inconsistent with the cavity label of the expanding tetrahedron, then the cavity to which the expanding tetrahedron belonged before Step 2-2 is invalid. (3) If the cavity label of the expanding tetrahedron changes before and after Step 2-2, then the cavity to which the expanding tetrahedron belonged before Step 2-2 is invalid.
[0043] 2-4. Cleaning of invalid cavities.
[0044] For the already invalid cavities, it is necessary to clear the cavity labels of all related tetrahedra to prevent affecting subsequent iterations. Collect the neighbor tetrahedra whose cavity labels change and the cavities are not invalid in the current round of iteration as the expanding tetrahedra for the next round of iteration.
[0045] 2-5. Repeat steps 2-2 to 2-4 until the cavity markings of all tetrahedrons no longer change.
[0046] Figure 3 A two-dimensional schematic diagram showing the cavity growth steps is presented. Figure 3 Part (a) corresponds to the initial state. There are 6 candidate insertion points in the figure, represented by hollow circles, and their initial cavities are marked with different colors. The black arrows indicate successful inner sphere tests, and the red arrows indicate failed inner sphere tests. An example of the inner sphere test of a candidate insertion point on neighboring tetrahedrons is also shown in the upper left corner. Figure 3 Part (b) corresponds to the first round of iteration. The growth of a cavity near the bottom fails to a neighboring tetrahedron because its priority is lower than that of other competing cavities, and this cavity and its candidate insertion points are removed from the figure. The growth of the remaining cavities to neighboring tetrahedrons is successful. Figure 3 Part (c) corresponds to the second round of iteration, in which all cavities cannot continue to grow, and the cavity growth step is completed.
[0047] Step 3. Select independent cavities with non-overlapping boundaries from each other through a coloring algorithm, specifically as follows: The present invention selects as many independent cavities as possible through multiple rounds of coloring.
[0048] For each cavity, if its boundary does not overlap with other cavities or its priority is higher than that of all its neighboring cavities, it is preferentially colored.
[0049] Subsequently, all cavities adjacent to the colored cavities are removed.
[0050] Repeating the above process can color as many cavities as possible. The number of coloring rounds in this embodiment is 2. The priority comparison between cavities can be based on the number of tetrahedrons in the cavity; the cavity with more tetrahedrons has a higher priority, so as to preferentially refine large cavities and improve the rate of the method.
[0051] Figure 4 A two-dimensional schematic diagram of the independent cavity screening step is given. Figure 4 Part (a) corresponds to the first round of coloring process. The priority of the middle cavity is higher than that of all its neighboring cavities, and the cavity in the lower right corner is not adjacent to any cavity, so both are marked red. Figure 4 Part (b) corresponds to the first round of deletion process, and all cavities adjacent to the red cavities are deleted. Figure 4 Part (c) corresponds to the second round of coloring process, in which all remaining cavities are marked red, and the independent cavity screening step ends.
[0052] Step 4. Perform multi-round iterative cavity repair so that the directed volume of the tetrahedron formed by each side surface of the cavity and the candidate insertion point is positive, specifically as follows: First, collect all the tetrahedrons located on the cavity boundary as boundary tetrahedrons.
[0053] After that, one GPU thread is responsible for one boundary tetrahedron, and the Orient3d predicate is used to calculate the directed volume of the tetrahedron formed by the cavity boundary surface and the candidate insertion point. If the obtained directed volume is positive, it means that the cavity boundary surface is valid; if the obtained directed volume is negative, the cavity mark corresponding to the boundary tetrahedron is deleted.
[0054] Next, collect all the boundary tetrahedrons with the cavity marks deleted, and verify whether isolated tetrahedrons will be generated in the cavity after deleting these boundary tetrahedrons according to the neighbor information, and delete the cavity marks corresponding to the isolated tetrahedrons.
[0055] Repeat the above steps until all cavity interfaces are valid, and the candidate insertion points of each cavity obtained are used as the final insertion points.
[0056] Step 5: Cavity reconnect, and update the topological information and neighbor information of the mesh, specifically as follows: The present invention adopts a block-based storage structure. When the vertex and tetrahedron arrays cannot accommodate the new data, a new storage block can be allocated for the corresponding array. The insertion points of each cavity will be stored at the end of the vertex array, and for these insertion points, their size values need to be calculated , and the calculation method is:
[0057] (3) where is the number of vertices of the cavity where the insertion point is located; represents the size value of the cavity vertex ; represents the distance between the cavity vertex and the insertion point; is a transition factor, and the recommended value is 1.05.
[0058] For the update of the tetrahedron topological information, all cavities need to be scanned, and the number of tetrahedrons before and after reconnecting for each cavity is recorded respectively, and an available tetrahedron index array is maintained. If the number of available tetrahedron indices is insufficient, the extra tetrahedrons generated by reconnecting will be stored at the end of the tetrahedron array. If the number of available tetrahedron indices exceeds the number of tetrahedrons required for reconnecting, the extra part will be added to the end of the free tetrahedron array for use in the cavity reconnecting link in subsequent iteration rounds.
[0059] The update of the neighbor relationship between tetrahedrons inside the cavity can be achieved by linear search. One GPU thread is responsible for updating the neighbor relationship between a tetrahedron in the cavity and the remaining tetrahedrons in the cavity. For the update of the neighbor relationship between the tetrahedrons inside the cavity and the external tetrahedrons, all cavities need to be scanned before the tetrahedron topology information is updated. An additional array is used to record the information of the external tetrahedrons of the cavity. After the tetrahedron topology information is updated, the neighbor relationship can be efficiently updated through this array.
[0060] Step 6: Repeat Steps 1 to 5 until the tetrahedron array that does not meet the size requirements is empty, that is, all tetrahedrons meet the size requirements.
[0061] In this embodiment, specifically, a mesh generation is performed on the Bomb model, and the obtained surface mesh is as Figure 5 shown, and the tetrahedron mesh generation result is as Figure 6 shown; Table 1 gives the time statistics results of the mesh generation of the present invention for this model under different size input conditions. For tens of millions and hundreds of millions of meshes, the rate of the present invention can exceed 12 million cells per second, having a high generation rate and good scalability, and can significantly improve the efficiency of the aircraft shape design optimization.
[0062] Table 1 Time Statistics of Bomb Model Generation under Different Size Input Conditions Number of input units Number of units CPU to GPU transfer time (s) GPU to CPU transfer time (s) GPU refinement time (s) Total time (s) Millions of units per second 236,118 4,876,951 0.0164 0.0274 0.6941 0.7379 6.6095 364,400 9,160,756 0.0181 0.0498 1.0639 1.1318 8.0942 639,101 20,889,225 0.0184 0.1111 1.5192 1.6487 12.6703 916,528 34,343,718 0.0189 0.2127 2.5078 2.7394 12.5372 1,416,242 65,553,627 0.0200 0.3863 4.4099 4.8162 13.6114 2,508,665 149,824,549 0.0228 0.8617 10.5618 11.4463 13.0894 3,336,334 231,959,025 0.0244 1.3380 16.7088 18.0712 12.8358 4,663,098 378,715,871 0.0273 2.2021 28.9512 31.1806 12.1459 5,392,112 465,738,857 0.0286 2.6747 36.7286 39.4319 11.8112 Embodiment 2 An aircraft shape design method includes the following steps: Step 1: Perform tetrahedron mesh generation on the initial three-dimensional geometric model of the aircraft by using the parallel tetrahedron mesh generation method provided in Embodiment 1. In this embodiment, the aircraft is a missile or an airplane.
[0063] Step 2: Optimize the tetrahedron mesh generated in Step 1.
[0064] Step 3: Perform numerical simulation on the optimized tetrahedron mesh to determine whether the aircraft shape meets the design requirements. If it does not meet the requirements, adjust the aircraft shape design and re-execute Steps 1 and 2 until a conforming aircraft shape is obtained.
[0065] Embodiment 3 A GPU-based parallel tetrahedral mesh generation system, comprising a storage module and a graphics processing unit. The graphics processing unit is provided with a size inspection module, a cavity growth module, an independent cavity screening module, a cavity repair module and a cavity reconnecting module. The storage module is used for storing tetrahedral mesh data; the size inspection module is used for calculating the minimum distance size ratio of each tetrahedron in parallel and screening out the tetrahedrons that do not meet the size requirements. The cavity growth module is used for growing a plurality of initial tetrahedrons in parallel to form a plurality of cavities. The independent cavity screening module is used for deleting the cavities with lower priority among the cavities with common faces. The cavity repair module deletes the tetrahedrons with negative directed volume in the cavities. The cavity reconnecting module is used for regenerating the tetrahedrons in the cavities by using the insertion points in the cavities.
Claims
1. A GPU-based parallel tetrahedron mesh generation method, characterized by: The following steps are involved: Step 1: Generate a triangular mesh covering the surface of the three-dimensional geometric model; Generate an initial tetrahedral mesh based on the triangular mesh; Step 2: Utilize multiple GPU threads to simultaneously calculate the minimum distance-to-size ratio of each tetrahedron; and based on the minimum distance-to-size ratio, screen out tetrahedrons that do not meet the size requirement in the tetrahedron grid; and use some or all of the tetrahedrons that do not meet the size requirement as starting tetrahedrons; Step 3: Use multiple GPU threads to perform multiple rounds of cavity growth on multiple starting tetrahedrons simultaneously to obtain a set of non-overlapping cavities; Step 4: Use multiple GPU threads to set priorities according to the number of tetrahedrons at the same time; delete some cavities according to the priorities so that there are no common faces between the remaining cavities; and repair the remaining cavities; Step 5: Use multiple GPU threads to simultaneously reconnect the cavities obtained in step 4 to obtain an updated tetrahedral mesh; Step 6. Repeat steps 2 to 5 until all tetrahedrons meet the size requirements.
2. The method for generating a parallel tetrahedron mesh based on a GPU according to claim 1, characterized in that: Part or all of the arrays recording tetrahedral mesh information adopt a block storage structure; the block storage structure includes one or more expandable data blocks; in the block storage structure, a pointer array is used to index the starting address of each data block; when the space of all data blocks in an array is exhausted, the array adds one or more new data blocks.
3. The method for generating a parallel tetrahedron mesh based on a GPU according to claim 2, characterized in that: The array recording tetrahedral mesh information includes the number of vertices, the number of tetrahedrons, the vertex array, the tetrahedron array, the neighbor tetrahedron array, the first cavity mark array and the second cavity mark array; the vertex array records the coordinates and sizes of the vertices; the first cavity mark array and the second cavity mark array respectively record the tetrahedron cavity mark information before and after the operation.
4. The method for generating a parallel tetrahedron mesh based on a GPU according to claim 1, characterized in that: In step 2, if the number of tetrahedrons that do not meet the size requirements is less than or equal to the GPU processing threshold, all tetrahedrons that do not meet the size requirements are used as starting tetrahedrons; if the number of tetrahedrons that do not meet the size requirements is greater than the GPU processing threshold, some tetrahedrons that are less than or equal to the GPU processing threshold are taken as starting tetrahedrons.
5. The method for generating a parallel tetrahedron mesh based on a GPU according to claim 4, characterized in that: In step 2, when the number of tetrahedrons that do not meet the size requirement reaches the GPU processing threshold, the remaining tetrahedrons are stopped from being used as starting tetrahedrons.
6. The method for generating a parallel tetrahedron mesh based on a GPU according to claim 1, characterized in that: In step 3, the process of cavity growth is as follows: the expansion tetrahedron is selected starting from the starting tetrahedron; for each starting tetrahedron, the inner sphere test is performed on all its neighbor tetrahedrons; if the test is successful, the cavity mark of the neighbor tetrahedron is modified through atomic operations; If the neighbor tetrahedron cavity label is modified, the cavity it originally belongs to is removed to avoid overlapping of different cavities; If the neighbor tetrahedron cavity mark is not successfully modified, the cavity to which the starting tetrahedron belongs is removed; if the cavity mark of the expanded tetrahedron is modified during the process of modifying the neighbor tetrahedron cavity mark, the cavity to which the expanded tetrahedron belongs is removed.
7. The method for generating parallel tetrahedral mesh based on GPU according to claim 1, characterized in that: The process of cavity repair in step five is as follows: first, collect all tetrahedrons located on the cavity boundary as boundary tetrahedrons; then, calculate the directed volume of the tetrahedron formed by the cavity boundary surface and the candidate insertion point; if the obtained directed volume is a positive value, it means that the cavity boundary surface is valid; if the obtained directed volume is a negative value, the boundary tetrahedron is removed from the cavity; then, remove the isolated tetrahedrons generated in the cavity; repeat the above process until all cavity boundary surfaces are valid.
8. A method for designing an aircraft shape, characterized in that: The following steps are involved: Step 1: generating a tetrahedral mesh of an initial three-dimensional geometric model of the aircraft by using a GPU-based parallel tetrahedral mesh generation method as claimed in claim 1; Step 2: Optimize the tetrahedral mesh generated in step 1; Step 3: Perform numerical simulation on the optimized tetrahedral mesh to determine whether the aircraft shape meets the design requirements; if not, adjust the aircraft shape design and re-execute steps 1 and 2 until a satisfactory aircraft shape is obtained.
9. A GPU-based parallel tetrahedron mesh generation system, characterized by: Used to execute a GPU-based parallel tetrahedron mesh generation method as described in claim 1; the parallel tetrahedron mesh generation system includes a storage module and a graphics processing unit; the graphics processing unit is provided with a size checking module, a cavity growth module, an independent cavity screening module, a cavity repair module and a cavity reconnection module; the storage module is used to store tetrahedron mesh data; the size checking module is used to parallelly calculate the minimum distance size ratio of each tetrahedron and screen out tetrahedrons that do not meet the size requirements; the cavity growth module is used to grow multiple initial tetrahedrons in parallel to form multiple cavities; the independent cavity screening module is used to delete cavities with lower priority in cavities with common faces; the cavity repair module deletes tetrahedrons with negative directed volumes in the cavity; the cavity reconnection module is used to regenerate tetrahedrons in the cavity using insertion points in the cavity.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: The memory stores a computer program; the processor executes a GPU-based parallel tetrahedron mesh generation method as described in any one of claims 1-8.
Citation Information
Patent Citations
Parallel constraint tetrahedral mesh optimization method based on lock-free atom operation
CN117786912A
Synthesizing high resolution 3D shapes from lower resolution representations for synthetic data generation systems and applications
US20240296627A1
Cited By
Geometric model quadrilateral mesh generation method and system based on GPU parallelism
CN120526086A
A GPU-based parallel method and system for generating quadrilateral meshes for geometric models
CN120526086B
Parallel tetrahedral mesh optimization method, system and equipment based on GPU (Graphics Processing Unit) and medium
CN120635366A
Gpu-based parallel tetrahedral mesh optimization method, system, device, and medium
CN120635366B