A parallel block extraction large-scale mesh generation method
By using a parallel block extraction method and MPI communication, the problem of excessively long process allocation and merging time in large-scale mesh generation is solved, achieving efficient mesh generation and speedup improvement, and simplifying topology reconstruction.
Patent Information
- Application Number
- CN202310650196.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-02
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2043-06-02
AI Technical Summary
Traditional parallel mesh generation algorithms suffer from problems such as excessive time spent allocating sub-mesh processes and excessive time spent merging meshes in large-scale mesh models, resulting in low computational efficiency.
A parallel block extraction method is adopted, multi-processes are created through MPIRUN, coarse-grained meshes are divided into sub-regions using Metis, and mesh information is merged through MPI communication and synchronization functions. Combined with the centroid refinement method, fine-grained volume meshes are generated, simplifying the reconstruction of topology relationships.
It improves the speed and efficiency of large-scale grid generation, reduces the time consumption of grid merging, makes efficient use of distributed computing resources, and improves speedup and overall performance.
Smart Images

Figure CN116663364B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of large-scale grid generation, and particularly relates to a large-scale grid generation method based on parallel block extraction. BACKGROUND
[0002] Finite element analysis is widely used in structural mechanics analysis, fluid mechanics analysis and the like. When a large-scale scene or a complex object is analyzed, the model often has a data volume of a sea of numbers or even a sea of stars. A single computer serial algorithm often consumes a long time and has low precision, and even cannot generate a grid. With the development of supercomputers, parallel algorithms emerge as the times require. A parallel algorithm used in grid generation makes it possible to divide a large-scale grid, and is highly efficient. The accurate analysis and simulation of a large-scale scene and a complex model can also promote the development of the industry and the like.
[0003] At present, most parallel grid generation technologies adopt an MPI multi-level parallel mode. A coarse-grained volume grid is divided into a plurality of small-scale volume grids by a grid division algorithm, and then the different computing units are given to refine. However, in the traditional parallel grid algorithm, there are some problems in the process of assigning a sub-grid to a process. A simple and small-scale model does not occupy a large amount of calculation time in the process of assigning a sub-grid to a process, and there is no problem of long time consumption in the merging of the grid. However, for a large-scale grid model, a large amount of time is occupied in the process of assigning a sub-grid to a process, and even exceeds the time of generating a fine-grained volume grid from a fine-grained surface grid which is the most difficult to calculate. In the subsequent merging of the grid, the large-scale grid also consumes a large amount of calculation time. SUMMARY
[0004] The present application introduces block extraction and the mutual topology of adjacent surfaces in the traditional parallel grid generation method to improve the speed of large-scale grid generation, and specifically provides a large-scale grid generation method based on parallel block extraction, comprising the following steps.
[0005] Step 1: P processes are created by using MPIRUN to read a CAD model at the same time;
[0006] Step 2: The CAD model obtained in step 1 is divided into a grid to generate a coarse-grained grid formed by point elements and volume grids;
[0007] Step 3, divide the coarse-grained grid generated in step 2 into P sub-regions using Metis, and mark the rank of the sub-region where each point element is located, and divide the coarse-grained volume grid set into P sub-sets according to the process rank, each process obtains the corresponding sub-set according to the process rank, and traverses; obtain the coarse-grained boundary surface grid and grid information by traversing the volume grid in the sub-set, and after each process is traversed, the inter-process communication mechanism (hereinafter referred to as MPI communication) and synchronization function of MPI are used to merge the information obtained in each sub-set;
[0008] Step 4, each process extracts the grid information in the sub-region from the merged coarse-grained grid information through the process rank, and performs boundary judgment through the grid information to generate surface grids intersecting with adjacent regions to realize sub-region closure;
[0009] Step 5, use MPI to make P sub-regions iterate surface grid insertion, and generate fine-grained volume grids after iterating to a certain number according to the required number of grids;
[0010] Step 6, the fine-grained volume grid information obtains the point elements and volume grids on the interface of the adjacent sub-regions based on MPI communication, and reconstructs the fine-grained volume grid for the boundary of the fine-grained volume grid;
[0011] Step 7, sequentially merge the fine-grained volume grids generated by the P processes in step 6, delete the redundant surface grids and vertices generated in the overlapping part between the grid regions, and take the final fine-grained grid as the output result.
[0012] Further, the step 3 comprises:
[0013] Step 3.1, label and divide the coarse-grained grid generated in step 2, and use Metis to label the partition weight of each vertex element;
[0014] Step 3.2, obtain the total number of coarse-grained volume grids;
[0015] Step 3.3, evenly block the total grid set, and each process obtains the block head and block tail;
[0016] Step 3.4, each process traverses from the block head to extract coarse-grained surface grid information to the block tail;
[0017] Step 3.5, merge the grid information obtained by each process.
[0018] Further, in step 3.4, the coarse-grained surface grid information includes vertex element label information of coarse-grained surface grids in P sub-regions, face element label information of coarse-grained surface grids, and interface vertex element information of coarse-grained surface grids.
[0019] Further, in step 3, the coarse-grained grid to be traversed is divided into blocks, evenly divided according to the number of processes created in step 1, and each process uses its rank in the MPI global environment to obtain its own subset range, and processes the volume grid elements within its own process range in parallel;
[0020] In the subset range, the surface grid elements on the volume grid elements are obtained through the coarse-grained volume grid elements, the vertex element information of the surface grid elements and the information whether it is a boundary are recorded in the surface grid information set, and each process processes the coarse-grained volume grid elements in the subset range to generate the surface grid information set, which is merged using the MPI communication interface, so that each process has the same surface grid information set; After merging, the integrated coarse-grained surface grid information is processed, and the coarse-grained surface grid in the divided area boundary is marked, and the coarse-grained surface grid in the outer boundary is marked.
[0021] Further, in step 4, each process compares the partition weight in the coarse-grained surface grid information set by the rank of the process rank in the MPI global environment, and extracts the operation when they are equal, and compares the partition of the coarse-grained surface grid information set by the rank of the process in the global environment adjacent to the sub-region, and extracts and marks it as an adjacent matrix grid element when they are equal, and finally generates the coarse-grained surface grid of the adjacent surface by marking, and the extracted coarse-grained surface grid is closed, so that the coarse-grained surface grid of the divided P sub-regions is the coarse-grained grid of the complete object model.
[0022] Further, in step 5, each process encrypts the obtained coarse-grained surface grid information iteratively, and the encryption step includes:
[0023] Step 5.1, obtaining three vertex elements of the coarse-grained surface grid triangle;
[0024] Step 5.2, traversing two by two to describe the three edges of the triangle in two-point form;
[0025] Step 5.3, obtaining the midpoint of each edge, and inserting the midpoint as a point;
[0026] Step 5.4, connecting the three midpoints of the three edges to construct an inner triangle;
[0027] Step 5.5, constructing an outer triangle with the connected edge and the original triangle outer edge;
[0028] Step 5.6, storing the four new triangles generated in the surface grid information, and deleting the original triangle;
[0029] Step 5.7, generating a fine-grained volume grid using a fine-grained surface grid.
[0030] Further, in step 6, after generating the fine-grained body mesh of the independent unit in a single process, the fine-grained mesh information on the adjacent surface is communicated with the adjacent unit having the same inner surface mesh, the fine-grained mesh unit on the adjacent surface is acquired, the body mesh on the adjacent surface of the process is projected, and the body mesh is reconstructed.
[0031] Further, step 6 comprises:
[0032] Step 6.1, all processes traverse the fine-grained surface mesh generated in step 5 to acquire two ranks in the fine-grained surface mesh;
[0033] Step 6.2, if one of the two ranks is -1, the single process is exclusive; if neither of the two ranks is -1, the surface mesh is an adjacent surface, the vertex information is exchanged, and the body mesh unit of the adjacent subregion interface is communicated with each other;
[0034] Step 6.3, each process inserts the body mesh unit on the adjacent surface received into the fine-grained body mesh information set, updates the body mesh, and establishes qualified fine-grained body mesh units.
[0035] Further, step 7 comprises:
[0036] Step 7.1, the subregion fine-grained mesh information set is acquired by traversing the process rank;
[0037] Step 7.2, the point element information and the surface mesh information are stored in a hash set;
[0038] Step 7.3, whether the element is repeated is determined through the hash set, and if repeated, the element is deleted;
[0039] Step 7.4, the large-scale mesh after merging and deduplication is output.
[0040] Compared with the prior art, the present application has the following advantages:
[0041] (1) The present application solves the problem that the time complexity of traversing the coarse-grained mesh information to assign the process rank and the adjacent process rank is too large due to the performance limitation of a single machine in parallel generation of large-scale mesh; the traversal problem of a large amount of throughput is divided into blocks and calculated in each computing core, thereby efficiently utilizing distributed computing resources, and short time, high parallelism and high utilization rate are used instead of traditional serial traversal.
[0042] (2) The present application generates a fine-grained sub-region volume grid with the information of the adjacent surface grid elements, which can simplify the reconstruction of the topological relationship when merging large-scale grids, greatly shorten the time of merging large-scale grids, and greatly reduce the memory occupied when merging grids. BRIEF DESCRIPTION OF DRAWINGS
[0043] The following drawings are only illustrative and explanatory of the present application, and are not used to limit the scope of the present application, in which:
[0044] Figure 1 is a flowchart of the present method;
[0045] Figure 2 is a schematic diagram of MPI_AllgatherV;
[0046] Figure 3 is an instance diagram of the refined surface grid;
[0047] Figure 4 is the visualization result of the fine-grained volume grid generated by the four sub-regions of the Wholewall.stp model using 4 cores and 1 time of refinement iteration, and the merged visualization result;
[0048] Figure 5 is the visualization result of the refined grid generated by the 0th process when the Wholewall.stp model is merged using 1024 cores. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution, design method and advantages of the present application more clear and explicit, the present application is further described in detail below by specific embodiments combined with the drawings. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0050] The following explains the definitions or concept connotations involved in the present application:
[0051] Delaunay triangle: Triangulation of point set, which is an extremely important preprocessing technique for numerical analysis (such as finite element analysis) and graphics. Triangulation: Assuming that V is a finite point set in a two-dimensional real number field, edge e is a closed line segment composed of points in the point set as endpoints, and E is the set of e. Then a triangulation T=(V,E) of the point set V is a planar graph G, which satisfies the following conditions: 1. Except for the endpoints, the edges in the planar graph do not contain any points in the point set; 2. There are no intersecting edges; 3. All faces in the planar graph are triangular faces, and the union of all triangular faces is the convex hull of the scattered point set V. The surface grid generated in the unstructured grid satisfied by the present application is a Delaunay triangle.
[0052] Bowyer-Watson algorithm: Bowyer-Watson algorithm is an algorithm for computing two-dimensional Delaunay triangulation. The algorithm is based on incremental method, gradually insert points into an empty triangle, and constantly adjust the relationship between the existing triangle and the inserted point according to some rules, and finally get a set of mutually non-overlapping Delaunay triangles. The key steps in Bowyer-Watson algorithm include: 1, create a super triangle containing all other points, and add it to the initial triangulation; 2, insert each point into the existing triangle in turn, find the triangle adjacent to the point; 3, according to the Delaunay property, delete all triangles inside the circle composed of the point and its adjacent triangle; 4, connect the new point with the convex hull composed of the triangle on the boundary, construct new triangle; 5, constantly repeat the above steps until all points are inserted into the triangulation. Finally, delete the super triangle and its adjacent triangle to get the final Delaunay triangulation, the Delaunay triangulation in the present application is based on this algorithm.
[0053] Metis: Metis is a powerful graph partitioning software package developed by Karypis Lab, which can be used to partition irregular graphs, meshes and compute Fill-Reducing Orderings of Sparse Matrices. It provides a set of command-line programs that can run independently, and also provides API for easy integration into C / C++ or Fortran programs. In this embodiment, the coarse-grained body grid is divided into multiple sub-regions by calling the API interface of Metis.
[0054] MPI: Message passing interface is a cross-language communication protocol, which is used to write parallel program technology; support point-to-point and broadcast, MPI is a message passing application program interface, including protocol and semantic description, which indicates how to play its characteristics in various implementations. The goal of MPI is high performance, large scale and portability, which is often used in distributed systems; in the present application, the MPI communication interface is used, and the processes between the parallel grid generation programs can communicate with each other.
[0055] Process rank: In MPI, each process has a unique identifier called "rank". The rank is used to distinguish different processes and can be used as the source and target address when communicating messages. MPI defines a global communication space that contains all the processes participating in communication. In this space, each process is assigned a rank, starting from 0 and increasing by one for each subsequent process until the last process in the space. The value of the rank remains constant during the execution of the program, so it can be used to identify a specific process and distinguish it from other processes. In an MPI program, each process can use the MPI_Comm_rank function to get its own rank. The value of the rank is an integer type and can be used to access many of the features provided by MPI, such as point-to-point communication and group communication. MPI programmers must ensure that the correct rank is used when sending and receiving messages so that messages can be correctly routed and processed. In this invention, the sub-regions and the block granularity are distinguished by the rank.
[0056] Centroid refinement method: By identifying the midline of the triangle vertices, a circle with the centroid as the center is constructed to be tangent to the original triangle. The tangent points of the three sides are the insertion points (which are the midpoints of the triangle sides), and the insertion points are connected to form new triangles, which also meet the definition of Delaunay triangles. This method is called the centroid refinement method. Figure 3
[0057] Speedup: Speedup is a measure of the performance improvement of parallel computing. It is defined as the ratio of serial computing time to parallel computing time, that is, , Sp is the speedup, T1 is the serial computing time, and Tp is the parallel computing time. The larger the speedup, the higher the efficiency of parallel computing, because the same task is completed in a shorter time. However, parallel computing cannot always achieve perfect speedup because there are many factors that affect performance improvement, such as communication overhead, load balancing, etc. Therefore, the actual speedup may be less than the theoretical value, so we will use the following law to verify the efficiency improvement of the invention.
[0058] Amdahl's Law: This law describes the overall performance improvement of a program when a certain module has achieved a speedup S under the premise of fixing the problem size. Assuming that the parallel part accounts for a proportion f of the overall proportion before optimization, then the overall speedup S' of the program is:
[0059]
[0060] This law accurately describes the efficiency improvement of the invention.
[0061] The invention provides a parallel block extraction large-scale mesh generation method, as shown in Figure 1 , including the following steps:
[0062] Step 1, read the model;
[0063] Step 2, the model read in step 1 is divided into a coarse-grained surface mesh based on Delauny triangle by Bowyer-Watson algorithm, and then a coarse-grained volume mesh is generated by the coarse-grained surface mesh;
[0064] Step 3, global point element block processing, including the following steps:
[0065] Step 3.1, use Metis graph partitioning open source library to mark the vertex elements in the coarse-grained volume mesh generated in step 2, and assign the process rank weight value to each vertex element according to the total number of process ranks in the MPI global communication domain;
[0066] Step 3.2, get the total number of vertex elements, and divide the vertex elements according to the total number of process ranks in the MPI global communication domain, each process uniformly obtains the initial traversal point and traversal endpoint according to the rank, and the final remainder is added to the tail of the process with the largest rank;
[0067] Step 3.3, each process traverses the vertex elements from the initial traversal point obtained in step 3.2 to the traversal endpoint, and the traversal process includes the following steps:
[0068] Step 3.3.1, get the surface mesh element of the triangle where the vertex element is located;
[0069] Step 3.3.2, get the volume mesh element of the tetrahedron where the vertex element is located;
[0070] Step 3.3.3, traverse the four surface mesh elements on the volume mesh element by the volume mesh element, store the surface mesh information in the preset surface mesh information variable, and assign the sub-region to which the surface mesh belongs, if the surface mesh element exists in the preset surface mesh information variable, it means that the surface mesh element is a boundary surface mesh, so the Boolean value of whether it is a boundary is true for this surface mesh, and the two sub-regions to which the surface mesh belongs are assigned;
[0071] Step 3.3.4, after each process is traversed, use MPI_AllgatherV of MPI communication interface to integrate and distribute the surface mesh information stored by each process to all processes in the MPI global communication domain.
[0072] Step 4, extract the coarse-grained surface mesh elements belonging to the sub-region of the process from the integrated surface mesh information in step 3;
[0073] Step 5, use the barycentric refinement method to encrypt the sub-region coarse-grained surface mesh elements extracted in step 4;
[0074] Step 6, generate a fine-grained body mesh through the fine-grained face mesh encrypted in step 5;
[0075] Step 7, use the MPI communication library to transfer the body mesh information on the adjacent face and re-topology, including the following operations:
[0076] Step 7.1, traverse by process rank to obtain a set of fine-grained mesh information of each sub-region;
[0077] Step 7.2, store the point element information and face mesh information in a hash set;
[0078] Step 7.3, determine whether the elements are repeated through the hash set, and if repeated, delete them;
[0079] Step 7.4, output the merged and de-duplicated large-scale mesh.
[0080] Step 8, merge to generate a large-scale fine-grained body mesh and output the final result in vol format, and save the time information of each step and the output mesh quality information for subsequent verification.
[0081] The present application is verified by experiments:
[0082] In order to verify the effectiveness and superiority of the algorithm in the present application, the following test model is selected for testing.
[0083] Parallel test environment:
[0084] Software environment: Fangde 3.2 (Linux) operating system, CMAKE-3.23.3 compilation tool, intel-MPI_2021.3.0,
[0085] Hardware environment: Xi'an supercomputing platform CPU type resource Each node is configured with 2 32-core 2.5GHz frequency x86 processors, 256GB memory, 100Gb computing network, the cluster adopts full-speed, non-blocking HDRInfiniband special computing network, different computing core number test cases are applied for different computing node numbers
[0086] Project users and test personnel: use remote connection supercomputer E-shell deployment and submit jobs for testing.
[0087] Figure 4 It can be seen that under the condition of 4 cores and 1 iteration, the visualization image of the generated body mesh unit is less, to verify the feasibility of the algorithm, Figure 5 The visualization image of the sub-region fine-grained body mesh generated by process 0 in the algorithm under the condition of 1024 cores and 4 iterations is shown, to test the feasibility of the present application in large-scale distributed parallel.
[0088] Table 1 is the initial parameters used in the experiment and the time results and grid size results of the generated grid under each parameter, and is compared with the traditional algorithm. In the serial single-core algorithm, the longest time to generate the same size grid is 8419.9 seconds, the speedup ratio of 16 cores in the traditional algorithm is 11.58, while the speedup ratio of 16 cores in the block extraction algorithm can reach 18.98, and the theoretical efficiency improvement is 63.9%; the speedup ratio of 64 cores in the traditional algorithm is 17.4, while the speedup ratio of 64 cores in the block extraction algorithm can reach 39.97, and the theoretical efficiency improvement is 130%; the speedup ratio of 512 cores in the traditional algorithm is 35.44, while the speedup ratio of 512 cores in the block extraction algorithm can reach 127.63, and the theoretical efficiency improvement is 260%; the speedup ratio of 1024 cores in the traditional algorithm is 37.22, while the speedup ratio of 1024 cores in the block extraction algorithm can reach 127.73, and the theoretical efficiency improvement is 243%; it can be seen that the traditional algorithm and the block extraction algorithm will increase with the increase of the number of cores, and the speedup ratio will also be significantly improved, because with the increase of the number of cores, the size of the sub-grid extracted in the sub-region will be smaller, so the time of generating fine-grained body grid from fine-grained surface grid in the sub-region will be less, thereby improving the generation speed, but with too large number of cores, the generation process and process communication cost will also increase, so the time consumed in communication will also be longer, so under the same algorithm, the speedup ratio of 512 cores is higher than that of 1024 cores. Unlike the traditional algorithm, the block extraction method is used to extract the surface grid information of the sub-region, which reduces the size of the program hotspot traversal area, and only one global communication is required at the end, so the optimal speedup ratio improvement efficiency of our algorithm in 512 cores can reach 260%.
[0089]
[0090] Table 1
[0091] Next, the efficiency of the algorithm is further summarized by Amdahl's law. Compared with the traditional algorithm, the speed optimization is mainly distributed in the algorithm hotspot of the extraction sub-region. In the traditional algorithm, the time consumed by each core in the hotspot is almost the same. In the experimental example, the Wholewall.stp model consumes about 167 seconds in the hotspot area. After testing, the time consumed by 64 cores in the hotspot in the block extraction algorithm is 11.1 seconds, and the overall speedup ratio obtained by Amdahl's law is 1.27; the time consumed by 64 cores in the hotspot in the block extraction algorithm is 2.95 seconds, and the overall speedup ratio obtained by Amdahl's law is 1.79; the time consumed by 512 cores in the hotspot is 2.86 seconds, and the overall speedup ratio obtained by Amdahl's law is 3.54; the time consumed by 512 cores in the hotspot is 5.47 seconds, and the overall speedup ratio obtained by Amdahl's law is 3.52.
[0092] In summary, it can be observed that although the speedup ratio of 1024 cores is improved compared with 512 cores, the overall speedup ratio of 1024 cores is lower than that of 512 cores by more accurate comparison by Amdahl's law. This is because the number of cores is too large, thereby increasing the communication burden in the merging block traversal extraction surface mesh. However, compared with the traditional algorithm, the block extraction algorithm can greatly shorten the running time under the appropriate core number scale. The overall speedup ratio of Amdahl's law under 512 cores is as high as 3.54, which greatly improves the parallel efficiency.
[0093] The above has described various embodiments of the present application, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes are obvious to those skilled in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles, practical applications or technical improvements in the market of the embodiments, or to enable other ordinary skilled persons in the art to understand the embodiments disclosed herein.
Claims
1. A method for parallel block extraction-based large-scale mesh generation, characterized in that, The method comprises the following steps: Step 1, creating P processes by using MPI to read the CAD model at the same time; Step 2, meshing the CAD model obtained in step 1 to generate a coarse-grained mesh formed by point elements and volume mesh elements; Step 3, dividing the coarse-grained mesh generated in step 2 into P sub-regions by using Metis, marking the rank of each point element in the sub-region, and dividing the coarse-grained volume mesh set into P sub-sets according to the process rank, each process obtaining the corresponding sub-set according to the process rank and traversing; obtaining the coarse-grained boundary surface mesh and mesh information by traversing the volume mesh in the sub-set, and merging the information obtained in each sub-set by using the MPI communication and synchronization function after each process is traversed; Step 4, each process extracts the mesh information in the sub-region from the merged coarse-grained mesh information by the process rank, and generates the surface mesh intersecting with the adjacent region to realize the closure of the sub-region by boundary judgment through the mesh information; Step 5, using MPI to make P sub-regions perform surface mesh point insertion iteration and generate fine-grained volume meshes; Step 6, the fine-grained volume meshes obtain the point elements and volume meshes on the interface of the adjacent sub-regions based on MPI communication, and reconstruct the fine-grained volume meshes for the boundary of the fine-grained volume meshes; Step 7, sequentially merging the fine-grained volume meshes generated by the P processes in step 6, deleting the redundant surface meshes and vertices generated in the overlapping part between the mesh regions, and taking the final fine-grained mesh as the output result.
2. The method of claim 1, wherein, The step 3 comprises: Step 3.1, marking and dividing the coarse-grained mesh generated in step 2, and marking the partition weight of each vertex element by using Metis; Step 3.2, obtaining the total number of coarse-grained volume meshes; Step 3.3, evenly dividing the total mesh set, and each process obtains the block head and block tail; Step 3.4, each process traverses from the block head to extract the coarse-grained surface mesh information to the block tail; Step 3.5, merging the mesh information obtained by each process.
3. The method of claim 2, wherein, In step 3.4, the coarse-grained surface mesh information comprises vertex element marking information of the coarse-grained surface mesh in P sub-regions, face element marking information of the coarse-grained surface mesh, and interface vertex element information of the coarse-grained surface mesh.
4. The method of claim 3, wherein, In step 3, the coarse-grained mesh to be traversed is divided into blocks, and is evenly divided according to the number of processes created in step 1, each process obtains its own sub-set range by using its own rank in the MPI global environment, and processes the volume mesh elements in its own process range in parallel; In the sub-set range, the surface grid elements on the volume grid elements are obtained by the coarse-grained volume grid elements, the vertex element information of the surface grid elements and the information whether it is a boundary are recorded in the surface grid information set, each process handles the coarse-grained volume grid elements in the sub-set range, and the generated surface grid information set is merged by using the MPI communication interface, so that each process has the same surface grid information set; after the merging is completed, the integrated coarse-grained surface grid information is processed, the coarse-grained surface grid of the internal boundary in the divided region is marked, and the coarse-grained surface grid of the external boundary is marked.
5. The method of claim 1, wherein, In step 4, each process compares the partition weight in the coarse-grained surface grid information set by the rank of the process in the MPI global environment, extracts the operation when they are equal, and compares the partition of the coarse-grained surface grid information set by the rank of the process in the global environment of the adjacent sub-region, extracts and marks as the adjacent matrix grid unit when they are equal, and finally generates the coarse-grained surface grid of the adjacent surface by marking, and the extracted coarse-grained surface grid is closed, so that the coarse-grained surface grid of the divided P sub-regions is the coarse-grained grid of the complete object model.
6. The method of claim 1, wherein, In step 5, each process encrypts and iterates the obtained coarse-grained surface grid information, and the encryption step includes: Step 5.1, obtaining three vertex elements of the coarse-grained surface grid triangle; Step 5.2, traversing two by two for the three vertices to describe the three edges of the triangle in two-point form; Step 5.3, obtaining the midpoint of each edge, and inserting the midpoint into the point; Step 5.4, connecting the three midpoints of the three edges to construct an inner triangle; Step 5.5, constructing an outer triangle with the connected edge and the original triangle outer edge; Step 5.6, storing the four new generated triangles in the surface grid information, and deleting the original triangle; Step 5.7, generating a fine-grained volume grid by using a fine-grained surface grid.
7. The method of claim 1, wherein, In step 6, after a single process generates a fine-grained volume grid of an independent unit, the process communicates with the adjacent unit having the same internal surface grid, and transmits the fine-grained grid information on the adjacent surface to each other, projects the volume grid on the adjacent surface of the process after obtaining the fine-grained grid unit on the adjacent surface in the adjacent unit, and reconstructs the volume grid.
8. The method of claim 7, wherein, The step 6 includes: Step 6.1, all processes traverse the sub-region fine-grained surface grid generated in step 5 to obtain two ranks in the fine-grained surface grid; Step 6.2, if one of the two ranks is -1, the single process is exclusive; if neither of the two ranks is -1, the surface grid is an adjacent surface, the vertex information is exchanged, and the volume grid unit of the adjacent sub-region interface is transmitted to each other; Step 6.3, each process inserts the received volume grid unit on the adjacent surface into the fine-grained volume grid information set, updates the volume grid, and establishes a qualified fine-grained volume grid unit.
9. The method of claim 1, wherein, The step 7 includes: Step 7.1, obtaining the fine-grained grid information set of each sub-region by traversing the process rank; Step 7.2, storing the point element information and the surface grid information in the hash set; Step 7.3, determining whether the elements are repeated by the hash set, and deleting if repeated; Step 7.4, output merged, deduplicated large-scale grid.
Citation Information
Patent Citations
Helicopter flow field numerical simulation optimization method and system
CN112632874A
Parallel mesh generation algorithm for ruins degradation finite element analysis
CN114741918A