A GPU-based parallel tetrahedron mesh generation method and aircraft shape design method
Through the GPU-based parallel Delaunay tetrahedral mesh generation method, the parallel computing and block storage structure of multiple GPU threads is used to solve the problem of quickly generating large-scale mesh with reliable quality, and improve the grid generation rate and aircraft appearance design efficiency.
Patent Information
- Application Number
- CN202510086795.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-08-12
- 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 grid generation time consumption and computing resource overhead, and the efficiency of CPU parallel algorithms in practical applications is reduced.
The parallel Delaunay tetrahedral mesh generation method based on GPU is adopted to calculate the minimum distance and size ratio of the tetrahedral in parallel through multiple GPU threads, filter the tetrahedral that does not meet the size requirements, and perform multiple rounds of cavity growth, repair and reconnection, and optimize memory management using the blocked storage structure to achieve efficient generation.
It realizes the rapid generation of large-scale tetrahedral mesh with reliable quality, improves the grid generation rate, significantly improves the optimization efficiency of aircraft appearance design, and is suitable for large-scale tetrahedral mesh generation of other complex models.
Smart Images

Figure CN120124181B_ABST
Abstract
Description
Technical Field
[0001] The present 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 elements. Commonly used element types include triangular elements, quadrilateral elements, tetrahedral elements, and hexahedral elements. The number and quality of mesh elements have a direct impact on the accuracy and efficiency of numerical calculations. In order to meet the needs of high-precision simulation of complex models, 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, with its unique advantages, including a strong mathematical foundation, rapid and efficient generation, and high-quality generated elements, has attracted the attention of researchers in fields such as computational geometry and numerical simulation, and has gradually become a mainstream method in the field of mesh generation. Researchers both domestically and internationally have proposed several CPU-based multi-threaded parallel algorithms. While theoretically, these algorithms demonstrate high parallel efficiency, their efficiency is significantly reduced when applied to actual mesh generation.
[0004] A GPU (graphics processing unit) is a specialized electronic circuit designed to render display graphics to an output device. Unlike CPUs, which have a limited number of cores, GPUs are capable of running thousands, or even tens of thousands, of processing cores simultaneously. Although these cores operate slower than CPU cores, they excel at the mathematical calculations required for graphics rendering. This high degree of parallelism makes GPUs suitable for general-purpose computing. In recent years, with the increasing computing power, decreasing costs, and widespread availability of GPUs, 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 demand for large-scale unstructured grid generation in three-dimensional space. It can quickly generate high-quality large-scale grids 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:
[0007] 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.
[0008] Step 2: Use multiple GPU threads to simultaneously calculate the minimum distance-to-size ratio for each tetrahedron. Based on this minimum distance-to-size ratio, filter out tetrahedrons in the tetrahedron mesh that do not meet the size requirements. Use some or all of the tetrahedrons that do not meet the size requirements as starting tetrahedrons.
[0009] 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.
[0010] Step 4: Use multiple GPU threads to set priorities based on the number of tetrahedrons at the same time; delete some cavities according to the priority so that there are no common faces between the remaining cavities; and repair the remaining cavities.
[0011] Step 5: Use multiple GPU threads to simultaneously reconnect the cavities obtained in step 4 to obtain an updated tetrahedral mesh.
[0012] Step 6. Repeat steps 2 to 5 until all tetrahedrons meet the size requirements.
[0013] Preferably, some or all of the arrays recording tetrahedral mesh information utilize a block storage structure; this block storage structure includes one or more expandable data blocks. Within this block storage structure, a pointer array indexes the starting address of each data block. When the space for all data blocks in an array is exhausted, one or more new data blocks are added to the array, effectively resolving issues such as space allocation, data copying, and memory fragmentation associated with frequent array expansion.
[0014] Preferably, the array recording tetrahedron mesh information includes the number of vertices, the number of tetrahedrons, a vertex array, a tetrahedron array, a neighbor tetrahedron array, a first cavity mark array, and a second cavity mark array. The vertex array records the coordinates and dimensions 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.
[0015] Preferably, in step 2, if the number of tetrahedrons that do not meet the size requirement is less than or equal to the GPU processing threshold, all tetrahedrons that do not meet the size requirement are used as starting tetrahedrons. If the number of tetrahedrons that do not meet the size requirement is greater than the GPU processing threshold, some tetrahedrons that are less than or equal to the GPU processing threshold are used as starting tetrahedrons. The GPU processing threshold is 2, 4, 8, or 16 times the number of GPU stream processors.
[0016] Preferably, in step 2, when the number of tetrahedrons that do not meet the size requirement reaches a GPU processing threshold, the remaining tetrahedrons are stopped from being used as starting tetrahedrons.
[0017] Preferably, in step three, the process of cavity growth is: the expanded tetrahedron is selected starting from the starting tetrahedron; for each starting tetrahedron, an inner sphere test is performed on all its neighbor tetrahedrons. If the test is successful, the cavity mark of the neighbor tetrahedron is modified by atomic operation. If the cavity mark of the neighbor tetrahedron is modified, the cavity to which it originally belongs is removed, thereby avoiding overlap of different cavities. If the cavity mark of the neighbor tetrahedron 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 cavity mark of the neighbor tetrahedron, the cavity to which the expanded tetrahedron belongs is removed. The above rules can effectively avoid overlap of different cavities.
[0018] Preferably, the process of cavity repair in step 5 is as follows: first, all tetrahedrons located on the cavity boundary are collected as boundary tetrahedrons. Then, the directed volume of the tetrahedron formed by the cavity boundary surface and the candidate insertion point is calculated. 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. Next, the isolated tetrahedrons generated in the cavity are removed. Repeat the above process until all cavity boundary surfaces are valid.
[0019] In a second aspect, the present invention provides a method for designing an aircraft shape, comprising the following steps:
[0020] Step 1: Generate a tetrahedron mesh for the initial three-dimensional geometric model of the aircraft using the GPU-based parallel tetrahedron mesh generation method as described in claim 1.
[0021] Step 2: Optimize the tetrahedral mesh generated in step 1.
[0022] 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 repeat steps 1 and 2 until the desired shape is achieved.
[0023] In a third aspect, the present invention provides a GPU-based parallel tetrahedron mesh generation system, which is used to execute the aforementioned GPU-based parallel tetrahedron mesh generation method. The parallel tetrahedron 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 reconnection module. The storage module is used to store tetrahedron mesh data; the size inspection module is used to calculate the minimum distance size ratio of each tetrahedron in parallel 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.
[0024] In a fourth aspect, the present invention provides 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 the computer program; and the processor executes the aforementioned GPU-based parallel tetrahedron mesh generation method.
[0025] The beneficial effects of the present invention are
[0026] 1. The present invention designs a block-based GPU tetrahedron mesh data structure, and implements an efficient parallel tetrahedron mesh generation method based on this data structure. First, the center of gravity of the tetrahedron is calculated and the size is checked. If the size requirements are not met, multiple rounds of iterative cavity growth are performed as the starting point. After that, independent cavities with non-overlapping boundaries are selected through a coloring algorithm. These cavities are then repaired through multiple rounds of iterations to ensure that the directed volume of the tetrahedron formed by the cavity boundary surface and the candidate insertion point is positive. Finally, the cavity is reconnected and the topological information and neighbor information of the mesh are updated. The above steps are repeated until all tetrahedrons meet the size requirements. Based on the above process, the present invention is able to improve the mesh refinement efficiency while avoiding conflicts between synchronously growing cavities while utilizing the parallel computing power of the GPU, thereby achieving rapid generation of large-scale tetrahedral meshes with reliable quality.
[0027] 2. The mesh generation method of the present invention is capable of performing numerical simulation of three-dimensional geometric models of aircraft, thereby realizing optimization of aircraft shape design. At the same time, since the present invention can quickly generate large-scale tetrahedral meshes of reliable quality, the efficiency of aircraft shape design optimization is significantly improved. The invention is also suitable for the large-scale tetrahedral mesh generation needs of other complex models. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1This is a schematic diagram of the block storage structure used in Example 1 of the present invention;
[0029] Figure 2 Schematic diagram of calculation of the ratio of the center of gravity of the tetrahedron to the distance dimension in Example 1 of the present invention;
[0030] Figure 3 Schematic diagram of the two-dimensional process of cavity growth in step 2 of Example 1 of the present invention;
[0031] Figure 4 Schematic diagram of a two-dimensional process for screening independent cavities in step 3 of Example 1 of the present invention;
[0032] Figure 5 The surface mesh generated for the bomb model in Example 1 of the present invention;
[0033] Figure 6 This is a tetrahedral mesh cutaway diagram generated for the Bomb model in Example 1 of the present invention. DETAILED DESCRIPTION
[0034] The present invention will be further described below with reference to the accompanying drawings.
[0035] Example 1
[0036] A GPU-based parallel tetrahedron mesh generation method comprises the following steps:
[0037] Step 0: The GPU tetrahedron mesh data structure based on block is designed as follows:
[0038] The GPU tetrahedron mesh data structure includes the number of vertices, the number of tetrahedra, a vertex array, a tetrahedron array, a neighbor tetrahedron array, a first cavity marker array, and a second cavity marker array. The number of vertices, the number of tetrahedra, the tetrahedron array, the neighbor tetrahedron array, the first cavity marker array, and the second cavity marker array use integer data types. The vertex array uses double-precision floating-point data types.
[0039] The vertex array, tetrahedron array, neighbor tetrahedron array, first cavity mark array and second cavity mark array adopt a block storage structure.
[0040] like Figure 1 As shown, the block storage structure includes one or more expandable data blocks. Within the block storage structure, a pointer array is used to index the starting address of each data block. When the space for all data blocks in an array is exhausted, one or more new data blocks are added to the array. This effectively solves the problems of space allocation, data copying, and memory fragmentation caused by frequent array expansion.
[0041] In the vertex array, each vertex is stored using four consecutive variables, including the vertex's dimensions in addition to its x, y, and z coordinates. The tetrahedron array stores the indices of the four vertices corresponding to each tetrahedron, while the neighbor tetrahedron array stores the indices of the four neighboring tetrahedrons corresponding to each tetrahedron. The two are stored in different arrays.
[0042] To efficiently traverse the tetrahedron, the i-th face is defined as the face of the tetrahedron opposite the i-th vertex, and the i-th neighbor tetrahedron is the tetrahedron adjacent to the i-th face of the current tetrahedron. To resolve label conflicts during cavity construction, the first and second cavity label arrays are used to store the tetrahedron cavity label information before and after a specific operation, respectively.
[0043] Generate a triangular mesh covering the surface of the target 3D geometric model; then generate an initial CDT (Constrained Delaunay Triangulation) covering the calculation area.
[0044] Step 1: Calculate the center of gravity of each tetrahedron and perform size check. The tetrahedrons that do not meet the size requirements are used as input for subsequent cavity growth. The details are as follows:
[0045] like Figure 2 As shown, first calculate the center of gravity of the tetrahedron :
[0046] (1)
[0047] in The tetrahedron The coordinates of the vertices.
[0048] Then calculate the center of gravity Minimum distance ratio between the vertices of the tetrahedron :
[0049] (2)
[0050] in, Indicates the center of gravity With the tetrahedron The distance between vertices; The tetrahedron The size of each vertex.
[0051] If the minimum distance size ratio , it means that the tetrahedron does not meet the size requirements and will be used as the starting point for the subsequent cavity growth step. Minimum distance size ratio The larger 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 refined according to the minimum distance size ratio. Sort by descending vertical size to determine priority in subsequent steps.
[0052] Maintain an array of tetrahedrons that do not meet the size requirements. If the number of tetrahedrons in the array exceeds the GPU processing threshold, using all of these tetrahedrons as the starting points for the cavity growth step will result in numerous conflicts, significantly slowing the program's execution speed. To address this issue, only the tetrahedrons in the array that do not meet the size requirements, whose number is less than or equal to the GPU processing threshold, are used as the starting points for the cavity growth step and then executed in subsequent steps. The GPU processing threshold is set to 8 × the number of GPU stream processors.
[0053] Step 2: Through multiple rounds of iterative cavity growth, a set of cavities with no overlap is obtained, as follows:
[0054] 2-1. Initialize the expanded tetrahedron.
[0055] Each GPU thread is responsible for one starting tetrahedron; the starting tetrahedron is used as the first expanded tetrahedron. In step 2, a cavity is generated for each starting tetrahedron, and the center of gravity of the starting tetrahedron is used as a candidate insertion point for the cavity. A cavity corresponds to one or multiple tetrahedrons with the same cavity label.
[0056] 2-2. Cavity marking.
[0057] Perform an inner sphere test (InSphere) on the expanded tetrahedron. If the test succeeds (the candidate insertion point is within the circumsphere of the neighbor tetrahedron), attempt to atomically modify the cavity flag of the neighbor tetrahedron and use the neighbor tetrahedron as the candidate tetrahedron. The modified cavity flag corresponds to the index of the starting tetrahedron.
[0058] 2-3. Cavity verification.
[0059] Based on the changes in the cavity markings of the expanded tetrahedron and its neighboring tetrahedrons in step 2-2, verify whether the cavities to which the expanded tetrahedron and its neighboring tetrahedrons belong are invalid. Specifically, there are three cases: (1) If the cavity markings of the neighboring tetrahedrons change before and after step 2-2, the cavity to which the neighboring tetrahedrons belonged before step 2-2 is invalid. (2) If the cavity markings of the neighboring tetrahedrons after step 2-2 are inconsistent with the cavity markings of the expanded tetrahedron, the cavity to which the expanded tetrahedron belonged before step 2-2 is invalid. (3) If the cavity markings of the expanded tetrahedrons change before and after step 2-2, the cavity to which the expanded tetrahedrons belonged before step 2-2 is invalid.
[0060] 2-4. Clean the failed cavity.
[0061] For a cavity that has failed, the cavity marks of all its related tetrahedrons must be cleared to prevent it from affecting subsequent iterations. The neighboring tetrahedrons whose cavity marks have changed and whose cavities have not failed in the current iteration are collected as the expansion tetrahedrons for the next iteration.
[0062] 2-5. Repeat steps 2-2 to 2-4 until the cavity marks of all tetrahedrons no longer change.
[0063] Figure 3 A 2D schematic diagram showing the cavity growth steps. Figure 3 Part (a) of the figure corresponds to the initial state. There are six candidate insertion points, represented by hollow circles, with their initial cavities colored differently. Black arrows indicate a successful inner-sphere test, while red arrows indicate a failed inner-sphere test. Also shown in the upper left corner is an example of a candidate insertion point performing an inner-sphere test on its neighboring tetrahedrons. Figure 3 Part (b) of the graph corresponds to the first iteration, in which a cavity near the bottom fails to grow toward its neighboring tetrahedron because its priority is lower than that of other competing cavities. This cavity and its candidate insertion point are removed from the graph. The growth of the remaining cavities toward their neighboring tetrahedrons is successful. Figure 3 Part (c) corresponds to the second iteration, when all cavities cannot continue to grow and the cavity growth step is completed.
[0064] Step 3: Select independent cavities with non-overlapping boundaries using a coloring algorithm, as follows:
[0065] The present invention selects as many independent cavities as possible through multiple rounds of staining.
[0066] For each cavity, if its boundary does not overlap with other cavities or its priority is higher than all its neighboring cavities, it will be colored first.
[0067] Subsequently, all cavities adjacent to the stained cavities were removed.
[0068] Repeating the above process can dye as many cavities as possible. In this embodiment, the number of dyeing rounds 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 that large cavities are refined first, improving the speed of the method.
[0069] Figure 4 A two-dimensional schematic diagram of the independent cavity screening steps is given. Figure 4 Part (a) corresponds to the first round of coloring. The middle cavity has a higher priority than all its neighboring cavities, while the cavity on the lower right is not adjacent to any cavity, so both are marked in red. Figure 4Part (b) corresponds to the first round of deletion process, where all cavities adjacent to the red cavity are deleted. Figure 4 Part (c) corresponds to the second round of staining, in which all remaining cavities are marked in red, and the independent cavity screening step is completed.
[0070] Step 4: Perform multiple rounds of iterative cavity repair until the directed volume of the tetrahedron formed by each boundary surface of the cavity and the candidate insertion point is positive, as follows:
[0071] First, all tetrahedrons located on the cavity boundary are collected as boundary tetrahedrons.
[0072] Next, a GPU thread is assigned to each bounding tetrahedron and uses the Orient3d predicate to calculate the directed volume of the tetrahedron formed by the cavity boundary surface and the candidate insertion point. If the resulting directed volume is positive, the cavity boundary surface is valid; if the resulting directed volume is negative, the cavity marker corresponding to the bounding tetrahedron is deleted.
[0073] Next, all boundary tetrahedrons whose cavity marks are deleted are collected, and it is verified based on the neighbor information whether isolated tetrahedrons will be generated in the cavity after deleting these boundary tetrahedrons, and the cavity marks corresponding to the isolated tetrahedrons will be deleted.
[0074] The above steps are repeated until all cavity interfaces are valid, and the candidate insertion points of each cavity are obtained as the final insertion points.
[0075] Step 5: Reconnect the cavities and update the topology and neighbor information of the grid, as follows:
[0076] The present invention adopts a block-based storage structure. When the vertex and tetrahedron arrays cannot accommodate the newly added data, new storage blocks are allocated to the corresponding arrays. The insertion points of each cavity will be stored at the end of the vertex array. For these insertion points, their size values need to be calculated. , calculated as:
[0077] (3)
[0078] in, is the number of vertices in the cavity where the insertion point is located; Represents the cavity vertex The size value of Represents the cavity vertex Distance from the insertion point; is the transition factor, and the recommended value is 1.05.
[0079] To update tetrahedron topology information, all cavities must be scanned, the number of tetrahedrons in each cavity before and after reconnection recorded, and an array of available tetrahedron indices maintained. If the number of available tetrahedron indices is insufficient, the excess tetrahedrons generated by reconnection are stored at the end of the tetrahedron array. If the number of available tetrahedron indices exceeds the number of tetrahedrons required for reconnection, the excess is added to the end of the free tetrahedron array, available for use in the cavity reconnection phase in subsequent iterations.
[0080] Updating the neighbor relationships between tetrahedrons within a cavity can be achieved through linear search, with a single GPU thread responsible for updating the neighbor relationships between a tetrahedron within a cavity and the remaining tetrahedrons within the cavity. Updating the neighbor relationships between tetrahedrons within a cavity and those outside it requires scanning all cavities before updating the tetrahedron topology. An additional array is used to record the information about the tetrahedrons outside the cavity. This array can then be used to efficiently update the neighbor relationships after the tetrahedron topology is updated.
[0081] Step 6: Repeat steps 1 to 5 until the array of tetrahedrons that do not meet the size requirement is empty, that is, all tetrahedrons meet the size requirement.
[0082] In this embodiment, the Bomb model is meshed, and the resulting surface mesh is as follows: Figure 5 As shown, the tetrahedral mesh generation results are as follows Figure 6 Table 1 shows the time statistics for mesh generation for this model under different input sizes. For both tens of millions and hundreds of millions of meshes, the method achieves a rate exceeding 12 million cells per second, demonstrating high generation rates and good scalability, significantly improving the efficiency of aircraft shape design optimization.
[0083] Table 1 Bomb model generation time statistics under different input size conditions
[0084] 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) million cells 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
[0085] Example 2
[0086] A method for designing an aircraft shape comprises the following steps:
[0087] Step 1: Generate a tetrahedron mesh for the initial three-dimensional geometric model of the aircraft using the parallel tetrahedron mesh generation method provided in Example 1. In this embodiment, the aircraft is a missile or an airplane.
[0088] Step 2: Optimize the tetrahedral mesh generated in step 1.
[0089] 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 repeat steps 1 and 2 until the desired shape is achieved.
[0090] Example 3
[0091] A GPU-based parallel tetrahedron mesh generation system includes a storage module and a graphics processing unit. The graphics processing unit is provided with a size check 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 check module is used to calculate the minimum distance size ratio of each tetrahedron in parallel 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.
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, filter 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; The cavity growth process is as follows: starting with the initial tetrahedron, the expansion tetrahedron is selected; for each initial tetrahedron, the inner sphere test is performed on all its neighboring tetrahedrons; if the test is successful, the cavity mark of the neighboring 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 modification of the neighbor tetrahedron cavity mark, the cavity to which the expanded tetrahedron belongs is removed; Step 4: Use multiple GPU threads to set priorities based on the number of tetrahedrons; delete some cavities according to the priority 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; The cavity repair process is as follows: First, all tetrahedrons located on the cavity boundary are collected as boundary tetrahedrons; then, the directed volume of the tetrahedron formed by the cavity boundary surface and the candidate insertion point is calculated; if the obtained directed volume is positive, it means that the cavity boundary surface is valid; if the obtained directed volume is negative, the boundary tetrahedron is removed from the cavity; then, isolated tetrahedrons generated in the cavity are removed; and the above process is repeated until all cavity boundary surfaces are valid. 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, wherein: 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, one or more new data blocks are added to the array.
3. The GPU-based parallel tetrahedron mesh generation method according to claim 2, wherein: 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 record the tetrahedron cavity mark information before and after the operation, respectively.
4. The method for generating parallel tetrahedron mesh based on GPU according to claim 1, wherein: 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 parallel tetrahedron mesh based on 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. A method for designing an aircraft shape, characterized by: The following steps are involved: Step 1: generating a tetrahedral mesh of the initial three-dimensional geometric model of the aircraft using the GPU-based parallel tetrahedral mesh generation method according to 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 the aircraft shape that meets the requirements is obtained.
7. 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 calculate the minimum distance size ratio of each tetrahedron in parallel, 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.
8. 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 to 5.
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