Parallel communication mapping construction method based on double marking

By introducing a double marking strategy in parallel communication mapping, the problems of grid point selection deviation and insufficient accuracy of communication content in complex geometric coupling scenarios are solved, and high-precision and low-redundancy parallel communication mapping are achieved.

CN119996197AInactive Publication Date: 2025-05-13SOUTHWEAT UNIV OF SCI & TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510442821.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-05-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing parallel communication mapping method based on background grids has problems such as large grid point selection deviation and insufficient accuracy of communication content in complex geometric coupling scenarios.

Method used

The parallel communication mapping construction method based on double tags is adopted, and by introducing the ‘full-partial double tag’ strategy, redundant communication data is reduced and mapping accuracy and efficiency synergy is improved. The specific steps include creating a background unit data structure, calculating a rectangular envelope box, segmenting and refining, traversing the grid points to calculate the dependency area, double marking the background grid, filtering the source grid points, and building a communication map.

Benefits of technology

The outermost unit is checked by the double marking strategy, eliminates invalid grid points, and reduces redundant communication, providing a high-precision and low-redundancy parallel communication mapping solution for multi-physics coupled simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996197A_ABST
    Figure CN119996197A_ABST
Patent Text Reader

Abstract

The invention discloses a parallel communication mapping construction method based on double marking, and the method carries out the secondary verification of an outermost layer unit through a double marking strategy, eliminates invalid grid points, guarantees the high efficiency, reduces the redundant communication, provides a high-precision and low-redundancy parallel communication mapping scheme for the coupling simulation of a multi-physics field, and improves the reliability of the multi-physics field. The problems that in a complex geometric coupling scene, grid point selection deviation is large, and the accuracy of communication content is insufficient are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of multi-physical field coupling numerical simulation, and in particular to a method for constructing a parallel communication mapping based on double marking. Background Art

[0002] Multi-physics coupling numerical simulation combines multiple disciplines to perform collaborative calculations on complex physical phenomena. The core challenge is to achieve accurate transmission of coupling data between different solvers. As the scale of computing increases, the traditional serial communication mode is difficult to meet efficiency requirements due to the bottleneck problem of main process data collection / distribution. Parallel communication technology has become the key to improving the efficiency of large-scale coupling simulation by directly establishing inter-process communication mapping.

[0003] In the construction of parallel communication mapping, the accurate determination of communication content is the core difficulty. Existing methods mainly include two categories: global traversal search method and envelope pre-screening method. The global traversal search method matches the mapping relationship by traversing all grid points in the interpolation domain in a loop. Although it can ensure accuracy, the computational complexity grows exponentially with the grid size and cannot be applied to actual engineering problems; the envelope pre-screening method uses a rectangular / cuboid envelope to narrow the search range and combines spatial index data structures (such as R-trees) to accelerate queries. However, this type of method requires the maintenance of complex data structures, and the update cost is high in dynamic coupling scenarios. In addition, the geometric deviation between the envelope and the actual interpolation dependency domain (such as the circular support domain) will introduce systematic point selection errors, resulting in redundant or missing communication content.

[0004] In response to the above problems, the public document (patent number: ZL202411514525.7) introduced background meshing technology to refine the envelope of the coupling surface mesh into regular grid cells, and used algebraic operations to quickly locate the communication grid points, significantly reducing the time consumption of mapping construction. However, this method has been found to have the following limitations in practical applications: over-labeling problem and insufficient surface adaptation. The over-labeling problem refers to the fact that after the circular dependency domain of the target grid point is expanded to a rectangular area, the background cells at the corners of the rectangle that have no intersection with the circular dependency domain are mistakenly marked as communication units, resulting in redundant source grid points being included in the communication range. Insufficient surface adaptation means that in the case of surface coupling or non-uniform grid scenarios, the geometric mismatch between the outermost labeled unit and the boundary of the true dependency domain is aggravated, further amplifying the point selection deviation. Summary of the invention

[0005] Aiming at the problems of large grid point selection deviation and insufficient communication content accuracy in existing background grid-based parallel communication mapping methods in complex geometric coupling scenarios, this paper proposes a parallel communication mapping construction method based on double marking. By introducing the "full-partial double marking" strategy, the systematic geometric approximation error caused by the expansion of the rectangular dependency domain is solved, and the following objectives are specifically achieved: Reduce redundant communication data: Perform a secondary distance check on the source grid points in the outermost background unit (partially marked unit) of the rectangular dependency domain, accurately remove invalid communication points that have no intersection with the actual dependency domain of the target grid point, and avoid the problem of over-marking; Improve the synergy between mapping accuracy and efficiency: By combining the fast algebraic screening of inner background units (fully labeled units) with the dynamic verification of the outermost units, the accuracy of communication content in scenarios such as complex surfaces and non-uniform grids is significantly improved while ensuring computational efficiency (fully labeled units cover most communication points).

[0006] In order to achieve the above object, the present invention adopts the following technical solution: A method for constructing a parallel communication mapping based on double marking comprises the following steps: S1: Create a data structure of background cells based on the number of target grid points and the target grid point sequence number; S2: Calculate the rectangular envelope according to the target coupling surface mesh; S3: Divide and refine the rectangular envelope of step 2 according to a preset background grid resolution to obtain a background grid of the target coupling surface; S4: traverse all grid points of the target coupling surface and calculate the rectangular dependency area of ​​the grid points being traversed; S5: double-labeled background grid according to the rectangular dependency region of S4; S6: traverse all grid points on the target coupling surface and update the grid point numbers in some marked background cells; S7: the process of transferring the source coupling interface mesh to the target coupling interface mesh; S8: filtering the source grid points using the doubly labeled background cells to obtain the grid points participating in the coupled interface communication; S9: Construct a communication map for direct communication between solver processes based on the filtered source grid points.

[0007] In the above technical solution, the process of double-marking the background grid includes the following steps: S51: Calculate the positions of two corner points of the rectangular area in the background grid respectively; S52: when the coordinate difference between the two corner points is greater than 1, completely mark the background cells whose coordinate dimensions are between the two coordinate values; S53: Mark the rows and columns corresponding to the coordinates of the two corner points in the grid as background unit parts.

[0008] In the above technical solution, the following steps are preferably adopted: S51: According to the formula: , Calculate the position of the corner point in the background grid, where (x, y) is the coordinate of the current target grid point. , are the minimum values ​​of the target coupling grid points in the X and Y directions, S52: Define the position of corner point 1 as , the position of corner point 2 is ,in and Represents the position in the X direction of the background grid, where and Indicates the position in the Y direction of the background grid, when ,and When the X dimension is located at and The background units between , and the Y dimension is between and The background cells between them are fully marked; S53: and The row where and The background unit in the column is partially marked, and the number of target grid points in the partially marked unit is updated and increased by one.

[0009] In the above technical solution, S6 comprises the following steps: S61: Calculate the rectangular dependent area of ​​the grid point being traversed, and calculate the positions of two corner points of the rectangular area in the background grid; S62: Traverse the background cells corresponding to the rows and columns corresponding to the corner point coordinate values ​​one by one; S63: Determine whether the mark value of the background unit is a partial mark, and write the sequence number of the partially marked grid point into the array of the unit.

[0010] In the above technical solution, a first solver and a second solver are included in constructing a communication mapping. The core process of the second solver collects source coupling interface meshes of all slave processes, and then transmits all source coupling surface meshes to the core process of the first solver through point-to-point communication. The core process of the first solver broadcasts all received source coupling surface meshes to all slave processes of the first solver.

[0011] Among the above technical solutions, the following solutions are preferred: S81: traversing the source coupling interface grid points on all processes of the first solver, and determining whether the traversed grid points are within the rectangular envelope of the current process; S82: Calculate the position of the corresponding grid point in S81 within the background grid; S83: Determine the background unit mark of the grid point, and decide whether the grid point participates in the communication according to the mark type.

[0012] In the above technical solution, if the background unit of the grid point is marked as an initialized background unit, the grid point does not participate in the communication; If the grid point is inside a cell marked as fully marked by the background cell, the grid point participates in the communication; If the grid point is inside a cell marked as a partial mark by the background cell, all target grid points inside the cell are traversed, and the distance between the grid point and the target grid point is calculated. When the distance is not greater than the support radius, the grid point participates in the communication.

[0013] In this scheme, some names are defined as follows: Fully marked unit: The background unit located in the inner layer of the rectangular dependency domain, whose coverage area is completely within the circular dependency domain, and the source grid points in the unit are directly determined as communication points without secondary calculation; Partially marked unit: The background unit located in the outermost layer of the rectangular dependency domain only partially covers the boundary of the dependency domain. It is necessary to perform distance verification on the source grid points in the unit. The source grid points can only participate in communication when the distance between them is less than the support radius SR.

[0014] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: This method uses a double-marking strategy to perform a second check on the outermost units and eliminate invalid grid points, thereby reducing redundant communications while ensuring high efficiency, and providing a high-precision, low-redundancy parallel communication mapping solution for multi-physics field coupling simulation. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The present invention will now be described by way of example with reference to the accompanying drawings, in which: Figure 1 It is a schematic diagram of the mesh of the coupling surface between solver A and solver B; Figure 2 is a schematic diagram of the background grid of solver A; Figure 3 It is a schematic diagram of the rectangular dependency region of the grid point p on process A1; Figure 4 It is a schematic diagram of the background grid after the grid point p is marked on process A1; Figure 5 It is a schematic diagram of the background grid after all grid points on process A1 are marked; Figure 6 It is a schematic diagram of the interpolation dependency domain of the inspection process; Figure 7 It is a schematic diagram of the grid points participating in the communication; Figure 8It is a parallel communication mapping construction process based on double marking. DETAILED DESCRIPTION

[0016] All features disclosed in this specification, or steps in all methods or processes disclosed, except mutually exclusive features and / or steps, can be combined in any manner.

[0017] Any feature disclosed in this specification (including any additional claims, abstract and drawings), unless otherwise stated, may be replaced by other equivalent or alternative features with similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.

[0018] The test case of this embodiment includes solver A and solver B. In solver A, there are processes A1 and A2 with coupled surface meshes. The coupled surface mesh of solver A adopts unstructured mesh discretization. In solver B, there are processes B1, B2, B3 and B4 with coupled surface meshes. The coupled surface mesh of solver B adopts structured mesh discretization. The mesh model is as follows: Figure 1 shown.

[0019] The specific implementation process of this embodiment is as follows Figure 8 As shown, the details are as follows: Step 1: Create the data structure of the background unit. Define a variable n of integer data type in the background unit to record the number of target grid points in the background unit; define an array index of integer data type in the background unit to record the sequence number of target grid points in the background unit.

[0020] Step 2: Calculate the rectangular envelope based on the target coupling surface mesh. Traverse the coupling surface mesh points in all processes of solver A, and use a pairwise comparison method to find the maximum values ​​of the mesh point coordinates in each dimension. The maximum values ​​of the X dimension are , The maximum values ​​of the Y dimension are 、 The rectangular envelope is composed of the maximum and minimum values ​​of the grid points in each dimension. Indicates, as ,in is a small positive quantity used to eliminate the problem that numerical errors may cause grid points to be outside the rectangular envelope. At the same time, the maximum value of the data dimension is updated , , , .

[0021] The maximum value of the coupling surface mesh in the X dimension on process A1 of this embodiment is: 、 ; The maximum value in the Y dimension is: 、 The maximum value of the coupled surface mesh in the X dimension on process A2 is: 、 ; The maximum value in the Y dimension is: 、 The small amount ε is taken as 0.05 times SR, where SR is the support radius of the mapping. If SR is taken as 0.8, then the small amount The rectangular envelope calculated in process A1 is expressed as [-3.84, 1.34, -3.84, 3.84], and the rectangular envelope calculated in process A2 is expressed as [-1.34, 3.84, -3.84, 3.84].

[0022] Step 3: Divide and refine the rectangular envelope of step 2 according to the preset background grid resolution to obtain the background grid of the target coupling surface. The background grid resolution refers to the number of nodes in the background grid in each data dimension. The number of nodes in the X dimension is recorded as , the number of nodes in the Y dimension is recorded as . Divide the rectangular envelope of step 2 into The background grid of rectangular units, the size of each unit is expressed as , Initialize the marker values ​​of all background cells to 0.

[0023] In this embodiment, the grid resolution preset in processes A1 and A2 is , 6 and 11 respectively, and then the rectangular envelope of step 2 is divided into a background grid of 50 rectangular units. The size of each background unit in process A1 is 、 , the background grid on process A1 and A2 is as follows Figure 2 shown.

[0024] Step 4: Traverse all grid points of the target coupling surface and calculate the rectangular dependency region of the grid point being traversed. Traverse the coupling surface grid points in all processes of solver A. The interpolation dependency domain of the grid point (x, y) being traversed is a circular area with (x, y) as the center and SR as the radius, where SR is the support radius of the data mapping. In order to better describe the relationship between the interpolation dependency domain of the grid point and the background grid, the interpolation dependency domain of the grid point is expanded to a rectangular area, that is, a rectangular area with p1 (x-SR, y-SR) and p2 (x+SR, y+SR) as the corner points. For example Figure 3As shown, the grid point being traversed is p(-3,3), and the two corner points of its rectangular dependent area are p1 and p2, and the coordinates of p1 and p2 are (-3.8,2.2) and (-2.2,3.8) respectively.

[0025] Step 5: Double-mark the background grid according to the rectangular dependent area in step 4. First calculate the positions of the two corner points of the rectangular area in the background grid. The position calculation formula is: , where (x,y) are the coordinates of the corner point, is the position of the corner point in the X dimension, is the position of the corner point in the Y dimension. The position of the corner point p1 is expressed as , the position of the corner point p2 is expressed as Then, when and The difference is greater than 1, and and When the difference is also greater than 1, the X dimension is located at and The background units between , and the Y dimension is located at and The background cells between are marked as 2, which means that the background cells are completely marked. or , and listed as or The background unit is marked as 1, indicating that the background unit is partially marked. At the same time, the number of target grid points in the partially marked unit is updated and added by 1.

[0026] In this embodiment, Figure 3 As shown, the position of corner point P1 in the X dimension is 1, and the position in the Y dimension is 2, and the position of corner point P2 in the X dimension is 8, and the position in the Y dimension is 10. At this time, 、 、 、 .because and The difference is less than 1, so the grid point p will only mark the background cells with rows 1 or 2 and columns 8 or 10 as 1, that is, partially mark the background cells with serial numbers 36, 37, 46, and 47. At the same time, update the number of target grid points in the background cells with serial numbers 36, 37, 46, and 47 and add 1.

[0027] Step 6: Traverse all grid points on the target coupling surface and update the grid point numbers in some marked background cells. First, use the method in step 4 to calculate the rectangular dependency area of ​​the grid point p being traversed, and use the method in step 5 to calculate the positions of the two corner points of the rectangular area in the background grid. Then, traverse the behavior one by one. or , and listed as or The background cell is checked to see if the cell's tag value is 1. If the cell's tag value is 1, the sequence number of the grid point p is written into the index array of the cell.

[0028] In this embodiment, Figure 3 As shown, the grid point being traversed is p(-3,3), and the two corner points of its rectangular dependent area are p1(-3.8,2.2) and p2(-2.2,3.8), respectively. The position of corner point p1 in the background grid is (1,8), and the position of corner point p2 in the background grid is (2,10). Then, the background cells with rows 1 or 2 and columns 8 or 10 are traversed one by one, that is, the background cells with serial numbers 36, 37, 46, and 47. Since the mark value of the background cells with serial numbers 36, 37, 46, and 47 is 1, the serial number 4 of the grid point p(-3,3) needs to be added to the index array of cells 36, 37, 46, and 47. The background grid after double marking of all target grid points in process A is as follows Figure 4 As shown in the figure, black cells are fully marked cells, and gray cells are partially marked cells. Figure 4 Only the target grid point numbers in some gray cells are displayed.

[0029] Step 7: Transfer the source coupling interface mesh to the process where the target coupling interface mesh is located. The core process B0 of solver B collects the coupling interface meshes of all slave processes B1, B2, B3 and B4, and then transfers all source coupling surface meshes to the core process A0 of solver A through point-to-point communication. Then, the core process A0 of solver A broadcasts all received source coupling surface meshes to all slave processes A1 and A2 of solver A.

[0030] Step 8: Use the double-labeled background cells to filter the source grid points to obtain the grid points participating in the coupling interface communication. First, traverse the source coupling interface grid points on all processes of solver A to determine whether the traversed grid point q(x, y) is within the rectangular envelope of the current process, that is, and Then, the position of the grid point q in the background grid is calculated, and the position in the X dimension is , the position in the Y dimension is If the grid point q is inside the cell with a marking value of 0, then the grid point does not participate in the communication. If the grid point q is inside the cell with a marking value of 2, then the grid point needs to participate in the communication. If the grid point q is inside the cell with a marking value of 1, then it is necessary to traverse all the target grid points in the cell and calculate the distance between the grid point q and the target grid point. When the distance is less than or equal to the support radius SR, the grid point q participates in the communication.

[0031] In this embodiment, Figure 5 and Figure 6 As shown in the figure, the grid point q1(-3,3) being traversed in process A1 is within the rectangular envelope of A1, and the position of the grid point in the background grid is (1,9). The tag value of the cell corresponding to this position is 1, so it is necessary to traverse the grid point array index in this cell. After calculation, the distance between grid point q1 and the target grid point with sequence number 4 is equal to 0, so grid point q1 participates in communication. If the grid point being traversed is q2(0,3), the grid point is within the rectangular envelope of A1, and the position of the grid point in the background grid is (4,9), the tag value of the cell corresponding to this position is 2, so grid point q2 needs to participate in communication.

[0032] Step 9: Based on the filtered source grid points, construct a communication mapping for direct communication between solver processes. First, on the process of solver A, a communication mapping such as remoteMap={1:[q1,q2,…];…;n:[q1,q2,…]} can be established through the filtered source grid points. Among them, 1 to n represent the process number of solver B, and q1,q2,… represent the sequence number of the source coupling surface grid points of the process of solver B. Then, the communication mapping of each process of solver A is fed back to the corresponding process of solver B, and the communication mapping remoteMap is established on the process of solver B.

[0033] In this embodiment, Figure 7 As shown in the figure, the communication map constructed in process A1 is remoteMap={B1:[1-100]}, where "1-100" means that all grid points numbered 1 to 100 participate in the communication. Then, the communication map of process A1 is fed back to process B1 of solver B, and the communication map remoteMap={A1:[1-100]} is constructed on process B1.

[0034] The present invention is not limited to the above-mentioned specific embodiments, but extends to any new features or any new combination disclosed in this specification, as well as any new method or process steps or any new combination disclosed.

Claims

1. A method for constructing a parallel communication mapping based on double marking, characterized in that The following steps are involved: S1: Create a data structure of background cells based on the number of target grid points and the target grid point sequence number; S2: Calculate the rectangular envelope according to the target coupling surface mesh; S3: Divide and refine the rectangular envelope of step 2 according to a preset background grid resolution to obtain a background grid of the target coupling surface; S4: traverse all grid points of the target coupling surface and calculate the rectangular dependency area of ​​the grid points being traversed; S5: double-labeled background grid according to the rectangular dependency region of S4; S6: traverse all grid points on the target coupling surface and update the grid point numbers in some marked background cells; S7: the process of transferring the source coupling interface mesh to the target coupling interface mesh; S8: filtering the source grid points using the doubly labeled background cells to obtain the grid points participating in the coupled interface communication; S9: Construct a communication map for direct communication between solver processes based on the filtered source grid points.

2. A method for constructing a parallel communication mapping based on dual marking according to claim 1, characterized in that The process of double-marking the background grid includes the following steps: S51: Calculate the positions of the two corner points of the rectangular area in the background grid respectively; S52: when the coordinate difference between the two corner points is greater than 1, completely mark the background cells whose coordinate dimensions are between the two coordinate values; S53: Mark the rows and columns corresponding to the coordinates of the two corner points in the grid as background unit parts.

3. A method for constructing a parallel communication mapping based on dual marking according to claim 2, characterized in that: S51: According to the formula: , Calculate the position of the corner point in the background grid, where (x, y) is the coordinate of the current target grid point. , are the minimum values ​​of the target coupling grid points in the X and Y directions, S52: Define the position of corner point 1 as , the position of corner point 2 is ,in and Represents the position in the X direction of the background grid, where and Indicates the position in the Y direction of the background grid, when ,and When the X dimension is located at and The background units between , and the Y dimension is between and The background cells between them are fully marked; S53: and The row where and The background unit in the column is partially marked, and the number of target grid points in the partially marked unit is updated and increased by one.

4. A method for constructing a parallel communication mapping based on dual marking according to claim 1, characterized in that The S6 comprises the following steps: S61: Calculate the rectangular dependent area of ​​the grid point being traversed, and calculate the positions of two corner points of the rectangular area in the background grid; S62: Traverse the background cells corresponding to the rows and columns corresponding to the corner point coordinate values ​​one by one; S63: Determine whether the mark value of the background unit is a partial mark, and write the sequence number of the partially marked grid point into the array of the unit.

5. A method for constructing a parallel communication mapping based on dual marking according to claim 1, characterized in that When constructing a communication mapping, a first solver and a second solver are included. The core process of the second solver collects the source coupling interface meshes of all slave processes, and then transmits all source coupling surface meshes to the core process of the first solver through point-to-point communication. The core process of the first solver broadcasts all received source coupling surface meshes to all slave processes of the first solver.

6. A method for constructing a parallel communication mapping based on dual marking according to claim 5, characterized in that: S81: traversing the source coupling interface grid points on all processes of the first solver, and determining whether the traversed grid points are within the rectangular envelope of the current process; S82: Calculate the position of the corresponding grid point in S81 within the background grid; S83: Determine the background unit mark of the grid point, and decide whether the grid point participates in the communication according to the mark type.

7. A method for constructing a parallel communication mapping based on dual marking according to claim 6, characterized in that: If the background cell of the grid point is marked as an initialization background cell, the grid point does not participate in the communication; If the grid point is inside a cell marked as fully marked by the background cell, the grid point participates in the communication; If the grid point is inside a cell marked as a partial mark by the background cell, all target grid points inside the cell are traversed, and the distance between the grid point and the target grid point is calculated. When the distance is not greater than the support radius, the grid point participates in the communication.

Citation Information

Patent Citations

  • Background grid-based multi-physics field coupling parallel communication mapping construction method, device, equipment and medium

    CN119052081B

  • Numerical model-oriented parallel communication method, device and system and storage medium

    CN110764934A

  • Grid mapping method and device for multi-physics field coupling of reactor core

    CN119378422A

  • Optimizing layout of an application on a massively parallel supercomputer

    US20060101104A1

  • Human face image processing method and electronic device

    WO2021027585A1