Overlapping grid processing method based on GPU

Through the GPU-based overlap grid processing method, the problem of inefficient CPU computing is solved, and the overlap mapping relationship of complex grids is efficiently calculated, which improves the performance of non-constant flow field simulation.

CN120179425BActive Publication Date: 2025-08-22HUNAN MAIXI SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510663546.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2025-08-22
Estimated Expiration
2045-05-22

AI Technical Summary

Technical Problem

In the prior art, the CPU-based overlapping grid processing method is inefficient when calculating complex grids and is difficult to meet engineering needs. Especially in the non-static flow field simulation of tens of millions of grids and hundreds of millions of magnitudes, the calculation speed is slow and the calculation efficiency is low.

Method used

The GPU-based overlap grid processing method is adopted, by obtaining the target overlap grid, calculating the first overlap mapping relationship, establishing an overlap mapping relationship that is suitable for the GPU architecture and storing arrays, and using the GPU kernel function to calculate the second overlap mapping relationship between the background grid and the component grid, combining the normal vector judgment method to remove misjudgment data, and improving calculation efficiency.

Benefits of technology

The calculation speed and efficiency of overlapping mapping relationships are significantly improved, and the processing speed of large-scale grids above tens of millions of magnitude can be increased by order of magnitude on consumer-grade graphics cards, meeting the high computing efficiency and speed requirements of modern engineering simulations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120179425B_ABST
    Figure CN120179425B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a GPU-based overlapping mesh processing method. The method includes obtaining a target overlapping mesh; calculating a first overlapping mapping relationship for the target overlapping mesh based on a GPU; establishing an overlapping mapping relationship storage array compatible with the GPU architecture based on the first overlapping mapping relationship; calculating a second overlapping mapping relationship from a background mesh to a component mesh based on the overlapping mapping relationship storage array and a GPU kernel function; and removing misjudged data in the second overlapping mapping relationship using a normal vector judgment method to obtain a target overlapping mapping relationship. This method can address the issues of slow, time-consuming, and inefficient overlapping mapping relationship calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of data processing, and more particularly to a GPU-based overlapping grid processing method, apparatus, device, and computer-readable storage medium. Background Art

[0002] Overlapping meshing is a mesh processing technique commonly used for simulating complex flows and moving objects. Compared to traditional single-mesh methods, overlapping meshes effectively handle complex geometries, rigid body motion, and shape changes by using multiple meshes in multiple regions and overlapping these meshes. Especially in the simulation of unsteady flows of moving objects in engineering applications such as aviation, aerospace, and automotive, overlapping meshes have become an indispensable technical tool for complex motion simulation. The performance efficiency of overlapping mesh processing determines the overall efficiency of unsteady flow simulations.

[0003] Currently, traditional CPU computing usually uses sub-thread acceleration or MPI (Message Passing Interface, a standard communication protocol) for multi-process parallel acceleration. Due to the limitation of the number of CPU cores and the limitation of CPU cache bandwidth, the acceleration effect of using sub-threads is often limited; and due to the influence of additional time-consuming tasks such as large-scale data distribution and collection, communication overhead between processes, etc., the use of MPI multi-process acceleration also has problems such as unsatisfactory acceleration effect and low parallel efficiency. Since the calculation amount of overlapping mapping relationship is proportional to the square of the grid volume, when the grid volume increases by 2 times, the calculation amount of overlapping relationship increases by 4 times. When the grid volume increases, the processing time of overlapping grids increases sharply. For the tens of millions of grids and hundreds of millions of grids commonly used in engineering, the CPU-based overlapping mapping relationship is difficult to meet engineering needs. Summary of the Invention

[0004] According to an embodiment of the present application, a GPU-based overlapping grid processing solution is provided, which can solve the problems of slow calculation speed, time-consuming calculation and low calculation efficiency of overlapping mapping relationships.

[0005] In a first aspect of the present application, a GPU-based overlapping grid processing method is provided. The method comprises:

[0006] Get the target overlapping grid;

[0007] Calculating a first overlapping mapping relationship of the target overlapping grid based on a GPU;

[0008] Based on the first overlapping mapping relationship, establishing an overlapping mapping relationship storage array adapted to the GPU architecture;

[0009] Calculating a second overlapping mapping relationship from the background grid to the component grid based on the overlapping mapping relationship storage array and the GPU kernel function;

[0010] The misjudged data in the second overlapping mapping relationship is removed by a normal vector judgment method to obtain a target overlapping mapping relationship.

[0011] Furthermore, the GPU-based calculation of the first overlapping mapping relationship of the target overlapping grids includes:

[0012] Splitting the background and component grids in the target overlapping grid into a plurality of rectangular sub-regions;

[0013] Determine the overlapping mapping relationship between each sub-region through the coordinate range of each rectangular sub-region;

[0014] If the rectangular sub-region of the background grid overlaps with the rectangular sub-region of the component grid, the GPU calculates the overlapping relationship between the grids within each sub-region to obtain a first overlapping mapping relationship.

[0015] Furthermore, the overlapping mapping relationship storage array is a two-dimensional array of fixed size.

[0016] Furthermore, the calculating the second overlapping mapping relationship from the background grid to the component grid based on the overlapping mapping relationship storage array and the GPU kernel function includes:

[0017] Storing an array based on the overlapping mapping relationship to obtain a plurality of polyhedrons;

[0018] decomposing the plurality of polyhedrons into a plurality of tetrahedral units;

[0019] The plurality of tetrahedral units are processed by a GPU kernel function to calculate a second overlapping mapping relationship between the background mesh and the component mesh.

[0020] Furthermore, the processing of the plurality of tetrahedral units by a GPU kernel function to calculate a second overlapping mapping relationship between the background mesh and the component mesh includes:

[0021] Call the GPU kernel function and load X thread blocks at the same time;

[0022] Through the thread block, a loop operation of determining whether the center point of the grid unit is within the tetrahedral unit is executed Y times to calculate the second overlapping mapping relationship between the background grid and the component grid; Y is the total number of tetrahedral units.

[0023] Furthermore, the X thread blocks can be determined as follows:

[0024] ;

[0025] in, The number of grid cells contained in the i-th rectangular sub-region of the background grid.

[0026] In a second aspect of the present application, a GPU-based overlapping grid processing device is provided. The device comprises:

[0027] An acquisition module, used to obtain target overlapping grids;

[0028] A first calculation module, configured to calculate a first overlapping mapping relationship of the target overlapping grid based on a GPU;

[0029] An establishing module, configured to establish an overlapping mapping relationship storage array adapted to a GPU architecture based on the first overlapping mapping relationship;

[0030] A second calculation module is used to calculate a second overlapping mapping relationship from the background grid to the component grid based on the overlapping mapping relationship storage array and the GPU kernel function;

[0031] The processing module is used to remove misjudgment data in the second overlapping mapping relationship by using a normal vector judgment method to obtain a target overlapping mapping relationship.

[0032] In a third aspect of the present application, an electronic device is provided, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor implements the above method when executing the program.

[0033] In a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method according to the first aspect of the present application is implemented.

[0034] The GPU-based overlapping grid processing method provided in the embodiment of the present application obtains a target overlapping grid; calculates a first overlapping mapping relationship of the target overlapping grid based on the GPU; establishes an overlapping mapping relationship storage array compatible with the GPU architecture based on the first overlapping mapping relationship; calculates a second overlapping mapping relationship from the background grid to the component grid based on the overlapping mapping relationship storage array and the GPU kernel function; removes misjudgment data in the second overlapping mapping relationship through a normal vector judgment method to obtain a target overlapping mapping relationship, thereby solving the problems of slow calculation speed, time-consuming calculation and low calculation efficiency of the overlapping mapping relationship.

[0035] It should be understood that the contents described in the Summary of the Invention are not intended to limit the key or important features of the embodiments of the present application, nor are they intended to limit the scope of the present application. Other features of the present application will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The above and other features, advantages and aspects of the embodiments of the present application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0037] Figure 1 is a flowchart of a GPU-based overlapping grid processing method according to an embodiment of the present application;

[0038] Figure 2 is a schematic diagram of overlapping grids according to an embodiment of the present application;

[0039] Figure 3 Schematic diagram of decomposition of overlapping grid rectangular sub-regions according to an embodiment of the present application; wherein, Figure 3 (a) is a schematic diagram of a rectangular sub-region; Figure 3 (b) is a schematic diagram of the overlapping area;

[0040] Figure 4 Schematic diagram of misjudgment of overlapping grids according to an embodiment of the present application;

[0041] Figure 5 Schematic diagram of normal vector determination according to an embodiment of the present application;

[0042] Figure 6 A schematic diagram of angle judgment according to an embodiment of the present application;

[0043] Figure 7 is a block diagram of a GPU-based overlay grid processing device according to an embodiment of the present application;

[0044] Figure 8 A schematic diagram of the structure of a terminal device or server suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION

[0045] To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of the present disclosure.

[0046] In this document, the term "and / or" simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0047] Figure 1 A flowchart of a GPU-based overlapping grid processing method according to an embodiment of the present disclosure is shown. The method includes:

[0048] S110, obtaining target overlapping grids.

[0049] In some embodiments, the data can be obtained by wired or wireless means. Figure 2 The target overlapping grid to be processed is shown in FIG. Figure 2 As shown, the black rectangular grid is the background grid, and the range of the grid unit is set to [1, Nb]. The circular grid in the middle is the component grid, and the range of the grid unit is [1, Np].

[0050] S120: Calculate a first overlapping mapping relationship of the target overlapping grids based on a GPU.

[0051] When calculating overlap relationships, it's often necessary to compare the center coordinates of all cells in the background mesh with those of each cell in the component mesh. This is a classic computational geometry problem: determining whether a point is inside a polyhedron. Considering that computational meshes are typically composed of tetrahedrons, triangular prisms, pyramids, and hexahedrons, and that triangular prisms, pyramids, and hexahedrons can be decomposed into multiple tetrahedrons, decomposition can transform the polyhedron-inside-a-point algorithm into a tetrahedron-inside-a-point algorithm.

[0052] Calculate the relationship between the center coordinates of a cell in the background grid and the component grid. It is necessary to execute Np cycles for a maximum of The judgment of the secondary point in the tetrahedron unit, the tetrahedron ( =1 times), triangular prism ( = 14 times), Pyramid ( =8 times) and hexahedron ( = 24 times). That is, to complete the mapping relationship of all cells of the background grid, The judgment of the secondary point within the tetrahedron unit. Similarly, to complete the mapping relationship between the component mesh and the background mesh, it is necessary to The judgment of the secondary point in the tetrahedron unit, so the total number of judgments is In summary, when the background grid volume and the component grid volume are both increased by 2 times, the number of judgments will increase by 4 times.

[0053] In some embodiments, in order to improve the calculation speed of overlapping mapping relationships, grid screening can be performed first, such as Figure 3 As shown in (a), the background and component grids are divided into rectangular sub-regions of different sizes, and the number of grid units in each rectangular sub-region does not exceed (background grid) or (Component mesh). Figure 3As shown in (b), the overlapping mapping relationship between rectangular subregions can be quickly determined on the CPU using coordinate ranges (by comparing x, y, and z coordinates). If a rectangular subregion of the background mesh overlaps with a rectangular subregion of the component mesh, the GPU is used to determine the overlapping relationship between the meshes within each subregion (the intersection of the two rectangles). This calculation is then completed for all subregions, resulting in the overlapping mapping relationship for all meshes. This is known as the first overlapping mapping relationship.

[0054] S130: Based on the first overlapping mapping relationship, establish an overlapping mapping relationship storage array that is compatible with the GPU architecture.

[0055] In some embodiments, to facilitate efficient GPU execution and fast access to video memory data, the overlapping mapping relationship storage array can be designed as a fixed-size two-dimensional array. For example, when programming in CUDA Fortran, the first index range of the two-dimensional array is [1, Nb+Np], and the second index range is [1, n], where n is the number of overlapping grid layers, typically limited to 3 or 4. After array initialization, the GPU kernel function can be further solved.

[0056] S140 , calculating a second overlapping mapping relationship from the background grid to the component grid based on the overlapping mapping relationship storage array and the GPU kernel function.

[0057] Assume that the i-th rectangular subregion of the background mesh (containing Ni grid cells) overlaps with the j-th rectangular subregion of the component mesh (containing Nj grid cells). In this case, calculating the overlapping mapping relationship between the background mesh and the component mesh is to determine the positional relationship between the center points of the Ni grid cells and the Nj polyhedrons (composed of tetrahedrons, triangular prisms, pyramids, and hexahedrons). A triangular prism can be decomposed into 14 tetrahedrons, a pyramid can be decomposed into 8 tetrahedrons, and a hexahedron can be decomposed into 24 tetrahedrons.

[0058] In some embodiments, due to the GPU's inability to handle branches, triangular prism, pyramid, and hexahedral meshes can be decomposed into multiple tetrahedral units, with the total number of tetrahedrons after decomposition set to Mj. In other words, determining the positional relationship between the center points of Ni mesh units and Nj polyhedrons can be transformed into determining the positional relationship between the center points of Ni mesh units and Mj tetrahedrons.

[0059] Furthermore, in the GPU kernel function, the thread block size is generally 256. Each kernel function call will load X thread blocks simultaneously. Each thread in each thread block maps a grid cell and simultaneously executes Mj times of the loop operation to determine whether the center point of the grid cell is within the tetrahedron cell, and calculates the second overlapping mapping relationship between the background grid and the component grid;

[0060] Among them, X thread blocks can be determined as follows:

[0061] ;

[0062] in, is the number of grid cells contained in the i-th rectangular sub-region of the background grid.

[0063] In summary, the calculation of points within a tetrahedral unit is basically floating-point operations such as addition, subtraction, multiplication, and division, which can give full play to the single-precision floating-point performance advantage of the GPU and speed up the calculation process.

[0064] S150: Remove misjudged data in the second overlapping mapping relationship by using a normal vector judgment method to obtain a target overlapping mapping relationship.

[0065] In some embodiments, in the algorithm for determining whether a point is within a tetrahedron unit, single-precision calculation is generally used to take advantage of the GPU's speed, but this is prone to misjudgment. The relationship between a point and a plane can be divided into three types: above, exactly on the plane, and below. Misjudgment occurs in the "just on the plane" situation. In this case, the accuracy error of the computer may cause the judgment to fail. Figure 4 As shown, the black dots in the middle elliptical area are misjudgment points. In order to give full play to the advantages of GPU single-precision floating-point computing performance, in this disclosure, the following misjudgment elimination strategy that does not rely on double-precision performance is designed:

[0066] The algorithm for determining whether a point is within a tetrahedron unit uses the normal vector judgment method (the ray method has many logical judgments and is not suitable for GPU concurrent processing), that is, the relative position of the point and the triangular plane is judged four times, such as Figure 5 As shown:

[0067] triangle<p1,p2,p3> The normal vector is When any point ps is located on the triangle plane, if the vector p1→ps is used as the detection line, the dot product of the detection line vector and the normal vector is theoretically 0; however, since the floating point error will be a very small number, and the positive and negative directions are randomly determined, it will lead to failure in judging the relative position of the point and the triangle plane. In order to solve the above problem, the following solution can be adopted, such as Figure 6 As shown in the figure, first, the length judgment of the vector dot product is changed to the angle judgment between the two vectors. Considering that the arbitrariness of ps may cause the length of the detection segment to be 0, detection segment 2 is introduced at this time. The longest segment between detection segments 1 and 2 is taken for angle judgment, and an error tolerance of 0.001 degrees (which can be adjusted according to the actual application scenario) is set. If the angle between the detection vector and the normal vector is less than 89.999 degrees, the point is considered to be above the triangle plane; otherwise, it is below.

[0068] Furthermore, after all GUP kernel functions have completed concurrent execution, a synchronization operation is called to store the overlapping mapping relationship calculation results into a two-dimensional array designed as in step 130 to obtain a target overlapping mapping relationship.

[0069] According to the embodiments of the present disclosure, the following technical effects are achieved:

[0070] It can effectively meet the high computational efficiency and speed requirements of modern engineering simulations while maintaining the accuracy of traditional CPU calculations. The algorithm designed in this disclosure is simple to implement and has low development difficulty. It fully leverages the architectural advantages of the GPU and does not rely on double-precision algorithms to determine whether a point is within a tetrahedron element. For large-scale grids exceeding tens of millions, the speed of the GPU-based overlapping grid processing algorithm can be increased by more than an order of magnitude compared to traditional CPU processing on mainstream consumer graphics cards.

[0071] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions and modules involved are not necessarily required by this application.

[0072] The above is an introduction to the method embodiment. The following is a device embodiment to further illustrate the solution described in this application.

[0073] Figure 7 FIG. 7 shows a GPU-based overlapping grid processing device 700 according to an embodiment of the present application, as shown in FIG. Figure 7 Shown include:

[0074] An acquisition module 710 is used to acquire target overlapping grids;

[0075] A first calculation module 720 is configured to calculate a first overlapping mapping relationship of the target overlapping grid based on a GPU;

[0076] An establishing module 730 is configured to establish an overlapping mapping relationship storage array adapted to a GPU architecture based on the first overlapping mapping relationship;

[0077] A second calculation module 740 is configured to calculate a second overlapping mapping relationship between the background grid and the component grid based on the overlapping mapping relationship storage array and the GPU kernel function;

[0078] The processing module 750 is configured to remove misjudged data in the second overlapping mapping relationship by using a normal vector judgment method to obtain a target overlapping mapping relationship.

[0079] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0080] Figure 8 A schematic diagram of the structure of a terminal device or server suitable for implementing the embodiments of the present application is shown.

[0081] like Figure 8 As shown, the terminal device or server includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 802 or the program loaded from the storage part 808 into the random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the terminal device or server are also stored. The CPU 801, ROM 802 and RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0082] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, and the like; an output section 807 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 808 including a hard disk; and a communication section 809 including a network interface card such as a LAN card or a modem. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 810 as needed, so that computer programs read therefrom can be installed into the storage section 808 as needed.

[0083] In particular, according to an embodiment of the present application, the above method flow steps can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a machine-readable medium, and the computer program includes 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 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present application are executed.

[0084] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.

[0085] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the aforementioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than 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 and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0086] The units or modules involved in the embodiments described in this application may be implemented in software or hardware. The units or modules described may also be provided in a processor. The names of these units or modules do not, in certain circumstances, constitute limitations on the units or modules themselves.

[0087] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments, or may exist independently and not be incorporated into the electronic device. The computer-readable storage medium stores one or more programs, which, when used by one or more processors, execute the method described in the present application.

[0088] The above description is merely a preferred embodiment of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of application involved in this application is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the aforementioned application concept. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions applied for in this application.

Claims

1. A GPU-based overlapping grid processing method, characterized in that: include: Get the target overlapping grid; Calculating a first overlapping mapping relationship of the target overlapping grid based on a GPU; Based on the first overlapping mapping relationship, establishing an overlapping mapping relationship storage array adapted to the GPU architecture includes: Splitting the background and component grids in the target overlapping grid into a plurality of rectangular sub-regions; Determine the overlapping mapping relationship between each sub-region through the coordinate range of each rectangular sub-region; If the rectangular sub-region of the background grid overlaps with the rectangular sub-region of the component grid, the GPU calculates the overlapping relationship between the grids within each sub-region to obtain a first overlapping mapping relationship; Calculating a second overlapping mapping relationship from the background grid to the component grid based on the overlapping mapping relationship storage array and the GPU kernel function includes: Storing an array based on the overlapping mapping relationship to obtain a plurality of polyhedrons; decomposing the plurality of polyhedrons into a plurality of tetrahedral units; Processing the plurality of tetrahedral units by a GPU kernel function to calculate a second overlapping mapping relationship between the background mesh and the component mesh includes: Call the GPU kernel function and load X thread blocks at the same time; By means of the thread block, a loop operation of determining whether the center point of the grid unit is within the tetrahedral unit is executed Y times, and a second overlapping mapping relationship between the background grid and the component grid is calculated; Y is the total number of tetrahedral units; The misjudged data in the second overlapping mapping relationship is removed by a normal vector judgment method to obtain a target overlapping mapping relationship.

2. The method according to claim 1, characterized in that The overlapping mapping relationship storage array is a two-dimensional array of fixed size.

3. The method according to claim 2, characterized in that The X thread blocks can be determined as follows: ; in, is the number of grid cells contained in the i-th rectangular sub-region of the background grid.

4. A GPU-based overlapping grid processing device, characterized in that: include: An acquisition module, used to obtain target overlapping grids; A first calculation module, configured to calculate a first overlapping mapping relationship of the target overlapping grid based on a GPU, comprising: Splitting the background and component grids in the target overlapping grid into a plurality of rectangular sub-regions; Determine the overlapping mapping relationship between each sub-region through the coordinate range of each rectangular sub-region; If the rectangular sub-region of the background grid overlaps with the rectangular sub-region of the component grid, the GPU calculates the overlapping relationship between the grids within each sub-region to obtain a first overlapping mapping relationship; An establishing module, configured to establish an overlapping mapping relationship storage array adapted to a GPU architecture based on the first overlapping mapping relationship; The second calculation module is configured to calculate a second overlapping mapping relationship between the background grid and the component grid based on the overlapping mapping relationship storage array and the GPU kernel function, including: Storing an array based on the overlapping mapping relationship to obtain a plurality of polyhedrons; decomposing the plurality of polyhedrons into a plurality of tetrahedral units; Processing the plurality of tetrahedral units by a GPU kernel function to calculate a second overlapping mapping relationship between the background mesh and the component mesh includes: Call the GPU kernel function and load X thread blocks at the same time; By means of the thread block, a loop operation of determining whether the center point of the grid unit is within the tetrahedral unit is executed Y times, and a second overlapping mapping relationship between the background grid and the component grid is calculated; Y is the total number of tetrahedral units; The processing module is used to remove misjudgment data in the second overlapping mapping relationship by using a normal vector judgment method to obtain a target overlapping mapping relationship.

5. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 3 is implemented.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Aircraft performance optimization method, device and equipment based on efficient dynamic grid technology

    CN116861558A