Self-adaptive parallel global icosahedron unstructured grid code generation and subdivision method
By adaptively adjusting the mesh coding method, the boundary number and load balancing are optimized, and the dynamic adaptability and boundary traffic problems of icosahedral non-structural mesh coding in parallel computing in the prior art are solved, and efficient load balancing and communication optimization are achieved.
Patent Information
- Application Number
- CN202510467653.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2045-04-15
AI Technical Summary
The existing icosahedral non-structural mesh encoding method lacks dynamic adaptability in parallel computing, resulting in the inability to optimize boundary traffic, serious load balancing problems, and lack of a hierarchical dynamic encoding mechanism, affecting the efficiency of parallel computing.
By adaptively adjusting the mesh coding method, the boundary number is optimized according to the changes in the number of cores, a non-structural mesh coding suitable for global icosahedral is generated to achieve load balancing and reduction of boundary traffic. A linear sequential fill design and rhombus and triangle segmentation methods are used to generate the corresponding relationship between U mesh and T mesh.
It greatly reduces the boundary communication volume between each core, shortens the boundary communication time, realizes load balancing, and improves the efficiency and resource utilization of parallel computing.
Smart Images

Figure CN120387293A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of spatial information technology, and in particular to an adaptive parallel global icosahedral unstructured grid encoding generation and dissection method. Background Art
[0002] In numerical calculations, grid generation is a key step. As the complexity of calculation problems increases, the limitations of structured grids become apparent and it is difficult to adapt to complex geometries. Therefore, unstructured grids are widely used due to their stronger adaptability. In order to effectively manage global spatial information, researchers have proposed a global discrete grid system (DGGS) based on regular polyhedra. Common DGGSs are based on hexahedrons, octahedrons, and icosahedrons. Among them, the icosahedron has become a research hotspot because of its large number of faces, close-to-sphere characteristics, small deformation, and more uniform geometric properties.
[0003] Existing global icosahedral unstructured grid encoding generation and dissection algorithms in China now include: SQT encoding based on icosahedral triangular grids, an encoding model of L-shaped space-filling curves, an encoding similar to generalized balanced ternary and a fast indexing algorithm for icosahedral hexagonal grids, a hierarchical encoding scheme based on a pyramid structure, an encoding model of icosahedral spherical rhombic grids designed based on Hilbert curves, etc.
[0004] In recent years, unstructured grids have gradually replaced structured grids in numerical simulations, and parallelization has become an important means to optimize unstructured grid calculations. Domestic and foreign scholars have made remarkable progress in parallel grid generation and calculation. Among them, foreign teams have already parallelized NASA's unstructured grid program VGRID, and have also developed parallel unstructured grid technologies for flow field calculations, which have also promoted the application of parallel adaptive numerical simulation technologies in the industrial field. Domestic scholars have proposed parallel finite element algorithms based on hierarchical grid data structures and designed parallel programming tools for unstructured grid numerical simulations, etc.
[0005] In the research of global icosahedral unstructured grid encoding generation and dissection algorithms, although remarkable progress has been made, there are still some key problems in the field of parallel computing, especially that the encoding method cannot adaptively adjust with the change of the number of parallel optimization cores, resulting in ineffective reduction of boundary communication volume.
[0006] Including the following main disadvantages:
[0007] 1. The encoding method lacks dynamic adaptability
[0008] Problem description: Existing icosahedral unstructured grid encoding methods (such as SQT encoding, L-shaped space-filling curve encoding, Hilbert curve encoding, etc.) are usually static, that is, the encoding rules are fixed during grid generation and cannot be dynamically adjusted according to the change in the number of cores in parallel computing.
[0009] Impact: In parallel computing, an increase or decrease in the number of cores will lead to a redistribution of the computational load. If the encoding method cannot be adaptively adjusted, the allocation of grid cells may be uneven, resulting in some cores being overloaded while others are idle, reducing the parallel efficiency.
[0010] 2. Inability to optimize boundary communication volume
[0011] Problem description: In parallel computing, the boundary communication between different cores is one of the performance bottlenecks. Existing encoding methods cannot dynamically optimize the allocation of grid cells according to the change in the number of cores, resulting in the inability to minimize the boundary communication volume.
[0012] Impact: When the number of cores increases, the division of grid cells may generate more boundary regions, leading to an increase in the communication volume between cores. Conversely, when the number of cores decreases, the boundary communication volume may not be effectively reduced, causing waste of communication resources.
[0013] 3. Lack of hierarchical dynamic encoding mechanism
[0014] Problem description: Existing encoding methods (such as pyramid structure encoding, block hierarchical model, etc.) although support hierarchical division, lack the ability of dynamic adjustment and cannot adjust the hierarchical structure of grid cells in real time according to the needs of parallel computing.
[0015] Impact: In parallel computing, dynamically adjusting the hierarchical structure of grid cells can effectively reduce the boundary communication volume. However, existing methods cannot achieve this, resulting in limited scalability of parallel computing.
[0016] 4. Parallel load balancing problem
[0017] Problem description: Existing encoding methods are difficult to achieve dynamic load balancing in parallel computing. The allocation of grid cells is usually based on fixed encoding rules and cannot be dynamically adjusted according to the computing power or load conditions of the cores.
[0018] Impact: This will lead to some cores having an overly heavy computational task while other cores have a lighter task, reducing the efficiency and resource utilization rate of parallel computing.
[0019] Therefore, it is an urgent problem for those skilled in the art to propose an adaptive parallel global icosahedral unstructured grid encoding generation and dissection method to solve the difficulties existing in the prior art. Summary of the invention
[0020] In view of this, the present invention provides an adaptive parallel global icosahedral unstructured grid coding generation and dissection method, which modifies the grid coding by changing the number of cores to optimize the number of boundaries between cores, greatly reducing the boundary communication volume between cores, shortening the time-consuming of boundary communication, and making it easier for the program to run to achieve load balance.
[0021] To achieve the above object, the present invention adopts the following technical solutions:
[0022] An adaptive parallel global icosahedral unstructured grid coding generation and dissection method, comprising the following steps:
[0023] Based on the regular icosahedral spherical rhombic grid designed by simple linear sequential filling, an initial grid coding is obtained, and the number of cores of the initial grid coding is 10*2^n, where n is a natural number;
[0024] Set the number of cores, and judge the coding method according to the set number of cores. When the number of cores is 10*2^2n, where n is a natural number, the grid shape is dissected according to a rhombus; when the number of cores is 10*2^(2n + 1), where n is a natural number, the grid shape is dissected according to a triangle; a new grid coding is obtained, and at the same time, a new core number arranged according to the simple linear sequential coding logic is obtained;
[0025] One-to-one correspondence conversion is performed between the relationship between the new grid coding and the initial grid coding and the earth's longitude and latitude.
[0026] Update the mapping table according to the geometric relationship between the U grid and the T grid in the new grid coding, and generate an nc format image file that can globally display the one-to-one correspondence between the coding and the geographical location.
[0027] Optionally, when the number of cores is 10*2^2n, where n is a natural number, the specific content of the grid shape being dissected according to a rhombus is:
[0028] First, divide the grids on each rhombus into grid blocks in the shape of rhombuses according to the simple linear order, and then code the grids inside each grid block according to the simple linear order according to the grid block number.
[0029] Optionally, when the number of cores is 10*2^(2n + 1), where n is a natural number, the specific content of the grid shape being dissected according to a triangle is:
[0030] First, divide the grids on each rhombus into grid blocks in the shape of triangles according to the simple linear order, and then code the grids inside each grid block according to the simple linear order according to the grid block number.
[0031] Optionally, the specific content of encoding the grids inside each grid block according to the grid block number in a simple linear order is as follows:
[0032] The grid center point U grid of the known icosahedral spherical rhombic grid has been equally divided into ten rhombuses, denoted as {the first rhombus, the second rhombus,..., the ninth rhombus, the tenth rhombus}. The total number of U grids in the U grid is NU. Each rhombus block is equally divided into NU / 10 U grids. Also, according to the geometric characteristics of the triangle grid vertices and the center point, the total number of T grids at the grid vertices is NT = NU / 2 + 2. Then, there are (NT - 2) / 10 + 1 T grids on the first rhombus and the tenth rhombus, and (NT - 2) / 10 T grids on the remaining rhombuses;
[0033] When the number of cores is 10 * 2^2n, where n is a natural number, the grid shape is divided according to rhombuses; when the number of cores is 10 * 2^(2n + 1), where n is a natural number, the grid shape is divided according to triangles. For each grid block that has been divided according to the number of cores, the grids inside each grid block are encoded according to a simple linear order.
[0034] Through the above technical solutions, compared with the prior art, the present invention provides an adaptive parallel global icosahedral unstructured grid encoding generation and partitioning method, which has the following beneficial effects:
[0035] (1) The grid encoding generated by the present invention is applicable to the global atmosphere - ocean model. By changing the number of cores to modify the grid encoding to optimize the number of boundaries between cores, the boundary communication volume between cores is greatly reduced, and the time consumed for boundary communication is shortened, making the program operation easier to achieve load balancing. In addition, the grid encoding generation and partitioning of the present invention do not change with the change of the number of cores;
[0036] (2) The present invention is applicable to two sets of grids, namely the center point U grid and the vertex T grid of the icosahedral unstructured grid, and can also make the two sets of grids still belong to an adjacent relationship in the spatial position on each core after parallel partitioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.
[0038] Figure 1 It is a flowchart of an adaptive parallel global icosahedral unstructured grid encoding generation and partitioning method provided by the present invention;
[0039] Figure 2 Schematic diagram of the coding method for obtaining the initial grid code of the regular icosahedron spherical rhombic grid provided by the present invention based on a simple linear sequential filling design;
[0040] Figure 3 Diagram of the method for dividing the regular icosahedron spherical rhombic grid into ten equal rhombic blocks provided by the present invention; wherein, 3a is a schematic diagram of the overlapping edge of two adjacent rhombuses on the regular icosahedron, and 3b is a schematic diagram of ten equal rhombic blocks;
[0041] Figure 4 Schematic diagram of the grid shape according to the rhombic subdivision when the number of cores is 10*2^2n, where n is a natural number, provided by the present invention;
[0042] Figure 5 Schematic diagram of the grid shape according to the triangular subdivision when the number of cores is 10*2^(2n + 1), where n is a natural number, provided by the present invention;
[0043] Figure 6 Schematic diagram of the coding method for dividing the U grid (center point) in each core when the number of cores is 10*2^2n, where n is a natural number, provided by the present invention;
[0044] Figure 7 Schematic diagram of the coding method for dividing the U grid (center point) in each core when the number of cores is 10*2^(2n + 1), where n is a natural number, provided by the present invention;
[0045] Figure 8 Schematic diagram of the coding method for dividing the T grid (vertex) in each core when the number of cores is 10*2^2n, where n is a natural number, provided by the present invention;
[0046] Figure 9 Schematic diagram of the coding method for dividing the T grid (vertex) in each core when the number of cores is 10*2^(2n + 1), where n is a natural number, provided by the present invention. Detailed implementation manner
[0047] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0048] Referring to Figure 1 As shown, the present invention discloses an adaptive parallel global icosahedron unstructured grid coding generation and subdivision method, including the following steps:
[0049] An icosahedral spherical rhombic grid based on a simple linear order filling design is used to obtain an initial grid code, and the number of core of the initial grid code is 10*2^n, where n is a natural number;
[0050] Set the number of cores, and judge the coding method according to the set number of cores. When the number of cores is 10*2^2n, where n is a natural number, the grid shape is divided according to rhombus; when the number of cores is 10*2^(2n + 1), where n is a natural number, the grid shape is divided according to triangle; obtain a new grid code, and at the same time obtain a new core number arranged according to the simple linear order coding logic;
[0051] The relationship between the new grid code and the initial grid code is converted one-to-one with the earth's longitude and latitude.
[0052] Update the mapping table according to the geometric relationship between the U grid and the T grid in the new grid code, and generate an nc format image file that can globally display the one-to-one correspondence between the code and the geographical location.
[0053] Specifically, the schematic diagram of the coding method for obtaining the initial grid code based on the icosahedral spherical rhombic grid designed by simple linear order filling is as Figure 2 shown. The IJ order is a simple linear order.
[0054] Furthermore, when the number of cores is 10*2^2n, where n is a natural number, the specific content of the grid shape divided according to rhombus is:
[0055] First, divide the grids on each rhombus into grid blocks of rhombus shapes according to the simple linear order, and then code the grids inside each grid block according to the grid block number and also according to the simple linear order.
[0056] Furthermore, when the number of cores is 10*2^(2n + 1), where n is a natural number, the specific content of the grid shape divided according to triangle is:
[0057] First, divide the grids on each rhombus into grid blocks of triangle shapes according to the simple linear order, and then code the grids inside each grid block according to the grid block number and also according to the simple linear order.
[0058] Furthermore, the specific content of coding the grids inside each grid block according to the grid block number and also according to the simple linear order is:
[0059] As Figure 3 shown, Figure 3A diagram showing the method of dividing an icosahedral spherical rhombic grid into ten equal rhombic blocks; where 3a is a schematic diagram of the coincident side of two adjacent rhombuses on the icosahedron, and 3b is a schematic diagram of ten equal rhombic blocks; it is known that the grid center point U grid of the icosahedral spherical rhombic grid has been equally divided into ten rhombuses, denoted as {the first rhombus, the second rhombus, …, the ninth rhombus, the tenth rhombus}, the total number of U grids is NU, and each rhombic block is equally divided into NU / 10 U grids. Also, according to the geometric characteristics of the triangular grid vertices and the center point, the total number of T grids at the grid vertices is NT = NU / 2 + 2. Then, there are (NT - 2) / 10 + 1 T grids on the first rhombus and the tenth rhombus, and (NT - 2) / 10 T grids on the remaining rhombuses.
[0060] As Figure 4 shown (from left to right are 40 cores, 160 cores, 640 cores, taking one rhombic block among the ten equal rhombic blocks as an example), when the number of cores is 10*2^2n and n is a natural number, the grid shape is divided according to rhombuses; as Figure 5 shown (from left to right are 80 cores, 320 cores, 1280 cores, taking the upper half of one rhombic block among the ten equal rhombic blocks as an example), when the number of cores is 10*2^(2n + 1) and n is a natural number, the grid shape is divided according to triangles; for each grid block that has been divided according to the number of cores, the grids inside each grid block are encoded according to a simple linear order.
[0061] Specifically, for each grid block that has been divided according to the number of cores, the inside is still encoded logically in the IJ order (IJorder). As Figure 6 and Figure 7 demonstrate the rhombus division encoding method in the form of images, and as Figure 8 and Figure 9 demonstrate the triangle division encoding method in the form of images. It should be noted that when the number of cores is 10*2^(2n + 1) and n is a natural number, the division of its T lattice points is not completely divided strictly according to triangles, and there will be a sawtooth shape at the junction between two cores, as Figure 9 shown.
[0062] In this specification, each embodiment is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other.
[0063] The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An adaptive parallel method for generating and dissecting an icosahedral unstructured grid code of the world, characterized in that It includes the following steps: Based on a simple linear order, fill the icosahedral spherical rhombic grid of the design to obtain an initial grid code. The number of core of the initial grid code is 10*2^n, where n is a natural number; Set the number of cores, and judge the coding method according to the set number of cores. When the number of cores is 10*2^2n, where n is a natural number, the grid shape is divided according to the rhombus; when the number of cores is 10*2^(2n + 1), where n is a natural number, the grid shape is divided according to the triangle; obtain a new grid code, and at the same time obtain a new core number arranged according to the simple linear order coding logic; Perform a one-to-one correspondence conversion between the relationship between the new grid code and the initial grid code and the earth's longitude and latitude; Update the mapping table according to the geometric relationship between the U grid and the T grid in the new grid code, and generate an nc format image file that can globally display the one-to-one correspondence between the code and the geographical location.
2. An adaptive parallel global icosahedral unstructured grid coding generation and subdivision method according to claim 1, characterized in that When the number of cores is 10*2^2n, where n is a natural number, the specific content of the grid shape divided according to the rhombus is: First, divide the grids on each rhombus into grid blocks of rhombus shapes according to a simple linear order, and then code the grids inside each grid block according to the grid block number also according to a simple linear order.
3. An adaptive parallel global icosahedral unstructured grid coding generation and subdivision method according to claim 1, characterized in that When the number of cores is 10*2^(2n + 1), where n is a natural number, the specific content of the grid shape divided according to the triangle is: First, divide the grids on each rhombus into grid blocks of triangle shapes according to a simple linear order, and then code the grids inside each grid block according to the grid block number also according to a simple linear order.
4. An adaptive parallel global icosahedral unstructured grid coding generation and subdivision method according to any one of claims 1-3, characterized in that The specific content of coding the grids inside each grid block according to the grid block number also according to a simple linear order is: It is known that the grid center point U grid of the icosahedral spherical rhombic grid has been equally divided into ten rhombuses, denoted as {the first rhombus, the second rhombus,..., the ninth rhombus, the tenth rhombus}. The total number of U grids is NU. Each rhombus block is equally divided into NU / 10 U grids. Also, according to the geometric characteristics of the triangle grid vertices and the center point, the total number of T grids at the grid vertices is NT = NU / 2 + 2. Then, there are (NT - 2) / 10 + 1 T grids on the first rhombus and the tenth rhombus, and (NT - 2) / 10 T grids on the remaining rhombuses; When the number of cores is 10*2^2n, where n is a natural number, the grid shape is divided according to the rhombus; when the number of cores is 10*2^(2n + 1), where n is a natural number, the grid shape is divided according to the triangle; for each grid block that has been divided according to the number of cores, code the grids inside each grid block according to a simple linear order.
Citation Information
Patent Citations
Method for rapidly converting spherical triangle discretization grid codes into geographic longitude and latitude coordinates
CN107273466A
A generation method and application of a global regular icosahedron grid with any resolution
CN109584372A
Z curve coding-based regular icosahedron different grid inter-operation method
CN113689561A
Grid coding method and computer system
CN114549671A
Multi-level airspace planning method based on spherical diamond discrete grid
CN116805455A
Cited By
Global ocean circulation simulation parallel processing method and device based on unstructured grid
CN120874404A