Overlapped grid processing method based on GPU
By processing overlapping mesh on the GPU and calculating overlapping mapping relationships, the problem of inefficient CPU processing is solved, and a significant calculation speed is achieved, which is suitable for engineering simulation of large-scale grids.
Patent Information
- Application Number
- CN202510663546.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-05-22
AI Technical Summary
In the prior art, CPU-based overlap grid processing has problems such as slow computing speed, time-consuming computing and low computing efficiency, especially when dealing with large-scale grids.
Using the GPU-based overlap grid processing method, by obtaining the target overlap grid, calculating the first overlap mapping relationship based on the GPU, and establishing an overlap mapping relationship that is suitable for the GPU architecture storage array, then calculating the second overlap mapping relationship based on this array and the GPU kernel function, and removing the wrong judgment data through the normal vector judgment method to obtain the target overlap mapping relationship.
The calculation speed and efficiency of overlapping mapping relationships are significantly improved, and large-scale grids of more than tens of millions of units can be processed on mainstream consumer graphics cards, which is more than one order of magnitude higher than traditional CPU processing.
Smart Images

Figure CN120179425A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of data processing, and particularly to an overlapping grid processing method, device, equipment, and computer-readable storage medium based on a GPU. Background Art
[0002] An overlapping grid is a grid processing technology commonly used in the simulation of complex flows and moving objects. Compared with the traditional single-grid method, the overlapping grid can effectively handle problems such as complex geometries, rigid body motions, and shape changes by using multiple grids in multiple regions and overlapping these grids with each other. Especially in the simulation of unsteady flow fields of moving objects in engineering application fields such as aviation, aerospace, and automotive, the overlapping grid has become an essential technical tool for complex motion simulation. The performance efficiency of overlapping grid processing determines the overall efficiency of unsteady flow field simulation.
[0003] Currently, traditional CPU computing usually adopts sub-thread acceleration means or uses MPI (Message Passing Interface, a standard communication protocol) for multi-process parallel acceleration. Due to the limitations of the number of CPU cores and the CPU cache bandwidth, the acceleration effect of using sub-thread means is often limited; and affected by additional high-time-consuming tasks such as a large amount of data distribution and collection, and communication overhead between processes, the MPI multi-process acceleration method also has problems such as unsatisfactory acceleration effect and low parallel efficiency. Since the computational amount of the overlapping mapping relationship is proportional to the square of the grid amount, when the grid amount increases by 2 times, the computational amount of the overlapping relationship increases by 4 times, and when the grid amount increases, the overlapping grid processing time increases sharply. For grids in the tens of millions and hundreds of millions commonly used in engineering, the overlapping mapping relationship based on the CPU is difficult to meet the engineering requirements. Summary of the Invention
[0004] According to the embodiments of the present application, an overlapping grid processing solution based on a GPU is provided, which can solve the problems of slow calculation speed, long calculation time, and low calculation efficiency of the overlapping mapping relationship.
[0005] In the first aspect of the present application, an overlapping grid processing method based on a GPU is provided. The method includes: Obtain a target overlapping grid; Calculate a first overlapping mapping relationship of the target overlapping grid based on the GPU; Based on the first overlapping mapping relationship, establish an overlapping mapping relationship storage array adapted to the GPU architecture; 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; Remove the misjudged data in the second overlapping mapping relationship through the normal vector judgment method to obtain the target overlapping mapping relationship.
[0006] Further, the calculating the first overlapping mapping relationship of the target overlapping grid based on the GPU includes: Split the background and component grids in the target overlapping grid into multiple 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, calculate the overlapping relationship between the internal grids of each sub-region through the GPU to obtain the first overlapping mapping relationship.
[0007] Further, the overlapping mapping relationship storage array is a two-dimensional array with a fixed size.
[0008] Further, 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: Based on the overlapping mapping relationship storage array, obtain multiple polyhedrons; Decompose the multiple polyhedrons into multiple tetrahedron units; Process the multiple tetrahedron units through the GPU kernel function to calculate the second overlapping mapping relationship from the background grid to the component grid.
[0009] Further, the processing the multiple tetrahedron units through the GPU kernel function to calculate the second overlapping mapping relationship from the background grid to the component grid includes: Call the GPU kernel function and load X thread blocks at the same time; Through the thread blocks, perform Y loop operations to judge whether the center point of the grid cell is inside the tetrahedron unit, and calculate the second overlapping mapping relationship from the background grid to the component grid; Y is the total number of tetrahedron units.
[0010] Further, the X thread blocks can be determined in the following way: ; where is the number of grid cells included in the i-th rectangular sub-region of the background grid.
[0011] In the second aspect of the present application, an overlapping grid processing device based on the GPU is provided. The device includes: An acquisition module, configured to acquire a target overlapping grid; A first calculation module, configured to calculate the first overlapping mapping relationship of the target overlapping grid based on the GPU; A building module, configured to build an overlapping mapping relationship storage array adapted to the GPU architecture based on the first overlapping mapping relationship; A second calculation module, configured to calculate a second overlapping mapping relationship from a background grid to a component grid based on the overlapping mapping relationship storage array and a GPU kernel function; A processing module, configured to remove misjudged data in the second overlapping mapping relationship through a normal vector judgment method to obtain a target overlapping mapping relationship.
[0012] In a third aspect of the present application, an electronic device is provided. The electronic device includes: a memory and a processor, where a computer program is stored on the memory, and when the processor executes the program, the method as described above is implemented.
[0013] In a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method according to the first aspect of the present application is implemented.
[0014] The overlapping grid processing method based on GPU provided by the embodiments of the present application solves the problems of slow calculation speed, long calculation time, and low calculation efficiency of the overlapping mapping relationship by obtaining a target overlapping grid; calculating a first overlapping mapping relationship of the target overlapping grid based on GPU; building an overlapping mapping relationship storage array adapted to the GPU architecture based on the first overlapping mapping relationship; calculating a second overlapping mapping relationship from a background grid to a component grid based on the overlapping mapping relationship storage array and a GPU kernel function; and removing misjudged data in the second overlapping mapping relationship through a normal vector judgment method to obtain a target overlapping mapping relationship.
[0015] It should be understood that the content described in the summary of the invention section is not intended to limit the key or important features of the embodiments of the present application, nor to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Combined with the drawings and referring to the following detailed description, the above and other features, advantages, and aspects of the embodiments of the present application will become more obvious. In the drawings, the same or similar reference numerals represent the same or similar elements, where: Figure 1 is a flowchart of an overlapping grid processing method based on GPU according to an embodiment of the present application; Figure 2 is a schematic diagram of an overlapping grid according to an embodiment of the present application; Figure 3 is a schematic diagram of the decomposition of a rectangular sub-region of an overlapping grid according to an embodiment of the present application; where, Figure 3 (a) is a schematic diagram of a rectangular sub-region; Figure 3(b) Schematic diagram of the overlapping area; Figure 4 Schematic diagram of misjudgment of overlapping grids according to an embodiment of the present application; Figure 5 Schematic diagram of normal vector judgment according to an embodiment of the present application; Figure 6 Schematic diagram of angle judgment according to an embodiment of the present application; Figure 7 Block diagram of a GPU-based overlapping grid processing device according to an embodiment of the present application; Figure 8 Schematic diagram of the structure of a terminal device or server suitable for implementing the embodiments of the present application. Specific implementation manners
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present disclosure without creative efforts shall fall within the scope of protection of the present disclosure.
[0018] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the preceding and following associated objects.
[0019] Figure 1 The flowchart of a GPU-based overlapping grid processing method according to an embodiment of the present disclosure is shown. The method includes: S110, obtaining a target overlapping grid.
[0020] In some embodiments, the target overlapping grid to be processed as shown can be obtained by wired or wireless means. As Figure 2 shown, the black rectangular grid is the background grid, and the range of the grid cells is set as [1, Nb], and the middle circular grid is the component grid, and the range of the grid cells is [1, Np]. Figure 2 As
[0021] S120, calculating a first overlapping mapping relationship of the target overlapping grid based on the GPU.
[0022] When calculating the overlapping relationship, it is usually necessary to judge the central coordinates of all grid cells of the background grid against each grid cell of the component grid, that is, the classic computational geometry problem: the algorithm for whether a point is inside a polyhedron. Considering that the computational grid is generally composed of tetrahedrons, triangular prisms, pyramids, and hexahedrons, and triangular prisms, pyramids, and hexahedrons can be decomposed into multiple tetrahedrons, therefore, through decomposition, the algorithm for whether a point is inside a polyhedron can be converted into the algorithm for whether a point is inside a tetrahedron.
[0023] To calculate the relationship between the central coordinates of a certain cell of the background grid and the component grid, Np loops need to be executed, and at most judgments of whether a point is inside a tetrahedron cell are made. For a tetrahedron ( = 1 time), a triangular prism ( = 14 times), a pyramid ( = 8 times), and a hexahedron ( = 24 times). That is, to complete the mapping relationship of all cells of the background grid, judgments of whether a point is inside a tetrahedron cell are required. Similarly, to complete the mapping relationship from the component grid to the background grid, judgments of whether a point is inside a tetrahedron cell are required. Therefore, the total number of judgments is . In summary, it can be seen that when both the amount of the background grid and the amount of the component grid increase by 2 times, the number of judgments will increase by 4 times.
[0024] In some embodiments, in order to improve the calculation speed of the overlapping mapping relationship, grid screening can be performed first. As shown in Figure 3 (a), both the background and component grids are divided into rectangular sub-regions of different sizes, and the number of grid cells contained in each rectangular sub-region does not exceed (background grid) or (component grid). As shown in Figure 3 (b), the overlapping mapping relationship between rectangular sub-regions can be quickly judged on the CPU by comparing the coordinate ranges (comparing coordinates xyz); if a rectangular sub-region of the background grid overlaps with a certain rectangular sub-region of the component grid, then the overlapping relationship between the grids inside each sub-region is judged using the GPU (the intersection of two rectangles), and after all sub-regions are calculated, the overlapping mapping relationship of all grids is obtained. That is, the first overlapping mapping relationship.
[0025] S130. Based on the first overlapping mapping relationship, establish an overlapping mapping relationship storage array adapted to the GPU architecture.
[0026] In some embodiments, to facilitate the efficient execution of the GPU and the fast access to the video memory data, the overlapping mapping relationship storage array can be designed as a two-dimensional array with a fixed size. For example, when using CUDA Fortran programming, 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 layers of all grids, which can usually be limited to 3 or 4. After the array initialization is executed, the solution of the GPU kernel function can be further executed.
[0027] S140. Based on the overlapping mapping relationship storage array and the GPU kernel function, calculate the second overlapping mapping relationship from the background grid to the component grid.
[0028] It is assumed that the i-th rectangular sub-region of the background grid (including Ni grid cells) overlaps with the j-th rectangular sub-region of the component grid (including Nj grid cells). At this time, calculating the overlapping mapping relationship from the background grid to the component grid is to judge the position relationship between the center points of Ni grid cells and 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.
[0029] In some embodiments, based on the characteristic that the GPU is not good at handling branches, the triangular prism, pyramid, and hexahedron grids can all be decomposed into multiple tetrahedron units, and it is assumed that the total number of tetrahedrons after decomposition is Mj. That is, the position relationship between the center points of Ni grid cells and Nj polyhedrons can be transformed into the position relationship between the center points of Ni grid cells and Mj tetrahedrons.
[0030] Furthermore, in the GPU kernel function, the size of the thread block is generally 256, and each time the kernel function is called, X thread blocks will be loaded simultaneously. Each thread in each thread block maps a grid cell and simultaneously executes the loop operation of judging whether the center point of the grid cell is inside the tetrahedron unit Mj times to calculate the second overlapping mapping relationship from the background grid to the component grid; Among them, the X thread blocks can be determined in the following way: ; Among them, is the number of grid cells included in the i-th rectangular sub-region of the background grid.
[0031] To sum up, the calculation of whether a point is inside a tetrahedron unit is basically floating-point arithmetic operations such as addition, subtraction, multiplication, and division, which can give full play to the performance advantage of the GPU's single-precision floating-point arithmetic and speed up the calculation process.
[0032] S150. Remove the misjudged data in the second overlapping mapping relationship through the normal vector judgment method to obtain the target overlapping mapping relationship.
[0033] In some embodiments, in the algorithm for determining whether a point is inside a tetrahedral element, in order to take advantage of the speed of the GPU, single-precision calculation is generally used, but misjudgment is likely to occur; the relationship between a point and a plane can be divided into three types, namely above, exactly on the plane, and below. Misjudgment occurs in the case of "exactly on the plane". At this time, the judgment may fail due to the precision error of the computer. As Figure 4 shown, the black dots in the middle elliptical area are misjudged points. In order to fully utilize the performance advantages of GPU single-precision floating-point operations, in the present disclosure, the following misjudgment elimination strategy that does not rely on double-precision performance is designed: The algorithm for determining whether a point is inside a tetrahedral element uses the normal vector judgment method (the ray method has too much logical judgment and is not suitable for GPU concurrent processing). That is, the relative position of the point and the triangular plane is judged 4 times, as Figure 5 shown: The normal vector of the triangle <p1, p2, p3> is . When any point ps is on the triangular plane, if the vector p1→ps is used as the detection line, the dot product theory of the detection line vector and the normal vector is 0; but due to floating-point error, it will be an extremely small number, and the positive and negative directions are randomly determined, which will lead to the failure of the relative position judgment of the point and the triangular plane. To solve the above problems, the following solution can be adopted, as Figure 6 shown. First, change the length judgment of the vector dot product to the angle judgment between two vectors. Considering that the randomness of ps may cause the length of the detection line segment to be 0, at this time, introduce the detection line segment 2, and take the longest line segment between the detection line segment 1 and 2 for angle judgment. Set an error tolerance of 0.001 degrees (which can be adjusted according to the actual application scenario). If the angle between the detection vector and the normal vector is less than 89.999 degrees, it is considered that the point is above the triangular plane; otherwise, it is below.
[0034] Further, after all GUP kernel functions complete concurrent execution, a synchronization operation is called to store the calculation result of the overlapping mapping relationship into the two-dimensional array designed in step 130 to obtain the target overlapping mapping relationship.
[0035] According to the embodiments of the present disclosure, the following technical effects are achieved: It can effectively meet the high requirements of modern engineering simulation for calculation efficiency and speed, and at the same time has the precision of traditional CPU calculation. The algorithm designed in the present disclosure is simple to implement and has a low development difficulty. It can give full play to the architecture advantages of the GPU and does not rely on the double-precision calculation algorithm for determining whether a point is inside a tetrahedral element. For large-scale grids of tens of millions or more, on mainstream consumer-grade graphics cards, the speed of the GPU overlapping grid processing algorithm can be improved by more than one order of magnitude compared with traditional CPU processing.
[0036] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0037] The above is the introduction of the method embodiments. The following further illustrates the solution of this application through device embodiments.
[0038] Figure 7 Fig. 700 shows an overlapping grid processing device based on GPU according to an embodiment of the present application, as Figure 7 shown including: An acquisition module 710, configured to acquire a target overlapping grid; A first calculation module 720, configured to calculate a first overlapping mapping relationship of the target overlapping grid based on GPU; A building module 730, configured to build an overlapping mapping relationship storage array adapted to the GPU architecture based on the first overlapping mapping relationship; A second calculation module 740, configured 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; A processing module 750, configured to remove misjudged data in the second overlapping mapping relationship through normal vector judgment to obtain a target overlapping mapping relationship.
[0039] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the described modules can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated here.
[0040] Figure 8 Fig. shows a schematic structural diagram of a terminal device or a server suitable for implementing the embodiments of the present application.
[0041] As Figure 8 shown, the terminal device or the 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 section 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 the server are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. The input / output (I / O) interface 805 is also connected to the bus 804.
[0042] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. as well as a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. 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, a semiconductor memory, etc. is mounted on the drive 810 as needed so that a computer program read from it is installed into the storage section 808 as needed.
[0043] Specifically, 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 that includes a computer program carried on a machine-readable medium, and the computer program includes program codes for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by a central processing unit (CPU) 801, the above functions defined in the system of the present application are executed.
[0044] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium 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, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device. And in this application, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0045] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram can represent a module, a program segment, or a part of code, and the foregoing module, program segment, or part of code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0046] The units or modules involved in the embodiments described in this application can be implemented in software or in hardware. The described units or modules can also be provided in a processor. Among them, the names of these units or modules do not, in some cases, constitute a limitation on the units or modules themselves.
[0047] As another aspect, this application also provides a computer-readable storage medium, which can be included in the electronic device described in the above embodiments; or can exist alone without being assembled into the electronic device. The above computer-readable storage medium stores one or more programs, and when the foregoing programs are executed by one or more processors, the methods described in this application are implemented.
[0048] The above description is only a preferred embodiment of this application and an explanation of the technical principles applied. Those skilled in the art should understand that the scope of the application involved in this application is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the foregoing inventive concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions described in this application.
Claims
1. A method for processing overlapping grids based on GPU, characterized in that, Including: Obtain the target overlapping grid; Based on the GPU, calculate the first overlapping mapping relationship of the target overlapping grid; Based on the first overlapping mapping relationship, establish an overlapping mapping relationship storage array adapted to the GPU architecture; Based on the overlapping mapping relationship storage array and the GPU kernel function, calculate the second overlapping mapping relationship from the background grid to the component grid; Remove the misjudged data in the second overlapping mapping relationship through the normal vector judgment method to obtain the target overlapping mapping relationship.
2. The method according to claim 1, characterized in that, The calculating the first overlapping mapping relationship of the target overlapping grid based on the GPU includes: Split the background and component grids in the target overlapping grid into multiple 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, calculate the overlapping relationship between the internal grids of each sub-region through the GPU to obtain the first overlapping mapping relationship.
3. The method according to claim 2, characterized in that, The overlapping mapping relationship storage array is a two-dimensional array with a fixed size.
4. The method according to claim 3, characterized in that, 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: Based on the overlapping mapping relationship storage array, obtain multiple polyhedrons; Decompose the multiple polyhedrons into multiple tetrahedral units; Process the multiple tetrahedral units through the GPU kernel function to calculate the second overlapping mapping relationship from the background grid to the component grid.
5. The method according to claim 4, characterized in that, The processing the multiple tetrahedral units through the GPU kernel function to calculate the second overlapping mapping relationship from the background grid to the component grid includes: Call the GPU kernel function and load X thread blocks simultaneously; Through the thread blocks, perform Y loop operations to judge whether the center point of the grid cell is inside the tetrahedral unit, and calculate the second overlapping mapping relationship from the background grid to the component grid; Y is the total number of tetrahedral units.
6. The method according to claim 5, characterized in that, The X thread blocks can be determined in the following way: ; Among them, is the number of grid cells included in the i-th rectangular sub-region of the background grid.
7. A device for processing overlapping grids based on GPU, characterized in that, Including: An acquisition module for acquiring the target overlapping grid; A first calculation module for calculating the first overlapping mapping relationship of the target overlapping grid based on the GPU; A building module for building an overlapping mapping relationship storage array adapted to the GPU architecture based on the first overlapping mapping relationship; A second calculation module for 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; A processing module for removing the misjudged data in the second overlapping mapping relationship through the normal vector judgment method to obtain the target overlapping mapping relationship.
8. The device according to claim 7, characterized in that, The calculating the first overlapping mapping relationship of the target overlapping grid based on the GPU includes: Split the background and component grids in the target overlapping grid into multiple 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, calculate the overlapping relationship between the internal grids of each sub-region through the GPU to obtain the first overlapping mapping relationship.
9. An electronic device, comprising a memory and a processor, wherein a computer program is stored on the memory, characterized in that, When the processor executes the computer program, it implements the method described in any one of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Multi-GPU (Graphics Processing Unit) parallel finite-difference time domain electromagnetic simulation method, equipment and medium
CN114117872A
Aircraft performance optimization method, device and equipment based on efficient dynamic grid technology
CN116861558A
Systems and methods for identifying grids of geographical region in map
US20200279170A1
Graphics processing unit (GPU)-based numerical simulation system and method for helicopter flow field (FF)
US20240419874A1