Construction method of distributed unstructured grid topology

By judging the non-structural grid dimensions in a distributed environment and constructing one-dimensional to three-dimensional grid topology in sequence, combined with the communication mechanism to exchange the adjacency information of boundary units, the problems of large memory demand, unbalanced load, repeated calculations and high communication costs in the existing technology are solved, and efficient distributed non-structural grid topology construction is achieved.

CN119989596APending Publication Date: 2025-05-13SHENGONGFANG (WUXI) DIGITAL TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510076111.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art has problems such as large memory requirements, unbalanced load, repeated calculations and high communication costs when building non-structural grid topology in distributed environments.

Method used

By judging the dimensions of non-structural grids, one-dimensional to three-dimensional grid topology is constructed in turn, using the communication mechanism to exchange the adjacency information of boundary units, reducing memory requirements and communication costs, and avoiding repeated calculations by clear construction order.

Benefits of technology

It realizes efficient construction of distributed non-structural grid topology in a distributed environment, reduces memory requirements and communication costs, and improves computing efficiency and numerical simulation accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119989596A_ABST
    Figure CN119989596A_ABST
Patent Text Reader

Abstract

The invention provides a distributed unstructured grid topology construction method, and relates to the field of unstructured grids, and the method comprises the steps: judging the dimension of an unstructured grid; if the grid is a three-dimensional grid, sequentially constructing 16 grid topologies consisting of points, edges, surfaces and a body on the basis of the body-point topology; if the grid is a two-dimensional grid, nine grid topologies composed of points, edges and surfaces are constructed in sequence on the basis of the surface-point topology; if the grid is a one-dimensional grid, sequentially constructing four grid topologies consisting of points and edges on the basis of the edge-point topology; when the grid topology is constructed, cross-process adjacency information is supplemented and synchronized through communication. According to the method, the problems of large memory demand, unbalanced load, repeated calculation and high communication cost during use in the prior art can be solved, a complete distributed unstructured grid topology construction parallel algorithm process is provided, and it is ensured that the method can be efficiently applied to different numerical simulation scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of unstructured grids, and in particular to a method for constructing a distributed unstructured grid topology. Background Art

[0002] Unstructured grid is a type of grid used for numerical simulation, which is composed of irregular polygons or polyhedrons. The size and shape of its units can be different, and the connection relationship between units is irregular. Distributed unstructured grid is a technology that distributes unstructured grids on multiple computing nodes to accelerate large-scale computing. It partitions the entire grid into multiple sub-grids, i.e., sub-domains, and assigns them to different computing nodes or processors for independent computing, thereby achieving parallel computing.

[0003] Since the grid topology records the grid elements, namely points, lines, surfaces, and volumes, and the adjacency relationships between them, the grid topology can systematically describe and manage the complex structure of the grid; by clarifying the topological relationship of the grid cells, the index table of the adjacent cells, adjacent surfaces, adjacent edges or adjacent points of each cell can be quickly obtained; however, the grid file often only saves the basic topological information between the grid cells and the points. This information usually cannot directly meet the needs of numerical simulation, reducing the accuracy and efficiency of numerical simulation; in order to ensure the minimum communication volume and load balancing between different subdomains in distributed computing, and to achieve convenient grid traversal and numerical calculation, it is necessary to optimize the topology of unstructured grids.

[0004] The topology of unstructured grids can be constructed automatically or semi-automatically according to the given grid, physical problem requirements and numerical simulation requirements, and more complex topological information such as edges and faces between units can be derived and constructed, and the required adjacency relationship data can be generated according to certain rules and sequences.

[0005] In the prior art, unstructured grid topology construction often adopts the method based on adjacency list. In a centralized environment, that is, a single process, the adjacency list can be generated by directly traversing the relationship between cells and points; in a distributed environment, that is, multiple processes, since each process only has a local grid, additional communication operations are usually required to obtain complete topology information;

[0006] The distributed unstructured grid topology construction methods can be divided into two categories:

[0007] One is a topology construction method based on complete unit-point information; some processes are responsible for storing and maintaining complete unit-point information. The above processes not only process the grid units of the local subdomain, but also grasp the adjacency relationship across subdomains; the grid topology constructed using this method has a large memory requirement, and large-scale grids have high hardware requirements; if only some processes have complete information, the topology information needs to be broadcast to other processes, which will cause serious load balancing problems; there is a problem of repeated calculations, and different processes with complete information must construct the topology of the entire grid, and then choose the results;

[0008] The other type is a topology construction method based on node-to-node communication. Each process only stores the local grid cells and corresponding point topology information assigned to it. It traverses the local grid and generates preliminary topology data based on the relationship between cells and points. It then exchanges adjacency information of boundary cells through the node-to-node communication mechanism, including shared points, edges or faces across subdomains, to complete the construction of the global topology. Its efficiency is highly dependent on the optimization strategy of communication. Especially when the grid scale is huge or the subdomain boundaries are complex, the collective communication of a large amount of boundary data will lead to a significant increase in communication volume, making the communication cost an efficiency bottleneck. Summary of the invention

[0009] In response to the above-mentioned problems, the present invention provides a method for constructing a distributed unstructured grid topology, which can solve the problems of large memory requirements, unbalanced load, repeated calculations and high communication costs in the prior art when used, and provide a complete distributed unstructured grid topology construction parallel algorithm process to ensure that it can be efficiently applied in different numerical simulation scenarios.

[0010] To achieve the above object, the technical solution adopted by the present invention is:

[0011] The present invention provides a method for constructing a distributed unstructured grid topology, comprising the following steps:

[0012] S101: Determine the dimension of the unstructured grid;

[0013] S102: if the unstructured grid is a three-dimensional grid, constructing volume-point topology, volume-surface topology, volume-edge topology, point-volume topology, surface-point topology, surface-edge topology, edge-point topology, surface-volume topology, edge-volume topology, point-surface topology, edge-surface topology, point-point topology, point-edge topology, volume-volume topology, surface-surface topology and edge-edge topology in sequence;

[0014] S103: if the unstructured grid is a two-dimensional grid, constructing a face-point topology, a face-edge topology, a point-face topology, an edge-point topology, an edge-face topology, a point-edge topology, a point-face topology, a point-face topology, a point-face topology, and an edge-edge topology in sequence;

[0015] S104: if the unstructured grid is a one-dimensional grid, constructing edge-point topology, point-edge topology, point-point topology and edge-edge topology in sequence;

[0016] Among them, when constructing the volume-point topology of an unpartitioned three-dimensional grid, the face-volume topology of a three-dimensional grid, the edge-volume topology of a three-dimensional grid, the point-volume topology of a three-dimensional grid, the face-point topology of an unpartitioned two-dimensional grid, the edge-face topology of a two-dimensional grid, and the point-face topology of a two-dimensional grid, cross-process adjacency information is supplemented and synchronized through communication.

[0017] In the method for constructing a distributed unstructured grid topology provided by the present invention, preferably, step S102 is specifically:

[0018] S201: Each process reads the grid file in segments. If the grid is not divided into subdomains, a volume-volume topology is constructed and subdomains are divided. On this basis, an updated volume-point topology is generated through communication.

[0019] S202: Based on the volume-point topology, traverse the volume to retrieve the faces, edges or points contained in the volume, form a face index table or an edge index table for the faces or edges that have not been retrieved, and add the faces, edges or points that have not been retrieved to the corresponding volume-surface topology, volume-edge topology or point-volume topology, respectively, to finally form a volume-surface topology, volume-edge topology and point-volume topology;

[0020] S203: Based on the body-surface topology, traverse the body to retrieve the faces included in the body, add the faces constituting the body to the face-body topology, and finally form the face-body topology; based on the body-surface topology, obtain the face-point topology according to the face index table; based on the body-edge topology, traverse the body to retrieve the edges included in the body, add the edges constituting the body to the edge-body topology, and finally form the edge-body topology; based on the body-edge topology, obtain the edge-point topology according to the edge index table; based on the body-surface topology, obtain the face index table, based on the body-edge topology, obtain the edge index table, traverse the faces and edges, add the faces and edges to the face-edge topology, and finally form the face-edge topology;

[0021] S204: Based on the face-point topology, traverse the face to retrieve the points contained in the face, and add the points constituting the face to the point-face topology to form a point-face topology; based on the face-edge topology, traverse the face to retrieve the edges contained in the face, and add the edges constituting the face to the edge-face topology to form an edge-face topology; based on the edge-point topology, traverse the edge to retrieve the points contained in the edge, and add the combination of the sequential points and the reversed points constituting the edge to the point-point topology to form a point-point topology; based on the edge-point topology, traverse the edge to retrieve the points contained in the edge, and add the points constituting the edge to the point-edge topology to form a point-point topology. Form a point-edge topology; based on the face-volume topology, traverse the volume to retrieve the faces contained in the volume, obtain the volumes adjacent to the faces, combine the volumes containing the faces and the volumes adjacent to the faces into the volume-volume topology, and finally form a volume-volume topology; based on the edge-volume topology, traverse the volume to retrieve the edges contained in the volume, obtain the volumes adjacent to the edges, combine the volumes containing the edges and the volumes adjacent to the edges into the volume-volume topology, and finally form a volume-volume topology; based on the point-volume topology, traverse the volume to retrieve the points contained in the volume, obtain the volumes adjacent to the points, combine the volumes containing the points and the volumes adjacent to the points into the volume-volume topology, and finally form a volume-volume topology;

[0022] S205: Based on the edge-face topology, traverse the face to retrieve the edges contained in the face, obtain the faces adjacent to the edge, combine the face containing the edge and the faces adjacent to the edge and add them to the face-face topology, and finally form a face-face topology; based on the point-face topology, traverse the face to retrieve the points contained in the face, obtain the faces adjacent to the point, combine the face containing the point and the faces adjacent to the point and add them to the face-face topology, and finally form a face-face topology; based on the point-edge topology, traverse the edge to retrieve the points contained in the edge, obtain the edges adjacent to the point, combine the edge containing the point and the edges adjacent to the point and add them to the edge-edge topology, and finally form an edge-edge topology.

[0023] In the method for constructing a distributed unstructured grid topology provided by the present invention, preferably, step S103 is specifically as follows:

[0024] S301: Each process reads the grid file in sections. If the grid is not divided into subdomains, a surface-surface topology is constructed and subdomains are divided. On this basis, communication is performed to generate an updated surface-point topology.

[0025] S302: Based on the face-point topology, traverse the face to retrieve the edges or points contained in the face, form an edge index table for the unretrieved edges, and add the unretrieved edges or points to the corresponding face-edge topology or point-face topology, and finally form a face-edge topology and a point-face topology;

[0026] S303: Based on the face-edge topology, an edge-point topology is obtained according to the edge index table; based on the face-edge topology, a face is traversed to retrieve the edge contained in the face, and the edge is combined with the face containing the edge and added to the edge-face topology, and finally an edge-face topology is formed;

[0027] S304: Based on the edge-point topology, traverse the edge to retrieve the point contained in the edge, and add the point and the edge containing the point into the point-edge topology to form a point-edge topology; based on the edge-point topology, traverse the edge to retrieve the point contained in the edge, obtain the sequential points and the reversed points constituting the edge and add them into the point-point topology to form a point-point topology; based on the edge-face topology, traverse the face to retrieve the edge contained in the face, obtain the face adjacent to the edge, and add the face containing the edge and the face adjacent to the edge into the face-face topology to form a face-face topology; based on the point-face topology, traverse the face to retrieve the point contained in the face, obtain the face adjacent to the point, and add the face containing the point and the face adjacent to the point into the face-face topology to form a face-face topology;

[0028] S305: Based on the point-edge topology, traverse the edge to retrieve the point contained in the edge, obtain the edge adjacent to the point, combine the edge containing the point and the edge adjacent to the point and add them to the edge-edge topology, and finally form the edge-edge topology.

[0029] In the method for constructing a distributed unstructured grid topology provided by the present invention, preferably, step S104 is specifically as follows:

[0030] S401: Each process reads the grid file in segments. If the grid is not divided into subdomains, an edge-edge topology is constructed and the subdomains are divided. On this basis, communication is performed to generate an updated edge-point topology.

[0031] S402: Based on the edge-point topology, traverse the edge to retrieve the point included in the edge, add the point and the edge containing the point into the point-edge topology, and finally form the point-edge topology; Based on the edge-point topology, traverse the edge to retrieve the point included in the edge, obtain the sequential point and the reversed point combination constituting the edge and add it into the point-point topology, and finally form the point-point topology;

[0032] S403: Based on the point-edge topology, traverse the edge to retrieve the point contained in the edge, obtain the edge adjacent to the point, combine the edge containing the point and the edge adjacent to the point and add them to the edge-edge topology, and finally form the edge-edge topology.

[0033] The method for constructing a distributed unstructured grid topology provided by the present invention preferably adopts a spatial proximity search method, and the specific steps are:

[0034] S501: Each process grid constructs a refined spatial envelope box;

[0035] S502: Each process grid constructs a rough spatial envelope box;

[0036] S503: the processes communicate to obtain an overall multi-envelope box structure;

[0037] S504: Each process preliminarily determines the intersection relationship between processes based on the overall multi-envelope box;

[0038] S505: Establishing an inter-process communication graph structure;

[0039] S506: Each process traverses all points of the process, and adds the points located in the intersection area of ​​the overall multi-envelope box to the communication queue;

[0040] S507: Each process performs point-to-point communication according to the communication graph;

[0041] S508: After each process obtains point data from the source process, it uses the refined spatial envelope box to determine the intersection relationship with the current process;

[0042] S509: Communication, each process informs the source process of the intersection judgment result of each point;

[0043] S510: Each process packages the unit-point information to be transmitted according to the result;

[0044] S511: Communication, each process obtains complete topology data including process boundaries.

[0045] The above technical solution has the following advantages or beneficial effects:

[0046] The distributed unstructured grid topology construction method provided by the present invention, in step S101, in order to solve different types of problems, it is necessary to determine the dimension of the unstructured grid, such as one-dimensional grid simulation of linear structure, two-dimensional grid simulation of plane problem, three-dimensional grid simulation of space problem, by determining the dimension of the unstructured grid can reduce the computational complexity and improve the computational efficiency;

[0047] In step S102 to step S104, the construction of a grid topology from one dimension to three dimensions is realized on multiple processes, and the construction order of the grid topology from one dimension to three dimensions is clarified; since the size, shape and arrangement of the grid unit may be completely irregular, and the grid file often only stores basic topological information between the grid unit and the point, the grid unit here may refer to a body in a three-dimensional grid, a surface in a two-dimensional grid or an edge in a one-dimensional grid, and numerical simulation requires the use of topological information stored in the grid file, and the topological information in the grid file cannot directly meet the needs of numerical simulation, resulting in reduced accuracy and efficiency of numerical simulation. By further deriving and constructing more complex topological information such as edges and surfaces between units of the unstructured grid, and generating the required adjacency relationship data according to rules and sequence, support can be provided for complex calculations in the numerical simulation, thereby improving the accuracy and efficiency of the numerical simulation; further, through the above-mentioned sequential construction of the grid topology, the logical consistency and orderliness of the grid topology are ensured, and repeated calculations caused by improper order when obtaining multiple topologies are avoided;

[0048] In a distributed environment, only local grids are stored on multiple processes, so the adjacency matrix will also be divided into different processes according to the number of rows. In order to ensure the correctness and completeness of the global topological relationship, when constructing the volume-point topology of unpartitioned 3D grids, the surface-volume topology of 3D grids, the edge-volume topology of 3D grids, the point-volume topology of 3D grids, the surface-point topology of unpartitioned 2D grids, the edge-surface topology of 2D grids, and the point-surface topology of 2D grids, it is necessary to supplement and synchronize the cross-process adjacency information through communication;

[0049] The prior art has the problems of large memory requirements, unbalanced load, repeated calculations and high communication costs when in use. The distributed unstructured grid topology construction method provided by the present invention is adopted. The grid topology is split and stored in multiple processes, and the adjacency information of the boundary cells is exchanged through a communication mechanism, thereby reducing the memory requirement; further, by storing local grids on each process and supplementing and synchronizing the cross-process adjacency information through communication, the load balancing problem can be alleviated; further, by clarifying the construction order of the one-dimensional to three-dimensional grid topology, it is possible to avoid repeated calculations caused by improper order when obtaining multiple topologies, and at the same time reduce the communication frequency when constructing the grid topology, thereby reducing the communication cost between processes. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The present invention and its features, configurations and advantages will become more apparent by reading the detailed description of non-limiting embodiments with reference to the following drawings. The same reference numerals indicate the same parts throughout the drawings. The drawings are not drawn to scale, but rather to illustrate the subject matter of the present invention.

[0051] Figure 1It is a flow chart of a method for constructing a distributed unstructured grid topology provided in Example 1 of the present invention.

[0052] Figure 2 It is a specific flow chart of step S102 in a method for constructing a distributed unstructured grid topology provided in Embodiment 1 of the present invention.

[0053] Figure 3 It is a schematic diagram of a three-dimensional grid topology in a method for constructing a distributed unstructured grid topology provided in Example 1 of the present invention.

[0054] Figure 4 It is a specific flow chart of step S103 in a method for constructing a distributed unstructured grid topology provided in Embodiment 1 of the present invention.

[0055] Figure 5 It is a schematic diagram of a two-dimensional grid topology in a method for constructing a distributed unstructured grid topology provided in Example 1 of the present invention.

[0056] Figure 6 It is a specific flow chart of step S104 in a method for constructing a distributed unstructured grid topology provided in Embodiment 1 of the present invention.

[0057] Figure 7 It is a schematic diagram of a one-dimensional grid topology in a method for constructing a distributed unstructured grid topology provided in Example 1 of the present invention.

[0058] Figure 8 It is a schematic diagram of a specific process of communication in a method for constructing a distributed unstructured grid topology provided in Example 1 of the present invention. DETAILED DESCRIPTION

[0059] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.

[0060] Embodiment 1:

[0061] like Figure 1 As shown, a method for constructing a distributed unstructured grid topology provided by Embodiment 1 of the present invention includes the following steps:

[0062] S101: Determine the dimension of the unstructured grid;

[0063] S102: if the unstructured grid is a three-dimensional grid, constructing volume-point topology, volume-surface topology, volume-edge topology, point-volume topology, surface-point topology, surface-edge topology, edge-point topology, surface-volume topology, edge-volume topology, point-surface topology, edge-surface topology, point-point topology, point-edge topology, volume-volume topology, surface-surface topology and edge-edge topology in sequence;

[0064] S103: if the unstructured grid is a two-dimensional grid, constructing a face-point topology, a face-edge topology, a point-face topology, an edge-point topology, an edge-face topology, a point-edge topology, a point-face topology, a point-face topology, a point-face topology, and an edge-edge topology in sequence;

[0065] S104: if the unstructured grid is a one-dimensional grid, constructing edge-point topology, point-edge topology, point-point topology and edge-edge topology in sequence;

[0066] Among them, when constructing the volume-point topology of an unpartitioned three-dimensional grid, the face-volume topology of a three-dimensional grid, the edge-volume topology of a three-dimensional grid, the point-volume topology of a three-dimensional grid, the face-point topology of an unpartitioned two-dimensional grid, the edge-face topology of a two-dimensional grid, and the point-face topology of a two-dimensional grid, cross-process adjacency information is supplemented and synchronized through communication.

[0067] In the method for constructing a distributed unstructured grid topology provided in Embodiment 1 of the present invention, in step S101, in order to solve different types of problems, it is necessary to determine the dimension of the unstructured grid, such as a one-dimensional grid simulating a linear structure, a two-dimensional grid simulating a plane problem, and a three-dimensional grid simulating a space problem. By determining the dimension of the unstructured grid, the computational complexity can be reduced and the computational efficiency can be improved.

[0068] In step S102 to step S104, the construction of a grid topology from one dimension to three dimensions is realized on multiple processes, and the construction order of the grid topology from one dimension to three dimensions is clarified; since the size, shape and arrangement of the grid unit may be completely irregular, and the grid file often only stores basic topological information between the grid unit and the point, the grid unit here may refer to a body in a three-dimensional grid, a surface in a two-dimensional grid or an edge in a one-dimensional grid, and numerical simulation requires the use of topological information stored in the grid file, and the topological information in the grid file cannot directly meet the needs of numerical simulation, resulting in reduced accuracy and efficiency of numerical simulation. By further deriving and constructing more complex topological information such as edges and surfaces between units of the unstructured grid, and generating the required adjacency relationship data according to rules and sequence, support can be provided for complex calculations in the numerical simulation, thereby improving the accuracy and efficiency of the numerical simulation; further, through the above-mentioned sequential construction of the grid topology, the logical consistency and orderliness of the grid topology are ensured, and repeated calculations caused by improper order when obtaining multiple topologies are avoided;

[0069] In a distributed environment, only local grids are stored on multiple processes, so the adjacency matrix will also be divided into different processes according to the number of rows. In order to ensure the correctness and completeness of the global topological relationship, when constructing the volume-point topology of unpartitioned 3D grids, the surface-volume topology of 3D grids, the edge-volume topology of 3D grids, the point-volume topology of 3D grids, the surface-point topology of unpartitioned 2D grids, the edge-surface topology of 2D grids, and the point-surface topology of 2D grids, it is necessary to supplement and synchronize the cross-process adjacency information through communication;

[0070] The prior art has the problems of large memory requirements, unbalanced load, repeated calculations and high communication costs when in use. The distributed unstructured grid topology construction method provided in Example 1 of the present invention is adopted. The grid topology is split and stored in multiple processes, and the adjacency information of the boundary cells is exchanged through a communication mechanism, thereby reducing the memory requirement; further, by storing local grids on each process and supplementing and synchronizing the cross-process adjacency information through communication, the load balancing problem can be alleviated; further, by clarifying the construction order of the one-dimensional to three-dimensional grid topology, it is possible to avoid repeated calculations caused by improper order when obtaining multiple topologies, and at the same time reduce the communication frequency when constructing the grid topology, thereby reducing the communication cost between processes.

[0071] like Figure 2-3 As shown, the method for constructing a distributed unstructured grid topology provided by Embodiment 1 of the present invention, preferably, step S102 is specifically:

[0072] S201: Each process reads the grid file in segments. If the grid is not divided into subdomains, a volume-volume topology is constructed and subdomains are divided. On this basis, an updated volume-point topology is generated through communication.

[0073] S202: Based on the volume-point topology, traverse the volume to retrieve the faces, edges or points contained in the volume, form a face index table or an edge index table for the faces or edges that have not been retrieved, and add the faces, edges or points that have not been retrieved to the corresponding volume-surface topology, volume-edge topology or point-volume topology, respectively, to finally form a volume-surface topology, volume-edge topology and point-volume topology;

[0074] S203: Based on the body-surface topology, traverse the body to retrieve the faces included in the body, add the faces constituting the body to the face-body topology, and finally form the face-body topology; based on the body-surface topology, obtain the face-point topology according to the face index table; based on the body-edge topology, traverse the body to retrieve the edges included in the body, add the edges constituting the body to the edge-body topology, and finally form the edge-body topology; based on the body-edge topology, obtain the edge-point topology according to the edge index table; based on the body-surface topology, obtain the face index table, based on the body-edge topology, obtain the edge index table, traverse the faces and edges, add the faces and edges to the face-edge topology, and finally form the face-edge topology;

[0075] S204: Based on the face-point topology, traverse the face to retrieve the points contained in the face, and add the points constituting the face to the point-face topology to form a point-face topology; based on the face-edge topology, traverse the face to retrieve the edges contained in the face, and add the edges constituting the face to the edge-face topology to form an edge-face topology; based on the edge-point topology, traverse the edge to retrieve the points contained in the edge, and add the combination of the sequential points and the reversed points constituting the edge to the point-point topology to form a point-point topology; based on the edge-point topology, traverse the edge to retrieve the points contained in the edge, and add the points constituting the edge to the point-edge topology to form a point-point topology. Form a point-edge topology; based on the face-volume topology, traverse the volume to retrieve the faces contained in the volume, obtain the volumes adjacent to the faces, combine the volumes containing the faces and the volumes adjacent to the faces into the volume-volume topology, and finally form a volume-volume topology; based on the edge-volume topology, traverse the volume to retrieve the edges contained in the volume, obtain the volumes adjacent to the edges, combine the volumes containing the edges and the volumes adjacent to the edges into the volume-volume topology, and finally form a volume-volume topology; based on the point-volume topology, traverse the volume to retrieve the points contained in the volume, obtain the volumes adjacent to the points, combine the volumes containing the points and the volumes adjacent to the points into the volume-volume topology, and finally form a volume-volume topology;

[0076] S205: Based on the edge-face topology, traverse the face to retrieve the edges contained in the face, obtain the faces adjacent to the edge, combine the face containing the edge and the faces adjacent to the edge and add them to the face-face topology, and finally form a face-face topology; based on the point-face topology, traverse the face to retrieve the points contained in the face, obtain the faces adjacent to the point, combine the face containing the point and the faces adjacent to the point and add them to the face-face topology, and finally form a face-face topology; based on the point-edge topology, traverse the edge to retrieve the points contained in the edge, obtain the edges adjacent to the point, combine the edge containing the point and the edges adjacent to the point and add them to the edge-edge topology, and finally form an edge-edge topology.

[0077] The distributed unstructured grid topology construction method provided in Example 1 of the present invention specifically implements the construction process of the three-dimensional grid topology in steps S201 to S205. Based on the volume-point topology, the points contained in the volume are traversed to retrieve the faces and edges, the topological data between different grid elements are obtained, the topological data between all three-dimensional grid elements are integrated, a tree-like construction flow chart is formed, and the three-dimensional grid topology construction sequence is clarified, so that the construction process of the grid topology is modularized and standardized, and the construction efficiency and accuracy of the topological relationship are ensured;

[0078] Furthermore, in step S201, since grid partitioning is involved, it is necessary to ensure that the grid load of each process is balanced, so that the number of grids is roughly the same, and the grid interface between processes is reduced as much as possible. Therefore, before using the body-point topology provided by the grid file, it is necessary to construct a body-body topology and divide the subdomains according to the steps provided in steps S202 to S204, and generate an updated body-point topology through communication on this basis;

[0079] Among them, when constructing face-volume topology from body-face topology, since the connection relationship between faces and bodies in the local grid is established within each process, the face-body connection information located at the process interface needs to communicate to ensure the integrity and global consistency of the face-body connection information; similar to the above situation, when constructing edge-volume topology from body-edge topology, since the connection relationship between edges and bodies in the local grid is established within each process, communication is required to ensure the integrity and global consistency of the edge-body connection information; when constructing point-volume topology from body-point topology, since the connection relationship between points and bodies in the local grid is established within each process, communication is required to ensure the integrity and global consistency of the point-body connection information.

[0080] like Figure 4-5 As shown, the method for constructing a distributed unstructured grid topology provided by Embodiment 1 of the present invention, preferably, step S103 is specifically:

[0081] S301: Each process reads the grid file in sections. If the grid is not divided into subdomains, a surface-surface topology is constructed and subdomains are divided. On this basis, communication is performed to generate an updated surface-point topology.

[0082] S302: Based on the face-point topology, traverse the face to retrieve the edges or points contained in the face, form an edge index table for the unretrieved edges, and add the unretrieved edges or points to the corresponding face-edge topology or point-face topology, and finally form a face-edge topology and a point-face topology;

[0083] S303: Based on the face-edge topology, an edge-point topology is obtained according to the edge index table; based on the face-edge topology, a face is traversed to retrieve the edge contained in the face, and the edge is combined with the face containing the edge and added to the edge-face topology, and finally an edge-face topology is formed;

[0084] S304: Based on the edge-point topology, traverse the edge to retrieve the point contained in the edge, and add the point and the edge containing the point into the point-edge topology to form a point-edge topology; based on the edge-point topology, traverse the edge to retrieve the point contained in the edge, obtain the sequential points and the reversed points constituting the edge and add them into the point-point topology to form a point-point topology; based on the edge-face topology, traverse the face to retrieve the edge contained in the face, obtain the face adjacent to the edge, and add the face containing the edge and the face adjacent to the edge into the face-face topology to form a face-face topology; based on the point-face topology, traverse the face to retrieve the point contained in the face, obtain the face adjacent to the point, and add the face containing the point and the face adjacent to the point into the face-face topology to form a face-face topology;

[0085] S305: Based on the point-edge topology, traverse the edge to retrieve the point contained in the edge, obtain the edge adjacent to the point, combine the edge containing the point and the edge adjacent to the point and add them to the edge-edge topology, and finally form the edge-edge topology.

[0086] The distributed unstructured grid topology construction method provided in Example 1 of the present invention specifically implements the construction process of the two-dimensional grid topology in steps S301 to S305. Based on the surface-point topology, the points contained in the surface are traversed to retrieve the edges, the topological data between different grid elements are obtained, the topological data between all two-dimensional grid elements are integrated, a tree-like construction flow chart is formed, and the two-dimensional grid topology construction order is clarified, so that the construction process of the grid topology is modularized and standardized, and the construction efficiency and accuracy of the topological relationship are ensured;

[0087] Furthermore, in step S301, since grid partitioning is involved, it is necessary to ensure that the grid load of each process is balanced, so that the number of grids is roughly the same, and the grid interface between processes is reduced as much as possible. Therefore, before using the surface-point topology provided by the grid file, it is necessary to construct the surface-surface topology and divide the subdomains according to the steps provided in steps S302 to S304, and generate an updated surface-point topology through communication on this basis;

[0088] Among them, when constructing edge-face topology from face-edge topology, since the connection relationship between edges and faces in the local grid is established within each process, communication is required to ensure the integrity and global consistency of the edge-face connection information; similar to the above situation, when constructing point-face topology from face-point topology, since the connection relationship between points and faces in the local grid is established within each process, communication is required to ensure the integrity and global consistency of the point-face connection information.

[0089] like Figure 6-7 As shown, the method for constructing a distributed unstructured grid topology provided by Embodiment 1 of the present invention, preferably, step S104 is specifically:

[0090] S401: Each process reads the grid file in segments. If the grid is not divided into subdomains, an edge-edge topology is constructed and the subdomains are divided. On this basis, communication is performed to generate an updated edge-point topology.

[0091] S402: Based on the edge-point topology, traverse the edge to retrieve the point included in the edge, add the point and the edge containing the point into the point-edge topology, and finally form the point-edge topology; Based on the edge-point topology, traverse the edge to retrieve the point included in the edge, obtain the sequential point and the reversed point combination constituting the edge and add it into the point-point topology, and finally form the point-point topology;

[0092] S403: Based on the point-edge topology, traverse the edge to retrieve the point contained in the edge, obtain the edge adjacent to the point, combine the edge containing the point and the edge adjacent to the point and add them to the edge-edge topology, and finally form the edge-edge topology.

[0093] The distributed unstructured grid topology construction method provided in Example 1 of the present invention specifically implements the construction process of the one-dimensional grid topology in steps S401 to S405. Based on the edge-point topology, the points contained in the edge are traversed to obtain the topological data between different grid elements, and the topological data between all one-dimensional grid elements are integrated to form a tree-like construction flow chart, and the one-dimensional grid topology construction order is clarified, so that the grid topology construction process is modularized and standardized, and the construction efficiency and accuracy of the topological relationship are ensured;

[0094] Furthermore, in step S401, since grid partitioning is involved, it is necessary to ensure grid load balancing of each process. Therefore, before using the edge-point topology provided by the grid file, it is necessary to build the edge-edge topology and divide the subdomains according to the steps provided in steps S402 to S403, and generate an updated edge-point topology through communication on this basis;

[0095] Among them, when constructing a point-edge topology from an edge-point topology, since the connection relationship between points and edges in the local grid is established within each process, communication is required to ensure the integrity and global consistency of the point-edge connection information.

[0096] like Figure 8 As shown, the method for constructing a distributed unstructured grid topology provided in Embodiment 1 of the present invention, in order to reduce communication overhead, preferably, the communication adopts a spatial proximity search method, and the specific steps are:

[0097] S501: Each process grid constructs a refined spatial envelope box;

[0098] S502: Each process grid constructs a rough spatial envelope box;

[0099] S503: the processes communicate to obtain an overall multi-envelope box structure;

[0100] S504: Each process preliminarily determines the intersection relationship between processes based on the overall multi-envelope box;

[0101] S505: Establishing an inter-process communication graph structure;

[0102] S506: Each process traverses all points of the process, and adds the points located in the intersection area of ​​the overall multi-envelope box to the communication queue;

[0103] S507: Each process performs point-to-point communication according to the communication graph;

[0104] S508: After each process obtains point data from the source process, it uses the refined spatial envelope box to determine the intersection relationship with the current process;

[0105] S509: Communication, each process informs the source process of the intersection judgment result of each point;

[0106] S510: Each process packages the unit-point information to be transmitted according to the result;

[0107] S511: Communication, each process obtains complete topology data including process boundaries.

[0108] The distributed unstructured grid topology construction method provided in Embodiment 1 of the present invention, in steps S501 to S511, realizes identifying all inter-process relationships through a low-cost spatial proximity search process, determining process boundary areas that may cause incomplete topology, and thus communicating data in a targeted manner;

[0109] Furthermore, point-to-point communication between processes can avoid the situation where multiple processes will generate large communication overhead when data is transmitted through collective communication; the communication data is transmitted after screening, which can reduce the communication volume when using large-scale grids while ensuring data integrity; through the above steps S501 to S511, the communication mechanism can be optimized, the transmission volume and frequency of cross-node communication can be reduced, and efficient cross-node data transmission can be achieved, thereby solving the data communication bottleneck problem that exists when constructing topology in large-scale complex grids and complex geometric computing scenarios.

[0110] In summary, the distributed unstructured grid topology construction method provided by the present invention can solve the problems of large memory requirements, unbalanced load, repeated calculations and high communication costs in the prior art when used, and provide a complete distributed unstructured grid topology construction parallel algorithm process to ensure efficient applicability in different numerical simulation scenarios.

[0111] Those skilled in the art should understand that those skilled in the art can implement the above-mentioned variations by combining the prior art and the above-mentioned embodiments, which will not be described in detail here. Such variations do not affect the essential content of the present invention, and will not be described in detail here.

[0112] The above describes the preferred embodiments of the present invention. It should be understood that the present invention is not limited to the above-mentioned specific embodiments, and the devices and structures that are not described in detail should be understood to be implemented in a common manner in the art; any technician familiar with the art can make many possible changes and modifications without departing from the technical solution of the present invention, or modify them into equivalent embodiments with equivalent changes, which does not affect the essential content of the present invention. Therefore, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of protection of the technical solution of the present invention.

Claims

1. A method for constructing a distributed unstructured grid topology, characterized in that: The following steps are involved: S101: Determine the dimension of the unstructured grid; S102: if the unstructured grid is a three-dimensional grid, constructing volume-point topology, volume-surface topology, volume-edge topology, point-volume topology, surface-point topology, surface-edge topology, edge-point topology, surface-volume topology, edge-volume topology, point-surface topology, edge-surface topology, point-point topology, point-edge topology, volume-volume topology, surface-surface topology and edge-edge topology in sequence; S103: if the unstructured grid is a two-dimensional grid, constructing a face-point topology, a face-edge topology, a point-face topology, an edge-point topology, an edge-face topology, a point-edge topology, a point-face topology, a point-face topology, a point-face topology, and an edge-edge topology in sequence; S104: if the unstructured grid is a one-dimensional grid, constructing edge-point topology, point-edge topology, point-point topology and edge-edge topology in sequence; Among them, when constructing the volume-point topology of an unpartitioned three-dimensional grid, the face-volume topology of a three-dimensional grid, the edge-volume topology of a three-dimensional grid, the point-volume topology of a three-dimensional grid, the face-point topology of an unpartitioned two-dimensional grid, the edge-face topology of a two-dimensional grid, and the point-face topology of a two-dimensional grid, cross-process adjacency information is supplemented and synchronized through communication.

2. The method for constructing a distributed unstructured grid topology according to claim 1, characterized in that: The step S102 is specifically as follows: S201: Each process reads the grid file in segments. If the grid is not divided into subdomains, a volume-volume topology is constructed and subdomains are divided. On this basis, an updated volume-point topology is generated through communication. S202: Based on the volume-point topology, traverse the volume to retrieve the faces, edges or points contained in the volume, form a face index table or an edge index table for the faces or edges that have not been retrieved, and add the faces, edges or points that have not been retrieved to the corresponding volume-surface topology, volume-edge topology or point-volume topology, respectively, to finally form a volume-surface topology, volume-edge topology and point-volume topology; S203: Based on the body-surface topology, traverse the body to retrieve the faces included in the body, add the faces constituting the body to the face-body topology, and finally form the face-body topology; based on the body-surface topology, obtain the face-point topology according to the face index table; based on the body-edge topology, traverse the body to retrieve the edges included in the body, add the edges constituting the body to the edge-body topology, and finally form the edge-body topology; based on the body-edge topology, obtain the edge-point topology according to the edge index table; based on the body-surface topology, obtain the face index table, based on the body-edge topology, obtain the edge index table, traverse the faces and edges, add the faces and edges to the face-edge topology, and finally form the face-edge topology; S204: Based on the face-point topology, traverse the face to retrieve the points contained in the face, and add the points constituting the face to the point-face topology to form a point-face topology; based on the face-edge topology, traverse the face to retrieve the edges contained in the face, and add the edges constituting the face to the edge-face topology to form an edge-face topology; based on the edge-point topology, traverse the edge to retrieve the points contained in the edge, and add the combination of the sequential points and the reversed points constituting the edge to the point-point topology to form a point-point topology; based on the edge-point topology, traverse the edge to retrieve the points contained in the edge, and add the points constituting the edge to the point-edge topology to form a point-point topology. Form a point-edge topology; based on the face-volume topology, traverse the volume to retrieve the faces contained in the volume, obtain the volumes adjacent to the faces, combine the volumes containing the faces and the volumes adjacent to the faces into the volume-volume topology, and finally form a volume-volume topology; based on the edge-volume topology, traverse the volume to retrieve the edges contained in the volume, obtain the volumes adjacent to the edges, combine the volumes containing the edges and the volumes adjacent to the edges into the volume-volume topology, and finally form a volume-volume topology; based on the point-volume topology, traverse the volume to retrieve the points contained in the volume, obtain the volumes adjacent to the points, combine the volumes containing the points and the volumes adjacent to the points into the volume-volume topology, and finally form a volume-volume topology; S205: Based on the edge-face topology, traverse the face to retrieve the edges contained in the face, obtain the faces adjacent to the edge, combine the face containing the edge and the faces adjacent to the edge and add them to the face-face topology, and finally form a face-face topology; based on the point-face topology, traverse the face to retrieve the points contained in the face, obtain the faces adjacent to the point, combine the face containing the point and the faces adjacent to the point and add them to the face-face topology, and finally form a face-face topology; based on the point-edge topology, traverse the edge to retrieve the points contained in the edge, obtain the edges adjacent to the point, combine the edge containing the point and the edges adjacent to the point and add them to the edge-edge topology, and finally form an edge-edge topology.

3. The method for constructing a distributed unstructured grid topology according to claim 1, characterized in that: The step S103 is specifically as follows: S301: Each process reads the grid file in sections. If the grid is not divided into subdomains, a surface-surface topology is constructed and subdomains are divided. On this basis, communication is performed to generate an updated surface-point topology. S302: Based on the face-point topology, traverse the face to retrieve the edges or points contained in the face, form an edge index table for the unretrieved edges, and add the unretrieved edges or points to the corresponding face-edge topology or point-face topology, and finally form a face-edge topology and a point-face topology; S303: Based on the face-edge topology, an edge-point topology is obtained according to the edge index table; based on the face-edge topology, a face is traversed to retrieve the edge contained in the face, and the edge is combined with the face containing the edge and added to the edge-face topology, and finally an edge-face topology is formed; S304: Based on the edge-point topology, traverse the edge to retrieve the point contained in the edge, and add the point and the edge containing the point into the point-edge topology to form a point-edge topology; based on the edge-point topology, traverse the edge to retrieve the point contained in the edge, obtain the sequential points and the reversed points constituting the edge and add them into the point-point topology to form a point-point topology; based on the edge-face topology, traverse the face to retrieve the edge contained in the face, obtain the face adjacent to the edge, and add the face containing the edge and the face adjacent to the edge into the face-face topology to form a face-face topology; based on the point-face topology, traverse the face to retrieve the point contained in the face, obtain the face adjacent to the point, and add the face containing the point and the face adjacent to the point into the face-face topology to form a face-face topology; S305: Based on the point-edge topology, traverse the edge to retrieve the point contained in the edge, obtain the edge adjacent to the point, combine the edge containing the point and the edge adjacent to the point and add them to the edge-edge topology, and finally form the edge-edge topology.

4. The method for constructing a distributed unstructured grid topology according to claim 1, characterized in that: The step S104 is specifically as follows: S401: Each process reads the grid file in segments. If the grid is not divided into subdomains, an edge-edge topology is constructed and the subdomains are divided. On this basis, communication is performed to generate an updated edge-point topology. S402: Based on the edge-point topology, traverse the edge to retrieve the point included in the edge, add the point and the edge containing the point into the point-edge topology, and finally form the point-edge topology; Based on the edge-point topology, traverse the edge to retrieve the point included in the edge, obtain the sequential point and the reversed point combination constituting the edge and add it into the point-point topology, and finally form the point-point topology; S403: Based on the point-edge topology, traverse the edge to retrieve the point contained in the edge, obtain the edge adjacent to the point, combine the edge containing the point and the edge adjacent to the point and add them to the edge-edge topology, and finally form the edge-edge topology.

5. The method for constructing a distributed unstructured grid topology according to any one of claims 1 to 4, characterized in that: The communication adopts a spatial proximity search method, and the specific steps are: S501: Each process grid constructs a refined spatial envelope box; S502: Each process grid constructs a rough spatial envelope box; S503: the processes communicate to obtain an overall multi-envelope box structure; S504: Each process preliminarily determines the intersection relationship between processes based on the overall multi-envelope box; S505: Establishing an inter-process communication graph structure; S506: Each process traverses all points of the process, and adds the points located in the intersection area of ​​the overall multi-envelope box to the communication queue; S507: Each process performs point-to-point communication according to the communication graph; S508: After each process obtains point data from the source process, it uses the refined spatial envelope box to determine the intersection relationship with the current process; S509: Communication, each process informs the source process of the intersection judgment result of each point; S510: Each process packages the unit-point information to be transmitted according to the result; S511: Communication, each process obtains complete topology data including process boundaries.