Method and device for generating three-dimensional tetrahedral mesh in parallel based on graphics processor

By processing the generation of three -dimensional quad body grids on the graphic processor, using threads and thread blocks to calculate the target of the discrete dot set in the line, solve the problem of difficulty in taking into account the quality and efficiency of the existing technology, and achieve efficient efficiency , Good quality grid generation.

CN119379951AActive Publication Date: 2025-01-28UNIV OF SCI & TECH OF CHINA

Patent Information

Application Number
CN202411601950.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-01-28
Estimated Expiration
2044-11-11

AI Technical Summary

Technical Problem

The prior art is difficult to take into account the generation quality and generation efficiency of three-dimensional tetrahedral mesh, and consumes a lot of computing resources.

Method used

Adopt a parallelization method based on graphic processor, through the preset unit grid and three -dimensional partial derunne, use thread parallel to calculate the target of the discrete point set, and calculate the line blocks for the point of calculating the limit. , Generate a three -dimensional tetrahedron grid corresponding to the discrete dot.

Benefits of technology

Improved the production efficiency of the three -dimensional quad body grid, reducing the consumption of computing resources, while ensuring the quality of the grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379951A_ABST
    Figure CN119379951A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for generating a three-dimensional tetrahedral mesh in parallel based on a graphics processor, and the method comprises the steps: carrying out the processing of an obtained discrete point set based on a preset unit mesh, and obtaining a mapping relation between the discrete point set and the preset unit mesh; based on the mapping relation and a three-dimensional local Delou inner lemma, a thread constructed by a graphics processor is used for calculating a target neighborhood of each target point in the discrete point set in parallel, and a calculation task of the thread is limited by a preset calculation limit; for each second target point of which the calculation demand exceeds the calculation limit, based on the mapping relationship and a three-dimensional local Delou inner lemma, calculating a target-neighborhood of each second target point in parallel by using a thread block constructed by a graphics processor to obtain a target-neighborhood set corresponding to the discrete point set; and generating a three-dimensional tetrahedral mesh corresponding to the discrete point set according to the target neighborhood set corresponding to the discrete point set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of computer-aided engineering and finite element method, and more specifically, to a method and device for generating three-dimensional tetrahedral meshes in parallel based on a graphics processor. Background Art

[0002] In technical fields such as computer-aided engineering and finite element method, a three-dimensional tetrahedral mesh can be generated based on a discrete point set, and the three-dimensional tetrahedral mesh can be used to represent the discrete point set in three-dimensional space.

[0003] In the process of implementing the concept of the present disclosure, the inventors found that a three-dimensional tetrahedral mesh can be generated based on a serial method on a CPU. This method generates a high quality mesh, but the efficiency of generating the mesh is low. A three-dimensional tetrahedral mesh can also be generated based on a parallel method on a GPU. This method generates a high efficiency mesh, but the quality of the generated mesh is low. Therefore, the inventors found that there are at least the following problems: the method for generating a three-dimensional tetrahedral mesh is difficult to balance the quality and efficiency of mesh generation, and the generation of a three-dimensional tetrahedral mesh consumes more computing resources. Summary of the invention

[0004] In view of this, the present disclosure provides a method, apparatus, device, medium and program product for generating a three-dimensional tetrahedral mesh in parallel based on a graphics processor.

[0005] One aspect of the present disclosure provides a method for generating a three-dimensional tetrahedral mesh based on a graphics processor in parallel, comprising: processing an obtained discrete point set based on a preset unit grid to obtain a mapping relationship between the discrete point set and the preset unit grid; based on the mapping relationship and the three-dimensional local Delaunay lemma, using threads constructed by a graphics processor to parallelly calculate the target-neighborhood of each target point in the discrete point set, wherein the target-neighborhood represents a set of three-dimensional tetrahedrons with the target point as a vertex, and the computing task of the thread is subject to a preset computing limit; for each second target point whose computing demand exceeds the computing limit, based on the mapping relationship and the three-dimensional local Delaunay lemma, using thread blocks constructed by a graphics processor to parallelly calculate the target-neighborhood of each second target point to obtain a target-neighborhood set corresponding to the discrete point set; and generating a three-dimensional tetrahedral mesh corresponding to the discrete point set according to the target-neighborhood set corresponding to the discrete point set.

[0006] Another aspect of the present disclosure provides an apparatus for generating a three-dimensional tetrahedral mesh based on a graphics processor in parallel, comprising: a mapping module, for processing an obtained discrete point set based on a preset unit grid to obtain a mapping relationship between the discrete point set and the preset unit grid; a first processing module, for calculating in parallel a target-neighborhood of each target point in the discrete point set using threads constructed by a graphics processor based on the mapping relationship and the three-dimensional local Delaunay lemma, wherein the target-neighborhood represents a set of three-dimensional tetrahedrons with the target point as a vertex, and the computing task of the thread is subject to a preset computing limit; a second processing module, for calculating in parallel a target-neighborhood of each second target point whose computing demand exceeds the computing limit based on the mapping relationship and the three-dimensional local Delaunay lemma using thread blocks constructed by a graphics processor to obtain a target-neighborhood set corresponding to the discrete point set; and a generation module, for generating a three-dimensional tetrahedral mesh corresponding to the discrete point set according to the target-neighborhood set corresponding to the discrete point set.

[0007] Another aspect of the present disclosure provides an electronic device, including: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.

[0008] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.

[0009] Another aspect of the present disclosure provides a computer program product, which includes computer executable instructions, and when the instructions are executed, are used to implement the method as described above.

[0010] According to the embodiments of the present disclosure, by constructing a Delaunay tetrahedral mesh based on the three-dimensional local Delaunay lemma, the mesh update range corresponding to each point in the discrete point set can be determined, so that accurate results can be obtained. In addition, the range defined by the three-dimensional local Delaunay lemma is smaller than the safety radius, so the tetrahedral mesh can be updated less frequently and more efficiently. Further, by using the GPU to execute the calculation subtasks of each target point in parallel, the generation efficiency of the tetrahedral mesh can be effectively improved. By setting the calculation limit, it can be achieved that the calculation subtasks with smaller calculation amount are first processed in parallel based on a single thread, and then the calculation subtasks with larger calculation amount are processed in a targeted manner based on the thread block, so that the parallel processing efficiency of the GPU can be accelerated, the parallel processing performance of the GPU can be improved, and the generation efficiency of the tetrahedral mesh can be further improved, and it is conducive to reducing the consumption of computing resources. Therefore, the method for generating a three-dimensional tetrahedral mesh based on a graphics processor in parallel provided by the embodiments of the present disclosure can at least partially overcome the technical problems that it is difficult to balance the generation quality and generation efficiency of the mesh in the related art, and the generation of the three-dimensional tetrahedral mesh consumes more computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0012] Figure 1 Schematically illustrates a discrete point set and a Delaunay tetrahedral mesh according to an embodiment of the present disclosure;

[0013] Figure 2 A schematic diagram showing an application scenario of a method, apparatus, device, medium and program product for generating a three-dimensional tetrahedral mesh in parallel based on a graphics processor according to an embodiment of the present disclosure;

[0014] Figure 3 A flowchart of a method for generating a three-dimensional tetrahedral mesh in parallel based on a graphics processor according to an embodiment of the present disclosure is schematically shown;

[0015] Figure 4A A schematic diagram of a neighborhood of a target according to an embodiment of the present disclosure is schematically shown;

[0016] Figure 4B A schematic diagram of a three-dimensional local Delaunay lemma according to an embodiment of the present disclosure is schematically shown;

[0017] Figure 4C A schematic diagram of a grid update range according to an embodiment of the present disclosure is schematically shown;

[0018] Figure 4DA schematic diagram of half-space intersection processing according to an embodiment of the present disclosure is schematically shown;

[0019] Figure 5A Schematically shows a flow chart of executing a first processing task according to an embodiment of the present disclosure;

[0020] Figure 5B Schematically shows a flowchart of performing half-space intersection processing according to an embodiment of the present disclosure;

[0021] Figure 6 A block diagram schematically shows an apparatus for generating a three-dimensional tetrahedral mesh in parallel based on a graphics processor according to an embodiment of the present disclosure; and

[0022] Figure 7 A block diagram suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0023] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0024] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0025] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0026] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0027] In the embodiments of the present disclosure, the collection, updating, analysis, processing, use, transmission, provision, disclosure, storage, etc. of the data involved (for example, including but not limited to user personal information) are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information and network security.

[0028] In the embodiments of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.

[0029] In technical fields such as computer-aided engineering and finite element methods, a three-dimensional tetrahedral mesh can be generated based on a discrete point set, and the three-dimensional tetrahedral mesh can be used to represent the discrete point set in a three-dimensional space. For example, the discrete point set may include a laser point cloud and a discrete point set formed by sampling points inside it, a geometric model surface and a discrete point set formed by feature points inside it, etc.

[0030] In the process of realizing the concept of the present disclosure, the inventors found that there are at least the following problems in the related technology: the related three-dimensional tetrahedral mesh generation method is difficult to balance the mesh generation quality and generation efficiency, and the generation of three-dimensional tetrahedral mesh consumes a lot of computing resources.

[0031] Figure 1 A discrete point set and a Delaunay tetrahedral mesh according to an embodiment of the present disclosure are schematically shown.

[0032] According to one embodiment of the present disclosure, Figure 1 As shown in the figure, the Delaunay triangulation method can be used to generate a Delaunay tetrahedral mesh based on a discrete point set. The Delaunay triangulation method has the characteristics of an empty circle and a maximized minimum angle, and can avoid the generation of narrow and long tetrahedrons as much as possible. The Delaunay tetrahedral mesh is a tetrahedral mesh that satisfies the empty sphere property, that is, the interior of the circumscribed sphere of any tetrahedron does not contain points in the discrete point set, and has a high mesh quality.

[0033] In the process of realizing the concept of the present disclosure, the inventors found that the related method of generating Delaunay tetrahedral mesh includes a serial method on the CPU, which updates the current Delaunay tetrahedral mesh by initially generating a tetrahedron and then continuously inserting new target points in the discrete point set, and finally obtains the Delaunay tetrahedral mesh corresponding to the discrete point set. In addition, the related method of generating Delaunay tetrahedral mesh also includes a parallel method on the GPU, which first calculates the k neighboring points of each target point in the discrete point set, and then uses half-space intersection processing to update the Delaunay neighborhood mesh of the current target point (a local Delaunay tetrahedral mesh with the current target point as the vertex) until the safety radius is reached. The inventors found that the first method can obtain an accurate Delaunay tetrahedral mesh, but when the number of points reaches a certain scale, the speed of updating the Delaunay tetrahedral mesh is slow. The second method cannot obtain an accurate Delaunay tetrahedral mesh because it is possible that the safety radius has not been reached after calculating the k neighboring points. In addition, when approaching the boundary of the point set, the safety radius is infinite, so the result cannot be guaranteed to be accurate.

[0034] In order to at least partially solve the technical problems existing in the related art, the present disclosure provides a method, device, equipment, medium and program product for generating three-dimensional tetrahedral meshes based on a graphics processor in parallel. The method for generating three-dimensional tetrahedral meshes based on a graphics processor in parallel includes: based on a preset unit grid, processing the obtained discrete point set to obtain a mapping relationship between the discrete point set and the preset unit grid; based on the mapping relationship and the three-dimensional local Delaunay lemma, using the thread constructed by the graphics processor to parallelly calculate the target-neighborhood of each target point in the discrete point set, wherein the target-neighborhood represents a set of three-dimensional tetrahedrons with the target point as a vertex, and the computing task of the thread is limited by the preset computing limit; for each second target point whose computing demand exceeds the computing limit, based on the mapping relationship and the three-dimensional local Delaunay lemma, using the thread block constructed by the graphics processor to parallelly calculate the target-neighborhood of each second target point to obtain a target-neighborhood set corresponding to the discrete point set; according to the target-neighborhood set corresponding to the discrete point set, generate a three-dimensional tetrahedral mesh corresponding to the discrete point set.

[0035] Figure 2 The application scenario diagram of the method, apparatus, device, medium and program product for generating three-dimensional tetrahedral meshes in parallel based on a graphics processor according to an embodiment of the present disclosure is schematically shown.

[0036] like Figure 2As shown, the application scenario 200 according to this embodiment may include a first terminal device 201, a second terminal device 202, a third terminal device 203, a network 204, and a server 205. The network 204 is used to provide a medium for a communication link between the first terminal device 201, the second terminal device 202, the third terminal device 203, and the server 205. The network 204 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0037] The user may use the first terminal device 201, the second terminal device 202, and the third terminal device 203 to interact with the server 205 through the network 204 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 201, the second terminal device 202, and the third terminal device 203, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0038] The first terminal device 201, the second terminal device 202, and the third terminal device 203 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0039] The server 205 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 201, the second terminal device 202, and the third terminal device 203. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0040] It should be noted that the method for generating a three-dimensional tetrahedral mesh based on a graphics processor in parallel provided in the embodiment of the present disclosure can generally be executed by the server 205. Accordingly, the apparatus for generating a three-dimensional tetrahedral mesh based on a graphics processor in parallel provided in the embodiment of the present disclosure can generally be set in the server 205. The method for generating a three-dimensional tetrahedral mesh based on a graphics processor in parallel provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 205 and can communicate with the first terminal device 201, the second terminal device 202, the third terminal device 203 and / or the server 205. Accordingly, the apparatus for generating a three-dimensional tetrahedral mesh based on a graphics processor in parallel provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 205 and can communicate with the first terminal device 201, the second terminal device 202, the third terminal device 203 and / or the server 205. Alternatively, the method for generating a three-dimensional tetrahedral mesh based on a graphics processor in parallel provided in the embodiment of the present disclosure may also be executed by the first terminal device 201, the second terminal device 202, or the third terminal device 203, or may also be executed by other terminal devices different from the first terminal device 201, the second terminal device 202, or the third terminal device 203. Accordingly, the apparatus for generating a three-dimensional tetrahedral mesh based on a graphics processor in parallel provided in the embodiment of the present disclosure may also be set in the first terminal device 201, the second terminal device 202, or the third terminal device 203, or may be set in other terminal devices different from the first terminal device 201, the second terminal device 202, or the third terminal device 203.

[0041] It should be understood that Figure 2 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0042] Figure 3 The flowchart of the method for generating a three-dimensional tetrahedral mesh in parallel based on a graphics processor according to an embodiment of the present disclosure is schematically shown.

[0043] like Figure 3 As shown, the method 300 includes operations S310 to S340.

[0044] In operation S310, based on a preset unit grid, the obtained discrete point set is processed to obtain a mapping relationship between the discrete point set and the preset unit grid.

[0045] In operation S320, based on the mapping relationship and the three-dimensional local Delaunay lemma, the target-neighborhood of each target point in the discrete point set is calculated in parallel using threads constructed by a graphics processor, wherein the target-neighborhood represents a set of three-dimensional tetrahedrons with the target point as a vertex, and the computing task of the thread is subject to a preset computing limit.

[0046] In operation S330, for each second target point whose computing requirement exceeds the computing limit, based on the mapping relationship and the three-dimensional local Delaunay lemma, the target-neighborhood of each second target point is calculated in parallel using thread blocks constructed by the graphics processor to obtain a target-neighborhood set corresponding to the discrete point set.

[0047] In operation S340, a three-dimensional tetrahedral mesh corresponding to the discrete point set is generated according to the target-neighborhood set corresponding to the discrete point set.

[0048] According to the embodiments of the present disclosure, the obtained discrete point set is processed based on the preset unit grid, and a mapping relationship between the discrete point set and the preset unit grid can be obtained. When the tetrahedral grid is updated, the points within the update range can be efficiently and quickly located based on the mapping relationship between the discrete point set and the preset unit grid, so as to facilitate subsequent calculation tasks.

[0049] According to an embodiment of the present disclosure, the target-neighborhood represents a set of three-dimensional tetrahedrons with the target point as a vertex, and the target-neighborhood of the target point can be the Delaunay-neighborhood of the target point, which can be understood as a local Delaunay tetrahedral mesh with the target point as a vertex. In the Delaunay-neighborhood, each tetrahedron satisfies the property of Delaunay triangulation, that is, the interior of the circumscribed sphere of each tetrahedron does not contain the target point in the point set.

[0050] According to an embodiment of the present disclosure, the Delaunay one-ring neighborhood of a target point may be stored in the form of a Delaunay one-ring neighborhood list. A Delaunay one-ring neighborhood list may be understood as a collection of all triangles in the Delaunay one-ring neighborhood of the target point that are opposite to the target point.

[0051] Figure 4A A schematic diagram of a neighborhood of a target according to an embodiment of the present disclosure is schematically shown.

[0052] Figure 4A The Delaunay neighborhood of the target point and its dual region are shown. Figure 4A The closed triangle mesh formed by the blue edges is shown in Figure 4AIt is shown as a convex polyhedron with pink edges. Point a is the target point, and with point a as the vertex, it can form a tetrahedron with any triangle in the closed triangular mesh. The tetrahedron set defined by point a and the closed triangular mesh (tetrahedron abcd, tetrahedron abgf, tetrahedron abfc, tetrahedron abdg, tetrahedron aedc, tetrahedron aefg, tetrahedron aecf, tetrahedron aegd) is the Delaunay neighborhood of point a. Each tetrahedron in the tetrahedron set contains point a as its vertex. It should be noted that in Figure 4A Only the triangles without point a corresponding to each tetrahedron in the Delaunay neighborhood are shown.

[0053] According to an embodiment of the present disclosure, referring to Figure 4A According to the circumscribed ball of each tetrahedron in the Delaunay neighborhood, the circumscribed ball union of the tetrahedrons corresponding to the Delaunay neighborhood can be obtained. Specifically, the circumscribed ball union of the tetrahedrons is the union of the circumscribed balls of each tetrahedron formed by the triangles in the Delaunay neighborhood and the target point a.

[0054] According to an embodiment of the present disclosure, regarding the three-dimensional local Delaunay lemma (also known as the three-dimensional local Delaunay lemma), assuming that X is a set of points in a three-dimensional Euclidean space, the following properties apply:

[0055] If a closed triangle mesh (V, T) satisfies that all vertices of the triangle mesh are inside X and the triangle mesh forms a simple polygon that contains the target point a, then all Delaunay-neighborhood vertices of point a fall inside the union of the tetrahedron circumscribed spheres defined by the triangle mesh and point a. The aforementioned union of the tetrahedron circumscribed spheres is the union of the circumscribed spheres of each tetrahedron formed by the triangles in the triangle mesh and point a.

[0056] Figure 4B A schematic diagram of a three-dimensional local Delaunay lemma according to an embodiment of the present disclosure is schematically shown.

[0057] like Figure 4B As shown, the closed triangular mesh (by Figure 4B The gray and green edges in the triangle mesh contain the target point a. The dual region of the triangle mesh is composed of Figure 4B The pink edges in the triangle mesh are convex polyhedrons. Form a tetrahedron with point a (Depend on Figure 4B In the discrete point set, there is a point b that is outside the circumscribed spheres of all tetrahedrons that contain a as a vertex, that is, point b is outside the union of the circumscribed spheres of the tetrahedrons defined by the triangle mesh and point a.

[0058] like Figure 4B As shown, in the dual representation, each vertex of the convex polyhedron (such as c) is closer to a and farther from b, so each vertex of the convex polyhedron is located in the left half space defined by point a and point b, and each vertex of the convex polyhedron does not intersect with the half-plane P. Assuming that point b is a vertex of the Delaunay neighborhood of point a, the half-plane P must intersect with the dual region (that is, the aforementioned convex polyhedron), which contradicts the previous "each vertex of the convex polyhedron does not intersect with the half-plane P", so it can be determined that point b is not a vertex of the Delaunay neighborhood of point a. It can be understood that the point used to update the Delaunay neighborhood of point a must be in the union of the tetrahedron circumscribed balls corresponding to the Delaunay neighborhood of point a, so it is only necessary to find the next target point in the union of the tetrahedron circumscribed balls to update the current Delaunay tetrahedron mesh.

[0059] Figure 4C A schematic diagram of a grid update range according to an embodiment of the present disclosure is schematically shown.

[0060] Figure 4C The left side shows the mesh update range for constructing a Delaunay tetrahedral mesh based on the safety radius; Figure 4C The middle shows the mesh update range for constructing a Delaunay tetrahedral mesh based on the three-dimensional local Delaunay lemma; Figure 4C The right side of shows the mesh update range for constructing a Delaunay tetrahedral mesh based on the three-dimensional local Delaunay lemma near the boundary of the discrete point set.

[0061] refer to Figure 4C It can be understood that, compared with the method of calculating the k neighboring points of each target point in advance and updating the tetrahedral mesh based on the safety radius, constructing the Delaunay tetrahedral mesh based on the three-dimensional local Delaunay lemma can ensure that the mesh update range corresponding to each point in the discrete point set is determined (even for points close to the boundary of the discrete point set), thereby ensuring accurate results. In addition, the range defined by the three-dimensional local Delaunay lemma is smaller than the safety radius, so the tetrahedral mesh can be updated less frequently and more efficiently.

[0062] According to an embodiment of the present disclosure, a graphics processing unit (GPU) is a microprocessor that can be used to process graphics and visual computing tasks. Compared with a traditional central processing unit (CPU), a GPU has more cores and can process a large number of parallel computing tasks at the same time, which enables the GPU to decompose large-scale computing tasks into many small subtasks that can be processed in parallel when executing parallel computing-intensive applications, and can process multiple subtasks in parallel, thereby significantly improving computing efficiency.

[0063] According to an embodiment of the present disclosure, a thread can be understood as the smallest unit that an operating system can perform computation scheduling on. Exemplarily, a thread can be assigned to each subtask, and these threads can be executed in parallel.

[0064] According to an embodiment of the present disclosure, a thread block can be understood as a collection of multiple threads. A thread block generally includes a preset number (eg, 32 or 128, etc.) of threads, which are organized together during execution. Exemplarily, multiple threads in a thread block can perform synchronous operations.

[0065] According to an embodiment of the present disclosure, the computing task of a thread is subject to a preset computing quota, which can be understood as the upper limit of the computing task processed by the thread. If the computing requirement of the subtask executed by the thread exceeds the computing quota, the subtask will fail to execute. For the subtask that failed to execute, it can be further executed based on a thread block containing multiple threads, thereby ensuring that the subtask is executed successfully.

[0066] According to an embodiment of the present disclosure, based on a mapping relationship and the three-dimensional local Delaunay lemma, a thread constructed by a graphics processor can be used to calculate the target-neighborhood of each target point in a discrete point set in parallel, wherein the computing task of the thread is subject to a preset computing limit. Further, for each second target point whose computing demand exceeds the computing limit, based on a mapping relationship and the three-dimensional local Delaunay lemma, a thread block constructed by a graphics processor can be used to calculate the target-neighborhood of each second target point in parallel, to obtain a target-neighborhood set corresponding to the discrete point set. Specifically, the target-neighborhood set corresponding to the discrete point set includes the target-neighborhood of each target point in the discrete point set.

[0067] According to an embodiment of the present disclosure, a set of three-dimensional tetrahedrons with each target point in the discrete point set as a vertex can be generated according to the target neighborhood of each target point in the discrete point set, thereby obtaining a three-dimensional tetrahedron mesh corresponding to the discrete point set. Each three-dimensional tetrahedron in the three-dimensional tetrahedron mesh has the target point in the discrete point set as a vertex.

[0068] It is understandable that by using the GPU to execute the calculation subtasks of each target point in parallel, the efficiency of tetrahedral mesh generation can be effectively improved. By setting the calculation limit, it is possible to first parallelize the calculation subtasks with smaller calculation amount based on a single thread, and then specifically process the calculation subtasks with larger calculation amount based on the thread block, thereby accelerating the parallel processing efficiency of the GPU and improving the parallel processing performance of the GPU, which can further improve the efficiency of tetrahedral mesh generation and help reduce the consumption of computing resources.

[0069] According to the embodiments of the present disclosure, by constructing a Delaunay tetrahedral mesh based on the three-dimensional local Delaunay lemma, the mesh update range corresponding to each point in the discrete point set can be determined, so that accurate results can be obtained. In addition, the range defined by the three-dimensional local Delaunay lemma is smaller than the safety radius, so the tetrahedral mesh can be updated less frequently and more efficiently. Further, by using the GPU to execute the calculation subtasks of each target point in parallel, the generation efficiency of the tetrahedral mesh can be effectively improved. By setting the calculation limit, it can be achieved that the calculation subtasks with smaller calculation amount are first processed in parallel based on a single thread, and then the calculation subtasks with larger calculation amount are processed in a targeted manner based on the thread block, so that the parallel processing efficiency of the GPU can be accelerated, the parallel processing performance of the GPU can be improved, and the generation efficiency of the tetrahedral mesh can be further improved, and it is conducive to reducing the consumption of computing resources. Therefore, the method for generating a three-dimensional tetrahedral mesh based on a graphics processor in parallel provided by the embodiments of the present disclosure can at least partially overcome the technical problems that it is difficult to balance the generation quality and generation efficiency of the mesh in the related art, and the generation of the three-dimensional tetrahedral mesh consumes more computing resources.

[0070] According to an embodiment of the present disclosure, the preset unit grid is a unit cube including M cells, the discrete point set includes N target points, M<N, and M and N are positive integers, and based on the preset unit grid, the obtained discrete point set is processed to obtain a mapping relationship between the discrete point set and the preset unit grid, including:

[0071] Match the discrete point set with the preset cell grid to determine the cell number corresponding to each target point;

[0072] According to the cell number corresponding to each target point, the N target points in the discrete point set are sorted to obtain the mapping relationship between the N target points and the M cells.

[0073] According to an embodiment of the present disclosure, by matching a preset unit grid with a bounding box of a discrete point set, the bounding box of the discrete point set can be divided into units of uniform size, thereby obtaining a mapping relationship between the discrete point set and the preset unit grid.

[0074] According to an embodiment of the present disclosure, the discrete point set can be first matched to the inside of a unit cube by translation and scaling, and then the unit cube can be divided into a uniform 3D grid. Exemplarily, assuming that the discrete point set includes N target points, the number of cells can be set to M=N / 4, where M and N are positive integers. Further, the number of empty cells can be calculated, and the number of cells can be adjusted according to the ratio between the number of non-empty cells and the total number of cells. On this basis, the cell number of each target point can be determined, and then the N target points in the discrete point set can be sorted in the order of the corresponding cell numbers.

[0075] According to the embodiments of the present disclosure, the sorted point set range corresponding to each cell can be counted to obtain a mapping relationship between N target points and M cells, so that all target points in a cell with a given number can be quickly found based on the mapping relationship.

[0076] According to an embodiment of the present disclosure, a three-dimensional tetrahedron in a target neighborhood includes a target point and a triangle corresponding to the target point. Based on a mapping relationship and a three-dimensional local Delaunay lemma, threads constructed by a graphics processor are used to parallely calculate the target neighborhood of each target point in a discrete point set, including: based on a mapping relationship and a three-dimensional local Delaunay lemma, threads are used to parallely execute a first processing task of each target point to obtain an execution result of the first processing task of each target point, the computational tasks of the threads are subject to a preset computational limit, and each first processing task corresponds to a single thread; for each first target point characterized by a successful execution result, a first target neighborhood of each first target point is determined.

[0077] According to the embodiments of the present disclosure, Figure 4B As shown, the three-dimensional tetrahedron Includes the target point a and the triangle opposite to the target point a (Depend on Figure 4B The green edge and point a in the figure).

[0078] According to an embodiment of the present disclosure, based on the mapping relationship and the three-dimensional local Delaunay lemma, threads can be used to execute the first processing task of each target point in parallel to obtain the execution result of the first processing task of each target point. Each target point corresponds to a single thread, and the computing task of the thread is subject to a preset computing limit. For example, if the computing requirement of the first processing task of the target point does not exceed the computing limit, the first processing task is executed successfully. For example, if the computing requirement of the first processing task of the target point exceeds the computing limit, the first processing task will fail to execute. The target point where the first processing task is successfully executed can be determined as the first target point, and the target point where the first processing task fails to execute can be determined as the second target point.

[0079] According to an embodiment of the present disclosure, for each first target point characterized by a successful execution result, a first target neighborhood of each first target point can be determined according to a calculation result of the first processing task.

[0080] According to an embodiment of the present disclosure, for each second target point whose computing demand exceeds the computing limit, based on a mapping relationship and a three-dimensional local Delaunay lemma, a thread block constructed by a graphics processor is used to parallely calculate the target-neighborhood of each second target point, so as to obtain a target-neighborhood set corresponding to a discrete point set, including: for each second target point whose execution result characterizes a failure, based on a mapping relationship and a three-dimensional local Delaunay lemma, a thread block is used to parallely execute the second processing task of each second target point, so as to obtain a second target-neighborhood of each second target point, wherein the thread block includes a plurality of threads; and according to the first target-neighborhood of each first target point and the second target-neighborhood of each second target point, a target-neighborhood set corresponding to a discrete point set is obtained.

[0081] According to an embodiment of the present disclosure, the thread block includes multiple threads, for example, 128 threads. For each second target point whose execution result characterizes a failure, based on the mapping relationship and the three-dimensional local Delaunay lemma, the thread block can be used to execute the second processing task of each second target point in parallel. The second target-neighborhood of each second target point can be determined according to the calculation result of the second processing task.

[0082] According to an embodiment of the present disclosure, a target-neighborhood set corresponding to a discrete point set can be obtained according to the first target-neighborhood of each first target point and the second target-neighborhood of each second target point. Specifically, each first target-neighborhood and each second target-neighborhood can together constitute a target-neighborhood set of a discrete point set.

[0083] According to the embodiments of the present disclosure, by using the GPU to execute the first processing task of each target point in parallel, the efficiency of generating tetrahedral meshes can be effectively improved. By setting the calculation limit, it is possible to firstly process the first processing task with a small amount of calculation in parallel based on a single thread, and then process the second processing task with a large amount of calculation in a targeted manner based on a thread block, thereby accelerating the parallel processing efficiency of the GPU, improving the parallel processing performance of the GPU, and further improving the efficiency of generating tetrahedral meshes, and helping to reduce the consumption of computing resources.

[0084] According to an embodiment of the present disclosure, for each target point, based on a mapping relationship and a three-dimensional local Delaunay lemma, threads are used to execute the first processing task of each target point in parallel, including: determining a cell set corresponding to the target point according to an initial neighborhood determined based on a preset cell grid, the cell set including a central cell containing the target point and a plurality of adjacent cells adjacent to the central cell; based on the target point, performing a half-space intersection process on each other target point located in the cell set to obtain an intermediate neighborhood corresponding to the target point; searching for other target points existing in the circumscribed sphere based on a computational quota of the thread according to a circumscribed sphere corresponding to a specified triangle in the intermediate neighborhood, the computational quota being determined based on the number of iterations, the number of cell searches and the cell search method; in the case where there are other target points in the circumscribed sphere, iteratively performing the following operations: determining the other target points in the circumscribed sphere as target points to be added; based on the target point, performing a half-space intersection process on the target point to be added and updating the intermediate neighborhood; in the case where there are no other target points in the circumscribed sphere, determining the latest intermediate neighborhood as the first target neighborhood.

[0085] According to an embodiment of the present disclosure, a closed triangulation can be constructed based on four virtual points located infinitely outside a preset unit grid (i.e., a unit cube) to obtain an initial neighborhood. For each target point, with the help of the grid structure of the preset unit grid, the central cell containing the target point and the six adjacent cells adjacent to the central cell can be located to obtain a set of cells corresponding to the target point. The aforementioned six connected cells are located at the front side, rear side, left side, right side, top side, and bottom side of the central cell, respectively.

[0086] According to an embodiment of the present disclosure, based on the target point, a half-space intersection algorithm may be performed on each other target point within the cell set to obtain a relatively compact triangulation, that is, an intermediate neighborhood corresponding to the target point.

[0087] According to an embodiment of the present disclosure, for each triangle in the middle neighborhood, the x-axis coordinates of the three vertices of the triangle and the target point are compared. If the x-axis coordinate of the target point is not the largest or the smallest, the triangle is determined to be a designated triangle, otherwise no processing is performed. Given that each tetrahedron in the middle neighborhood has the target point as a vertex, by specifying the triangles used to update the middle neighborhood according to a preset rule, unnecessary repeated calculations can be avoided, thereby facilitating improved calculation efficiency.

[0088] According to an embodiment of the present disclosure, other target points existing in the circumscribed sphere of the tetrahedron corresponding to the specified triangle can be searched based on the computational quota of the thread. The computational quota is determined based on the number of iterations, the number of cell searches, and the cell search method. Exemplarily, the upper limit of the number of iterations can be set to 40, the upper limit of the number of cells for searching points in each circumscribed sphere in each iteration is set to 200, and only fast floating point checks are used.

[0089] According to one embodiment of the present disclosure, when searching for a point in a circumscribed sphere of a specified triangle, the cell range corresponding to the sphere is first determined. For example, when the center of the sphere is located within a unit cube, the cell range can be determined by the coordinate range. For example, when the center of the sphere is located outside the unit cube, the cell range of the intersection of the unit cube and the sphere can be used.

[0090] According to an embodiment of the present disclosure, for each circumscribed sphere, the search starts from the cell containing the center of the sphere and proceeds from the cell closest to the cell containing the center of the sphere to the cell farthest from the cell. If the center of the circumscribed sphere is outside the unit cube, the search starts from the cell containing the target point.

[0091] According to an embodiment of the present disclosure, to determine whether a point e is within the circumscribed sphere formed by points a, b, c, and d, the following formula may be used:

[0092] (1)

[0093] In formula (1), , , are the x-axis, y-axis, and z-axis coordinates of point a respectively. , , are the x-axis, y-axis, and z-axis coordinates of point b, respectively. , , are the x-axis, y-axis, and z-axis coordinates of point c, respectively. , , are the x-axis, y-axis, and z-axis coordinates of point d, respectively. , , are the x-axis, y-axis, and z-axis coordinates of point e respectively. is the distance between point b and point a, is the distance between point c and point a, is the distance between point d and point a, is the distance between point e and point a.

[0094] The sign of the determinant may indicate whether the point e is inside / on / outside the circumscribed sphere. For example, Shewchuk's predicates robust determination algorithm may be used to determine the sign of the above determinant under floating point numbers, and the algorithm involves two steps: a fast floating point check and an accurate check using floating point extension.

[0095] According to an embodiment of the present disclosure, when executing the first processing task, only fast floating point checking is used to mark the circumscribed balls that need to be accurately checked, and the labels are updated in the iteration process. After the algorithm is completed, if there are still any circumscribed balls marked, they will be further processed in the subsequent second processing task.

[0096] According to an embodiment of the present disclosure, when other target points are found in any circumscribed sphere, the point is determined as a target point to be added, and is recorded as point v. Based on the target point, half-space intersection processing can be performed on the target point to be added, and the current middle-neighborhood can be updated. When no point is found in all the circumscribed spheres to be processed, the latest middle-neighborhood is determined as the first target-neighborhood.

[0097] According to an embodiment of the present disclosure, based on the target point, half-space intersection processing is performed on the target point to be added, and updating the middle neighborhood includes: traversing the triangles in the current middle neighborhood, searching for the triangle to be reconstructed in the corresponding circumscribed sphere that contains the target point to be added, and obtaining a set of triangles to be reconstructed corresponding to the target point to be added; reconstructing the triangles to be reconstructed in the set of triangles to be reconstructed, and determining the boundary of the set of triangles to be reconstructed; updating the middle neighborhood according to the boundary of the target point to be added and the set of triangles to be reconstructed.

[0098] According to an embodiment of the present disclosure, all triangles in the current Delaunay neighborhood can be traversed based on a thread to determine whether the point v is within the circumscribed sphere of the tetrahedron corresponding to the triangle. If so, the current triangle is determined as a triangle to be reconstructed, and a set of triangles to be reconstructed R is obtained. Then, the set of triangles to be reconstructed R is removed from the current Delaunay neighborhood list.

[0099] According to an embodiment of the present disclosure, the boundary of the triangle set R to be reconstructed can be first initialized to any triangle in the triangle set R to be reconstructed, and then the triangle can be attempted to be merged with other triangles in the triangle set R to be reconstructed, and the merged boundary can be recorded. Finally, when all triangles are merged, the boundary of the triangle set R to be reconstructed is obtained.

[0100] According to an embodiment of the present disclosure, each boundary edge of the to-be-reconstructed triangle set R and the point v may be connected to form a new triangle, and the new triangle may be added to a Delaunay neighborhood list to update the middle neighborhood.

[0101] Figure 4D The figure schematically shows a half-space intersection process according to an embodiment of the present disclosure.

[0102] Figure 4D The figure shows the changes in the current Delaunay neighborhood of the target point a and its dual, where point a is the target point and point v is the point used for updating. Specifically, first find R (triangle cde and triangle edf) and remove them, then find the boundary of R (polygon cdfe), and finally connect each edge in the boundary of R to point v to generate a new triangle. The half-space intersection algorithm is named because it uses half-space to clip convex polyhedra from a dual perspective.

[0103] According to an embodiment of the present disclosure, based on a mapping relationship and a three-dimensional local Delaunay lemma, thread blocks are used to execute the second processing tasks of each second target point in parallel to obtain the second target neighborhood of each second target point, including: searching for other target points in the circumscribed sphere in parallel based on thread blocks according to the circumscribed sphere corresponding to a specified triangle in the middle neighborhood; in the case where there are other target points in the circumscribed sphere, iteratively performing the following operations: determining the other target points in the circumscribed sphere as target points to be added; based on the second target point, performing half-space intersection processing on the target point to be added, and updating the middle neighborhood; in the case where there are no other target points in the circumscribed sphere, determining the latest middle neighborhood as the second target neighborhood.

[0104] According to an embodiment of the present disclosure, for each triangle in the middle neighborhood, the x-axis coordinates of the three vertices of the triangle and the target point are compared. If the x-axis coordinate of the target point is not the largest or the smallest, the triangle is determined to be a specified triangle, otherwise it is not processed. Furthermore, based on the tetrahedron circumscribed sphere corresponding to the specified triangle, other target points existing in the circumscribed sphere can be searched based on the thread block. Exemplarily, the thread block can include 128 threads, and the cells to be processed can be assigned to each thread in the thread block for parallel processing. For each point found by the thread, the point closest to the target point is selected as point v.

[0105] According to an embodiment of the present disclosure, it is possible to determine whether a point is within the circumscribed sphere based on the above-mentioned formula (1). It should be noted that when executing the second processing task, an exact check of the floating point extension is used to determine the sign of the determinant in formula (1) under floating point numbers. When the exact check returns zero, the SOS (Simulation of Simplicity) algorithm can be used to handle the degenerate situation.

[0106] According to an embodiment of the present disclosure, when other target points are found in any circumscribed sphere, the point is determined as a target point to be added, and is recorded as point v. Based on the target point, half-space intersection processing can be performed on the target point to be added, and the current middle-neighborhood can be updated. When no point is found in all the circumscribed spheres to be processed, the latest middle-neighborhood is determined as the second target-neighborhood.

[0107] According to an embodiment of the present disclosure, based on the second target point, half-space intersection processing is performed on the target point to be added, and updating the middle neighborhood includes: traversing the triangles in the current middle neighborhood, searching for the to-be-reconstructed triangles in the corresponding circumscribed sphere containing the target point to be added in parallel based on the thread block, and obtaining a to-be-reconstructed triangle set corresponding to the target point to be added; reconstructing the triangles in the to-be-reconstructed triangle set to determine the boundary of the to-be-reconstructed triangle set; and updating the middle neighborhood according to the boundary of the target point to be added and the to-be-reconstructed triangle set.

[0108] According to an embodiment of the present disclosure, all triangles in the current Delaunay neighborhood can be traversed based on the thread block to determine whether the point v is within the circumscribed sphere of the tetrahedron corresponding to the triangle. Exemplarily, the thread block may include 128 threads, and all current triangles may be assigned to each thread, and each thread determines in parallel whether the point v is within the circumscribed sphere. If so, the current triangle is determined as a triangle to be reconstructed, and a set of triangles to be reconstructed R is obtained. Then the set of triangles to be reconstructed R is removed from the current Delaunay neighborhood list.

[0109] According to an embodiment of the present disclosure, the boundary of the triangle set R to be reconstructed can be first initialized to any triangle in the triangle set R to be reconstructed, and then the triangle can be attempted to be merged with other triangles in the triangle set R to be reconstructed, and the merged boundary can be recorded. Finally, when all triangles are merged, the boundary of the triangle set R to be reconstructed is obtained.

[0110] According to an embodiment of the present disclosure, each boundary edge of the to-be-reconstructed triangle set R and the point v may be connected to form a new triangle, and the new triangle may be added to a Delaunay neighborhood list to update the middle neighborhood.

[0111] According to an embodiment of the present disclosure, generating a three-dimensional tetrahedral mesh corresponding to a discrete point set based on a target-neighborhood set corresponding to the discrete point set includes: determining a global index of each three-dimensional tetrahedron based on a target-neighborhood set corresponding to the discrete point set; and generating a three-dimensional tetrahedral mesh based on the global index of each three-dimensional tetrahedron.

[0112] According to an embodiment of the present disclosure, a tetrahedron with the target point as a vertex can be output according to the target one neighborhood of each target point. Exemplarily, for each triangle in the target one neighborhood, the x-axis coordinates of the three vertices of the triangle and the target point can be compared. If the x-axis coordinate of the target point is the second smallest, the tetrahedron formed by the current triangle and the target point is output. Given that each tetrahedron in the target one neighborhood of the target point has the target point as a vertex, by specifying the output tetrahedron according to a preset rule, unnecessary repeated output can be avoided, thereby facilitating improved output efficiency.

[0113] According to an embodiment of the present disclosure, the number of tetrahedrons output by each target point can be counted and accumulated. For example, in the discrete point set {a, b, c, d}, point a outputs 1 tetrahedron, point b outputs 3 tetrahedrons, point c outputs 5 tetrahedrons, and point d outputs 4 tetrahedrons, then the accumulated result is {1, 4, 9, 13}. Through the accumulated results, the global index of each tetrahedron can be determined to ensure that the output order is correct when filling the tetrahedron list. Thus, a three-dimensional tetrahedron mesh can be generated based on the global index of each three-dimensional tetrahedron. Exemplarily, the tetrahedron list can be filled according to the global index of each three-dimensional tetrahedron, thereby generating a three-dimensional tetrahedron mesh corresponding to the discrete point set.

[0114] Figure 5A A flowchart for executing a first processing task according to an embodiment of the present disclosure is schematically shown.

[0115] like Figure 5A As shown, in operation S510, a cell set corresponding to the target point is determined according to an initial neighborhood determined based on a preset cell grid, and the cell set includes a central cell containing the target point and a plurality of adjacent cells adjacent to the central cell.

[0116] In operation S520, based on the target point, a half-space intersection process is performed on each other target point located in the cell set to obtain an intermediate neighborhood corresponding to the target point.

[0117] In operation S530, according to the circumscribed sphere corresponding to the designated triangle in the middle neighborhood, other target points existing in the circumscribed sphere are searched based on the computational quota of the thread, where the computational quota is determined based on the number of iterations, the number of cell searches, and the cell search method.

[0118] In operation S540, if there are other target points in the circumscribed sphere, the following operations are iteratively performed: the other target points in the circumscribed sphere are determined as target points to be added; based on the target points, half-space intersection processing is performed on the target points to be added, and the middle neighborhood is updated.

[0119] In operation S550, when no other target point exists in the circumscribed sphere, the latest middle-neighborhood is determined as the first target-neighborhood.

[0120] Figure 5B The flowchart of performing half-space intersection processing according to an embodiment of the present disclosure is schematically shown.

[0121] like Figure 5B As shown, in operation S541, the triangles in the current middle neighborhood are traversed to find the triangle to be reconstructed in the corresponding circumscribed sphere that contains the target point to be added, and a set of triangles to be reconstructed corresponding to the target point to be added is obtained.

[0122] In operation S542 , the to-be-reconstructed triangles in the to-be-reconstructed triangle set are reconstructed, and the boundary of the to-be-reconstructed triangle set is determined.

[0123] In operation S543, the middle neighborhood is updated according to the boundary of the target point to be added and the triangle set to be reconstructed.

[0124] Figure 6 A block diagram schematically shows an apparatus for generating a three-dimensional tetrahedral mesh in parallel based on a graphics processor according to an embodiment of the present disclosure.

[0125] like Figure 6 As shown, the apparatus 600 for generating a three-dimensional tetrahedral mesh in parallel based on a graphics processor includes a mapping module 610 , a first processing module 620 , a second processing module 630 and a generating module 640 .

[0126] The mapping module 610 is used to process the obtained discrete point set based on the preset unit grid to obtain a mapping relationship between the discrete point set and the preset unit grid.

[0127] The first processing module 620 is used to calculate the target-neighborhood of each target point in the discrete point set in parallel based on the mapping relationship using threads constructed by the graphics processor, wherein the target-neighborhood represents a set of three-dimensional tetrahedrons with the target point as a vertex, and the computing task of the thread is limited by a preset computing limit.

[0128] The second processing module 630 is used to calculate the target-neighborhood of each second target point in parallel using the thread block constructed by the graphics processor for each second target point whose computing demand exceeds the computing limit, and obtain a target-neighborhood set corresponding to the discrete point set.

[0129] The generating module 640 is used to generate a three-dimensional tetrahedral mesh corresponding to the discrete point set according to the target-neighborhood set corresponding to the discrete point set.

[0130] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging circuits, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.

[0131] For example, any of the mapping module 610, the first processing module 620, the second processing module 630, and the generation module 640 can be combined in one module / unit / sub-unit for implementation, or any of the modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of these modules / units / sub-units can be combined with at least part of the functions of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to an embodiment of the present disclosure, at least one of the mapping module 610, the first processing module 620, the second processing module 630, and the generation module 640 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware, and firmware, or by a suitable combination of any of them. Alternatively, at least one of the mapping module 610, the first processing module 620, the second processing module 630 and the generating module 640 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be performed.

[0132] It should be noted that the device part for generating a three-dimensional tetrahedral mesh in parallel based on a graphics processor in the embodiments of the present disclosure corresponds to the method part for generating a three-dimensional tetrahedral mesh in parallel based on a graphics processor in the embodiments of the present disclosure. The description of the device part for generating a three-dimensional tetrahedral mesh in parallel based on a graphics processor specifically refers to the method part for generating a three-dimensional tetrahedral mesh in parallel based on a graphics processor, which will not be repeated here.

[0133] Figure 7 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0134] like Figure 7 As shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 to a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0135] In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0136] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the input / output (I / O) interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.

[0137] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0138] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0139] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.

[0140] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 702 and / or the RAM 703 described above and / or one or more memories other than the ROM 702 and the RAM 703 .

[0141] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method provided by the embodiment of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the method for generating a three-dimensional tetrahedral mesh in parallel based on a graphics processor provided by the embodiment of the present disclosure.

[0142] When the computer program is executed by the processor 701, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0143] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and / or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0144] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0145] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments of the present disclosure can be combined and / or combined in a variety of ways, even if such a combination or combination is not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0146] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A method for generating a three-dimensional tetrahedral mesh in parallel based on a graphics processor, comprising: Based on a preset unit grid, the obtained discrete point set is processed to obtain a mapping relationship between the discrete point set and the preset unit grid; Based on the mapping relationship and the three-dimensional local Delaunay lemma, a target-neighborhood of each target point in the discrete point set is calculated in parallel using threads constructed by a graphics processor, wherein the target-neighborhood represents a set of three-dimensional tetrahedrons with the target point as a vertex, and the calculation task of the thread is limited by a preset calculation limit; For each second target point whose computing requirement exceeds the computing limit, based on the mapping relationship and the three-dimensional local Delaunay lemma, the target-neighborhood of each second target point is calculated in parallel using thread blocks constructed by a graphics processor to obtain a target-neighborhood set corresponding to the discrete point set; A three-dimensional tetrahedral mesh corresponding to the discrete point set is generated according to a target-neighborhood set corresponding to the discrete point set.

2. The method according to claim 1, wherein: The preset unit grid is a unit cube including M cells, the discrete point set includes N target points, M<N, and M and N are positive integers, and the obtained discrete point set is processed based on the preset unit grid to obtain a mapping relationship between the discrete point set and the preset unit grid, including: Matching the discrete point set with the preset unit grid to determine the cell number corresponding to each target point; According to the cell number corresponding to each of the target points, the N target points in the discrete point set are sorted to obtain a mapping relationship between the N target points and the M cells.

3. The method according to claim 2, wherein the three-dimensional tetrahedron in the target neighborhood includes the target point and a triangle corresponding to the target point, and the step of calculating the target neighborhood of each target point in the discrete point set in parallel using threads constructed by a graphics processor based on the mapping relationship and the three-dimensional local Delaunay lemma comprises: Based on the mapping relationship and the three-dimensional local Delaunay lemma, the threads are used to execute the first processing tasks of each target point in parallel to obtain the execution results of the first processing tasks of each target point, the computing tasks of the threads are limited by the computing quota, and each of the first processing tasks corresponds to a single thread; For each first target point whose execution result indicates success, a first target neighborhood of each first target point is determined.

4. The method according to claim 3, wherein: For each second target point whose computing requirement exceeds the computing limit, based on the mapping relationship and the three-dimensional local Delaunay lemma, the target-neighborhood of each second target point is calculated in parallel using thread blocks constructed by a graphics processor to obtain a target-neighborhood set corresponding to the discrete point set, including: For each second target point whose execution result indicates failure, based on the mapping relationship and the three-dimensional local Delaunay lemma, the thread block is used to execute the second processing task of each second target point in parallel to obtain the second target neighborhood of each second target point, wherein the thread block includes a plurality of threads; According to the first target-neighborhood of each of the first target points and the second target-neighborhood of each of the second target points, a target-neighborhood set corresponding to the discrete point set is obtained.

5. The method according to claim 4, wherein: For each target point, based on the mapping relationship and the three-dimensional local Delaunay lemma, using the threads to execute the first processing task of each target point in parallel includes: Determine a cell set corresponding to the target point according to an initial neighborhood determined based on the preset cell grid, wherein the cell set includes a central cell containing the target point and a plurality of adjacent cells adjacent to the central cell; Based on the target point, performing half-space intersection processing on each of the other target points located in the cell set to obtain an intermediate neighborhood corresponding to the target point; According to the circumscribed sphere corresponding to the designated triangle in the middle neighborhood, searching for other target points existing in the circumscribed sphere based on the computational quota of the thread, wherein the computational quota is determined based on the number of iterations, the number of cell searches, and the cell search method; In the case that there are other target points in the circumscribed sphere, the following operations are iteratively performed: determining the other target points in the circumscribed sphere as target points to be added; performing half-space intersection processing on the target points to be added based on the target points, and updating the middle neighborhood; When there are no other target points in the circumscribed sphere, the latest intermediate neighborhood is determined as the first target neighborhood.

6. The method according to claim 5, wherein: The performing half-space intersection processing on the target point to be added based on the target point, and updating the middle neighborhood includes: Traversing the triangles in the current middle neighborhood, searching for the triangle to be reconstructed that contains the target point to be added in the corresponding circumscribed sphere, and obtaining a set of triangles to be reconstructed that correspond to the target point to be added; Reconstructing the to-be-reconstructed triangles in the to-be-reconstructed triangle set, and determining the boundary of the to-be-reconstructed triangle set; The middle neighborhood is updated according to the target point to be added and the boundary of the triangle set to be reconstructed.

7. The method according to claim 5, wherein: Based on the mapping relationship and the three-dimensional local Delaunay lemma, the thread blocks are used to execute the second processing tasks of each second target point in parallel to obtain the second target neighborhood of each second target point, which includes: According to the circumscribed sphere corresponding to the designated triangle in the middle neighborhood, searching for other target points existing in the circumscribed sphere in parallel based on the thread blocks; In the case that there are other target points in the circumscribed sphere, the following operations are iteratively performed: determining the other target points in the circumscribed sphere as target points to be added; performing half-space intersection processing on the target points to be added based on the second target points, and updating the middle neighborhood; When there are no other target points in the circumscribed sphere, the latest intermediate neighborhood is determined as the second target neighborhood.

8. The method according to claim 7, wherein: The performing half-space intersection processing on the target point to be added based on the second target point, and updating the middle neighborhood comprises: Traversing the triangles in the current middle neighborhood, searching for the to-be-reconstructed triangles in the corresponding circumscribed sphere containing the to-be-added target point in parallel based on the thread blocks, and obtaining a to-be-reconstructed triangle set corresponding to the to-be-added target point; Reconstructing triangles in the to-be-reconstructed triangle set to determine a boundary of the to-be-reconstructed triangle set; The middle neighborhood is updated according to the target point to be added and the boundary of the triangle set to be reconstructed.

9. The method according to any one of claims 1 to 8, wherein: The step of generating a three-dimensional tetrahedral mesh corresponding to the discrete point set according to a target-neighborhood set corresponding to the discrete point set comprises: Determining a global index of each of the three-dimensional tetrahedrons according to a target-neighborhood set corresponding to the discrete point set; The three-dimensional tetrahedron mesh is generated according to the global index of each three-dimensional tetrahedron.

10. A device for generating a three-dimensional tetrahedral mesh in parallel based on a graphics processor, comprising: A mapping module, used to process the obtained discrete point set based on a preset unit grid to obtain a mapping relationship between the discrete point set and the preset unit grid; A first processing module is used to calculate the target-neighborhood of each target point in the discrete point set in parallel based on the mapping relationship and the three-dimensional local Delaunay lemma using threads constructed by a graphics processor, wherein the target-neighborhood represents a set of three-dimensional tetrahedrons with the target point as a vertex, and the computing task of the thread is limited by a preset computing limit; A second processing module is configured to calculate, for each second target point whose computing requirement exceeds the computing limit, based on the mapping relationship and the three-dimensional local Delaunay lemma, using thread blocks constructed by a graphics processor to calculate in parallel the target-neighborhood of each second target point, so as to obtain a target-neighborhood set corresponding to the discrete point set; A generating module is used to generate a three-dimensional tetrahedral mesh corresponding to the discrete point set according to a target-neighborhood set corresponding to the discrete point set.

Citation Information

Patent Citations

  • Scattered point cloud Delaunay triangulation curved surface reconstruction method based on mapping method

    CN103985155A

  • Multi-thread parallel computing method and system for three-dimensional cut Voronoi diagram

    CN111080509A

  • GPU parallel constrained Delaunay grid division method

    CN117934759A

  • A parallel processing method and an parallel processing apparatus

    KR102041960B1

  • Generating and evaluating mappings between spatial point sets in multi-levels

    US20220207758A1

Cited By

  • Brain tetrahedral mesh generation method and system based on thickness field algorithm and sharp tetrahedron removal, terminal and medium

    CN122023730A