Connected Region Partitioning Method Supporting Multiple Connectivities Based on the LBM Discrete Velocity Model
Through the method based on the LBM discrete velocity model, grid points are marked as fully connected or non-full connected, and breadth-first search is used for connection domain numbering and merging, which solves the problem of inaccurate connection domain division caused by the quality differences of three-dimensional geometric models in the prior art, and achieves efficient and robust connection domain division.
Patent Information
- Application Number
- CN202510258657.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-03-06
AI Technical Summary
The existing connectivity domain division methods are difficult to adapt to three-dimensional geometric models of different quality, especially low-quality or ‘dirty’ geometric models, resulting in inaccurate results of connecting point set division and high computation and storage overhead, which cannot meet the needs of complex engineering simulations.
The method based on the LBM discrete velocity model is adopted to mark grid points as fully connected points or non-full connected points, the connecting domain number is numbered through the breadth-first search method, and the merging relationship is recorded, and the connecting domain number is finally merged to complete the division to adapt to geometric models of different qualities.
It realizes efficient and robust connectivity domain division in three-dimensional geometric models of different quality, ensuring the uniqueness of connectivity domain numbers and the accuracy and completeness of connectivity domain division, and meeting the needs of complex engineering simulations.
Smart Images

Figure CN119810140B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer-aided engineering technology, and particularly to a method for partitioning connected domains with multi-connectivity based on the LBM discrete velocity model. Background Art
[0002] In the fields of modern engineering simulation and computer-aided engineering (CAE), the partitioning of connected domains of 3D geometric models is a core step in many applications, such as automotive simulation, digital core simulation, etc. These applications require accurate connectivity analysis of complex 3D geometric models to ensure that subsequent numerical simulations and engineering calculations can accurately reflect physical phenomena. However, the quality of 3D geometric models in reality varies widely, including both high-precision watertight geometric models and low-quality "dirty" geometric models (such as 3D scan data). Therefore, a method for partitioning connected domains that can adapt to geometric models of different qualities is needed to meet the complex and changing engineering requirements.
[0003] Currently, some methods for partitioning connected domains divide the connected domains by defining fixed connectivity rules (such as eight-connectivity or twenty-four-connectivity), and these methods show good results when dealing with high-quality geometric models.
[0004] However, most of the existing methods can only handle the case of single connectivity and cannot flexibly adapt to geometric models of different qualities. Given a set of spatial geometric points with known connection relationships, in the method of partitioning connected point sets, the current similar technologies lack a method for searching connected point sets (connected domains) with different connectivities. The quality of 3D geometric models in real production scenarios varies widely, and the conventional search for connected point sets is easily affected by cracks and damages in the geometry, and the partitioning results of connected point sets often do not match the intuitive geometric connected regions. For 3D geometric models with different qualities, different connectivity constraint levels (connectivities) should be provided to adapt to the complex and changing production scenarios. The search algorithms based on graph theory generally need to store all the nodes and edges of the graph when searching for connected point sets, and this approach has high computational and storage overheads and is difficult to meet the efficiency requirements in production scenarios. Therefore, how to efficiently and robustly partition connected domains in 3D geometric models of different qualities to meet the requirements of engineering simulation has become an urgent problem to be solved.
[0005] The above content is only used to assist in understanding the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0006] The purpose of this application is to provide a method for partitioning connected domains with multi-connectivity based on the LBM discrete velocity model, aiming to solve the technical problem of how to efficiently and robustly partition connected domains in 3D geometric models of different qualities to meet the requirements of engineering simulation.
[0007] To achieve the above object, the present application proposes a connected domain partitioning method supporting multiple connectivity degrees based on the LBM discrete velocity model, and the method includes:
[0008] Mark all lattice points as fully connected points or non-fully connected points;
[0009] Perform connected domain numbering on the fully connected points and the non-fully connected points by means of breadth-first search, save the numbered lattice points and the corresponding connected domain numbers to the lattice point connected domain number recording system, and save the merging relationship between different connected domains to the connected domain numbering system;
[0010] Merge the connected domain numbers in the connected domain numbering system to obtain the target connected domain number;
[0011] Update the connected domain numbers of the lattice points in the lattice point connected domain number recording system according to the target connected domain number to complete the connected domain partitioning.
[0012] In addition, to achieve the above object, the present application also proposes a connected domain partitioning device supporting multiple connectivity degrees based on the LBM discrete velocity model, and the device includes:
[0013] A lattice point marking module for marking all lattice points as fully connected points or non-fully connected points;
[0014] A connected domain numbering module for performing connected domain numbering on the fully connected points and the non-fully connected points by means of breadth-first search, saving the numbered lattice points and the corresponding connected domain numbers to the lattice point connected domain number recording system, and saving the merging relationship between different connected domains to the connected domain numbering system;
[0015] A connected domain merging module for merging the connected domain numbers in the connected domain numbering system to obtain the target connected domain number;
[0016] A numbering update module for updating the connected domain numbers of the lattice points in the lattice point connected domain number recording system according to the target connected domain number to complete the connected domain partitioning.
[0017] In addition, to achieve the above object, the present application also proposes a connected domain partitioning device supporting multiple connectivity degrees based on the LBM discrete velocity model, and the device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the connected domain partitioning method based on the LBM discrete velocity model as described above.
[0018] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the connectivity domain division method supporting multi-connectivity based on the LBM discrete velocity model as described above are implemented.
[0019] In addition, to achieve the above object, the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the connectivity domain division method supporting multi-connectivity based on the LBM discrete velocity model as described above are implemented.
[0020] One or more technical solutions proposed by the present application have at least the following technical effects:
[0021] First, select a lattice configuration according to the actual application scenario, determine which discrete velocity directions there are according to the lattice configuration, and mark all lattice points as fully connected points or non-fully connected points according to the discrete velocity direction. This step ensures the flexibility and robustness of the connectivity domain division, can adapt to geometric models of different qualities, and at the same time avoids the influence of geometric cracks and damages on the division results. Then, perform connectivity domain numbering on the fully connected points and non-fully connected points through the breadth-first search method, save the numbered lattice points and the corresponding connectivity domain numbers to the lattice point connectivity domain number recording system, and save the merging relationship between different connectivity domains to the connectivity domain numbering system. This process utilizes the high efficiency of the breadth-first search to quickly traverse all connected lattice points, and at the same time, by recording the merging relationship, ensures the accuracy of the connectivity domain division. Then, merge the connectivity domain numbers in the connectivity domain numbering system to obtain the target connectivity domain number. This step ensures the continuity and uniqueness of all connectivity domain numbers through the merging operation, avoids jumps and redundancies in the numbers, and thus ensures the integrity of the connectivity domain division. Finally, update the connectivity domain numbers of the lattice points in the lattice point connectivity domain number recording system according to the target connectivity domain number to complete the connectivity domain division. This step ensures that the connectivity domain numbers of all lattice points are consistent with the final connectivity domain division result, provides accurate connectivity domain information for subsequent engineering simulations and analyses, and ensures the accuracy and integrity of the connectivity domain division. Through this series of steps, the present application can efficiently and robustly divide connectivity domains in three-dimensional geometric models of different qualities to meet the requirements of complex engineering scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0023] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0024] Figure 1 It is a schematic flowchart provided by Embodiment 1 of the method for dividing connected domains with support for multiple connectivity degrees based on the LBM discrete velocity model of the present application;
[0025] Figure 2 It is a schematic diagram of a lattice configuration commonly used in the lattice Boltzmann method provided by Embodiment 1 of the method for dividing connected domains with support for multiple connectivity degrees based on the LBM discrete velocity model of the present application;
[0026] Figure 3 It is a schematic diagram of the connectivity requirements of adjacent two points under three connectivity degrees provided by Embodiment 1 of the method for dividing connected domains with support for multiple connectivity degrees based on the LBM discrete velocity model of the present application;
[0027] Figure 4 It is a schematic diagram of the geometric crack dredging and isolation under different connectivity degrees provided by Embodiment 1 of the method for dividing connected domains with support for multiple connectivity degrees based on the LBM discrete velocity model of the present application;
[0028] Figure 5 It is a schematic diagram of full-connected points and non-full-connected points provided by Embodiment 1 of the method for dividing connected domains with support for multiple connectivity degrees based on the LBM discrete velocity model of the present application;
[0029] Figure 6 It is a schematic flowchart of the connected domain search for full-connected points provided by Embodiment 1 of the method for dividing connected domains with support for multiple connectivity degrees based on the LBM discrete velocity model of the present application;
[0030] Figure 7 It is a schematic flowchart of the connected domain search for non-full-connected points provided by Embodiment 1 of the method for dividing connected domains with support for multiple connectivity degrees based on the LBM discrete velocity model of the present application;
[0031] Figure 8 It is a schematic diagram of the cracks on the car model and the connectivity of the lattice points near the cracks provided by Embodiment 1 of the method for dividing connected domains with support for multiple connectivity degrees based on the LBM discrete velocity model of the present application;
[0032] Figure 9 It is a comparison schematic diagram of the failure and success of the connected domain division inside and outside the car provided by Embodiment 1 of the method for dividing connected domains with support for multiple connectivity degrees based on the LBM discrete velocity model of the present application;
[0033] Figure 10Schematic diagram of the connected domain number merging operation process in the connected domain numbering system provided by Embodiment 1 of the connected domain partitioning method supporting multiple connectivity degrees based on the LBM discrete velocity model of the present application;
[0034] Figure 11 Schematic diagram of the results of three connected domain number merging operations provided by Embodiment 1 of the connected domain partitioning method supporting multiple connectivity degrees based on the LBM discrete velocity model of the present application;
[0035] Figure 12 Schematic diagram of the process provided by Embodiment 2 of the connected domain partitioning method supporting multiple connectivity degrees based on the LBM discrete velocity model of the present application;
[0036] Figure 13 Schematic diagram for comparing the actual search results and the expected search results of the connected domain with a connectivity degree of 2 provided by Embodiment 2 of the connected domain partitioning method supporting multiple connectivity degrees based on the LBM discrete velocity model of the present application;
[0037] Figure 14 Schematic diagram of the search results of the automotive geometric connected domain provided by Embodiment 2 of the connected domain partitioning method supporting multiple connectivity degrees based on the LBM discrete velocity model of the present application;
[0038] Figure 15 Schematic diagram of the module structure of the connected domain partitioning device supporting multiple connectivity degrees based on the LBM discrete velocity model according to an embodiment of the present application;
[0039] Figure 16 Schematic diagram of the device structure of the hardware operating environment involved in the connected domain partitioning method supporting multiple connectivity degrees based on the LBM discrete velocity model in an embodiment of the present application.
[0040] The implementation, functional features, and advantages of the object of the present application will be further described in conjunction with the embodiments and the accompanying drawings. Detailed implementation manners
[0041] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0042] For a better understanding of the technical solutions of the present application, the following will be described in detail in conjunction with the accompanying drawings of the specification and the specific implementation manners.
[0043] In the field of modern computer-aided engineering, the division of connected domains of three-dimensional geometric models is crucial for applications such as automotive simulation and digital core simulation. However, existing methods are mainly designed for high-quality geometric models and are difficult to adapt to low-quality or "dirty" data. Current technologies mainly adopt fixed connection rules and cannot flexibly handle geometric models of different qualities. Moreover, conventional search methods are easily affected by geometric cracks and damages, resulting in inaccurate results. To improve adaptability, different levels of connectivity constraints need to be provided to adapt to various production scenarios, and the graph-theory-based search algorithm needs to be optimized to reduce computational and storage overheads and meet the efficiency requirements in practical applications.
[0044] The main solution of the embodiments of this application is as follows: First, determine the lattice configuration and the corresponding discrete velocity directions according to the actual application scenario, and then mark the lattice points as fully connected or not fully connected according to the discrete velocity directions to adapt to different models and avoid the influence of geometric defects; then use breadth-first search to number the connected domains of these points, and save the results and merging relationships to the system to ensure the accuracy and efficiency of the division; then merge the connected domain numbers to ensure that the numbers are continuous and unique, eliminating jumps and redundancies; finally, update the connected domain numbers of the lattice points according to the merged target connected domain numbers to complete the entire connected domain division process.
[0045] It should be noted that the execution subject of the embodiments of this application can be a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a Windows computer, a Linux computer, a computer system, etc. that can implement the above functions. Hereinafter, the computer system is used as an example to illustrate this embodiment and the following embodiments.
[0046] Based on this, the embodiments of this application provide a connected domain division method supporting multiple connectivity degrees based on the LBM discrete velocity model, referring to Figure 1 , Figure 1 is a schematic flowchart of the first embodiment of the connected domain division method supporting multiple connectivity degrees based on the LBM discrete velocity model of this application.
[0047] In this embodiment, the connected domain division method supporting multiple connectivity degrees based on the LBM discrete velocity model includes steps S10 to S40:
[0048] Step S10, mark all lattice points as fully connected points or not fully connected points.
[0049] It should be noted that a lattice point refers to a regular grid point into which the computational region is divided in the lattice Boltzmann method. Each lattice point represents a tiny region of the fluid and is used to simulate the behavior of the fluid.
[0050] The discrete velocity directions refer to the discrete directions used to describe particle migration in the lattice Boltzmann method. In three-dimensional space, common lattice configurations include D3Q19 and D3Q27: D3Q19: Each lattice point has 19 discrete velocity directions, including 6 orthogonal directions, 12 diagonal directions, and 1 stationary direction. D3Q27: Based on D3Q19, 8 directions of the cube's skew diagonals are added, resulting in a total of 27 discrete velocity directions. These discrete velocity directions define the possible connection relationships between lattice points and are the basis for judging connectivity.
[0051] Connectivity refers to whether there is a direct or indirect connection relationship between two lattice points. Specifically: If two lattice points satisfy the connectivity condition (i.e., there is no geometric obstruction or other restrictions) in all discrete velocity directions within a given angular range, then these two lattice points are considered connected. Connectivity is judged by examining the connection relationships of lattice points in discrete velocity directions. The connectivity judgment is the core of the connected domain division, which determines whether a lattice point belongs to the same connected domain.
[0052] Connectivity degree refers to the connectivity constraint when judging whether two lattice points belong to the same connected point set (connected domain). We set the connectivity degree to be divided into levels by the angular range covered by the connected lattice directions: The lower the connectivity degree level, the smaller the angular range covered by the relatively connected lattice directions between two adjacent points, and these two points can be regarded as connected and belong to the same connected domain; when the connectivity degree level is higher, it means that two adjacent points need to be connected in almost all relatively lattice directions for these two points to be regarded as connected.
[0053] In this embodiment, three connectivity degree levels are defined, indicating that the angular ranges of discrete velocity directions to be considered when judging whether lattice points are connected are 0°, 45°, and 90° respectively, and the connectivity constraint intensity increases in sequence. Assume using the D2Q9 discrete model ( Figure 2 (a) in it) to determine the connectivity of these two adjacent lattice points. In different connectivity degree cases: (1) Connectivity degree 0: Two lattice points can be regarded as connected as long as they can be connected in only one discrete velocity direction (the covered angular range is 0°). As shown in (a) of Figure 3 , lattice point is marked as connectable in direction , and the adjacent lattice point in the opposite direction is also marked as connectable, then these two lattice points are regarded as connected and belong to the same connected domain; When extended to the three-dimensional D3Q19 lattice configuration ( Figure 2 (b) in it), if lattice point is marked as connectable in direction , and the adjacent lattice point in the opposite direction If they are also marked as connectable above, then these two lattice points are regarded as connected. (2) Connectivity 1: Two lattice points are connectable in all directions within a 45° range in a certain discrete velocity direction (the covered angular range is 45°). As shown in Figure 3 (b) in the lattice point in the direction and the directions within its 45° included angle range are all marked as connectable, and the adjacent lattice points in the direction and the directions within its 45° range are all marked as connectable, then the lattice points , are regarded as connected and belong to the same connected domain; when extended to the three-dimensional D3Q19 lattice configuration ( Figure 2 (b) in if the lattice point is marked as connectable in the direction and the directions within its 45° range are all marked as connectable, and the adjacent lattice points of this point in the direction and the directions within its 45° range are all marked as connectable, then the lattice points , are regarded as connected. (3) Connectivity 2: Two lattice points are connectable in all directions within a 90° range in a certain discrete velocity direction (the covered angular range is 90°). As shown in Figure 3 (c) in the lattice point in the direction and the directions within its 90° included angle range are all marked as connectable, and the adjacent lattice points in the direction and the directions within its 45° range are all marked as connectable, then the lattice points , are regarded as connected and belong to the same connected domain; similarly, when extended to the three-dimensional D3Q19 lattice configuration ( Figure 2 (b) in the lattice point in the direction and the directions within its 90° range are all marked as connectable, and the adjacent lattice points of this point in the direction and the directions within its 90° range are all marked as connectable, then the lattice points , Connected.
[0054] For a point on the Cartesian grid lattice points Draw the discrete velocity directions of the lattice configuration, and specify that this point Along the discrete direction The nearest lattice point reached is Adjacent points of , for example, for the D2Q9 configuration, this point Has 8 adjacent points . For two adjacent points And , if there is no obstruction on their connecting line (for example, there is no geometric obstruction), then mark the points Of Direction, point Of Direction (that is The opposite direction of
[0055] Please refer to Figure 2 , Figure 2 Figure Figure 2 In (a) is the D2Q9 configuration in two-dimensional space, Figure 2 In (b) is the D3Q19 configuration in three-dimensional space. In the D2Q9 configuration, the central lattice point is marked as 0, and there are 8 adjacent lattice points around it, which are respectively marked as 1 to 8, representing the discrete velocities of particles in eight directions in two-dimensional space. These directions include horizontal, vertical, and two diagonal directions. The adjacent points in each direction are connected to the central point 0, indicating the possible migrations of particles in these directions. In the D3Q19 configuration, the central lattice point is also marked as 0, and there are 18 adjacent lattice points around it, which are respectively marked as 1 to 18, representing the discrete velocities of particles in 19 directions in three-dimensional space, including 6 orthogonal directions (parallel to the coordinate axes), 12 oblique directions (parallel to the coordinate plane diagonals), and the central point itself (indicating that the particle remains stationary). These discrete velocity directions define the connection relationships between lattice points and are the basis for judging connectivity when simulating fluid behavior.
[0056] Please refer to Figure 3 , Figure 3This is a schematic diagram of the connectivity requirements for adjacent points under three connectivity degrees provided by the first embodiment of the connectivity domain division method supporting multiple connectivity degrees based on the LBM discrete velocity model in this application, corresponding to connectivity degree 0, connectivity degree 1, and connectivity degree 2 respectively. In the case of connectivity degree 0, the two points marked as A and B in the figure are only connected in one straight line direction (as shown in (a) of Figure 3 ), that is, they are connected through the arrows in one direction, indicating that there is no obstruction between adjacent points in a single direction, and thus can be regarded as connected. In the case of connectivity degree 1, points A and B need to be marked as connectable in all discrete velocity directions within the range of 45° in a certain discrete velocity direction (as shown in (b) of Figure 3 ), which means that the two points need to be connected within a wider angular range to meet stricter connectivity conditions. In connectivity degree 2, points A and B need to be marked as connectable in all discrete velocity directions within the range of 90° in a certain discrete velocity direction (as shown in (c) of Figure 3 ), which is the strictest connectivity condition, requiring that the two points can be connected in almost all opposite directions. These schematic diagrams illustrate that as the connectivity degree increases, the requirements for the connectivity between adjacent points also increase, so as to adapt to three-dimensional models with different geometric qualities and achieve accurate division of the connectivity domain.
[0057] Please refer to Figure 4 , Figure 4 This is a schematic diagram of geometric crack dredging and isolation under different connectivity degrees provided by the first embodiment of the connectivity domain division method supporting multiple connectivity degrees based on the LBM discrete velocity model in this application. In the case of connectivity degree 1 ( Figure 4 (a)), based on the connectivity judgment of the D2Q9 lattice configuration, since , two points are respectively connectable in the direction and its two adjacent directions within the range of 45°, and the direction and its two adjacent directions within the range of 45°, it is determined that , two points are connected, and the connected path is indicated by a red arrow in the figure, indicating that under the lower connectivity requirements, the existence of cracks allows the grid points inside and outside the vehicle to be connected through the cracks, resulting in unsuccessful division of the connectivity domain inside and outside the vehicle, which may increase the computational overhead. In the case of connectivity degree 2 ( Figure 4 (b)), based on the connectivity judgment of the D2Q9 lattice configuration, , The two points do not meet the condition that the velocity directions within the relative 90° range can be connected. Therefore, it is determined that these two points are not connected, and thus the points within this region cannot be connected through this geometric gap. The region is divided into two connected domains with blue circular points and green diamond points, achieving the correct division of the grid points inside and outside the vehicle into different connected domains. This enables the selection of only the external grid points for the flow field numerical simulation during calculation, thereby eliminating unnecessary calculations for the internal grid points. This schematic diagram shows that by adjusting the connectivity, the result of the connected domain division can be effectively controlled to adapt to different engineering simulation requirements and improve the calculation efficiency and the accuracy of the results.
[0058] A fully connected point refers to a grid point that is marked as connectable in all discrete velocity directions (the discrete velocity directions are determined according to the lattice configuration used). Between any two adjacent fully connected points, the connectivity degrees 0, 1, and 2 must be satisfied simultaneously. Fully connected points have special significance in the search for connected domains because they can quickly perform connected domain division through Breadth-First Search (BFS).
[0059] A non-fully connected point refers to a grid point that is not connectable in at least one discrete velocity direction. Non-fully connected points require more complex connectivity judgments in the search for connected domains because they may be located on the boundary of the connected domain or in an internally unconnected region.
[0060] Please refer to Figure 5 , Figure 5 This is a schematic diagram of fully connected points and non-fully connected points provided for the first embodiment of the connected domain division method supporting multiple connectivity degrees based on the LBM discrete velocity model of this application. This figure shows the roles of fully connected points and non-fully connected points in the connected domain division. Figure 5 In (a) of Figure 5 , the connected domains 0 and 1 are composed of fully connected points. These fully connected points satisfy the connectivity conditions in all discrete velocity directions. Therefore, the connected domain division can be quickly performed through breadth-first search to obtain a preliminary connected domain result. Due to their high connectivity, fully connected points can ensure the consistency within the connected domain, thereby quickly determining the boundary of the connected domain during the search process.
[0061] Under the definition of connectivity 2, when using the D3Q19 lattice configuration to evaluate the connectivity between two lattice points, it is necessary to check the connection relationships in 34 directions, which will lead to low efficiency in practical applications. To solve this problem, this application proposes a pre-search technology for the connected domain of fully connected points to improve the search efficiency. A fully connected point refers to a lattice point that satisfies the connectivity condition in all discrete velocity directions. According to the definition of connectivity, any two adjacent fully connected points must simultaneously meet the requirements of connectivity 0, 1, and 2. Before performing any connectivity search task, this application will pre-identify and mark all fully connected points, and then perform a breadth-first search on these fully connected points to conduct a preliminary division of the connected domain with connectivity 0. Figure 5 It shows that in the actual production environment, most lattice points are fully connected points, which means that they dominate in the connected domain. Since the search complexity of the connected domain of fully connected points is proportional to the number of lattice points, the higher the proportion of fully connected points in the grid, the less the search efficiency of the connected domain is affected by the change in connectivity. This technical feature ensures that this method can achieve high-efficiency connected domain search in most production scenarios, thus optimizing the entire connected domain division process.
[0062] It can be understood that, first, select the lattice configuration according to the actual application scenario, and determine which discrete velocity directions there are according to the lattice configuration. Secondly, traverse all lattice points and check the connectivity of each lattice point in all discrete velocity directions. If a lattice point satisfies the connectivity condition in all relevant directions, it is marked as a fully connected point; otherwise, it is marked as a non-fully connected point. Finally, through this classification, it can quickly distinguish which lattice points are connected in all directions (fully connected points) and which lattice points have non-connected directions (non-fully connected points), thus providing a basis for subsequent connected domain search, improving the search efficiency and ensuring the flexibility and robustness of the connected domain division.
[0063] Step S20, number the connected domains of the fully connected points and the non-fully connected points by the breadth-first search method, save the numbered lattice points and the corresponding connected domain numbers to the lattice point connected domain number recording system, and save the merging relationships between different connected domains to the connected domain number system.
[0064] It should be noted that BFS (Breadth-First Search) is an algorithm for graph traversal. It starts from a starting node and traverses all nodes in the graph layer by layer. In this embodiment, the breadth-first search method is used for the search and division of connected components. The connected component number has two interpretations, a verb interpretation and a noun interpretation: (1) Verb interpretation: It refers to the process of assigning a unique number to each connected component during the search of connected components. This number is used to distinguish different connected components and record the connected component to which each grid point belongs. (2) Noun interpretation: It refers to the unique identifier assigned to each connected component. In the data structure, the connected component number is used to record and manage the information of connected components.
[0065] The grid point connected component number recording system (also known as the data structure ) is a structure that stores grid point information and the corresponding connected component numbers, and can implement the function of quickly finding the corresponding connected component number through grid point coordinates.
[0066] The merging relationship means that during the search of connected components, two grid points that originally belonged to different connected components are found to be connected, so these two connected components need to be merged into one connected component. Specifically: during the breadth-first search, if a grid point is found to be connected to another grid point that has been marked as a different connected component, the merging relationship between these two connected components needs to be recorded. The recording of the merging relationship is used for subsequent update of the connected component numbers to ensure that all connected grid points ultimately belong to the same connected component.
[0067] The connected component number system (also known as the data structure ) is a data structure used to manage and update connected component numbers. It records the merging relationships between connected components and uniformly updates the connected component numbers after the search ends. During the search of connected components, whenever it is found that two connected components need to be merged, the data structure will record this merging relationship.
[0068] It can be understood that first, the breadth-first search method is used to divide the fully connected points and non-fully connected points into connected components. Starting from an unmarked grid point, it is used as the starting point and added to the queue, and a temporary connected component number is assigned to it. Then, grid points are taken out of the queue in turn, and the connectivity of all its adjacent grid points is checked. If the adjacent grid point meets the connectivity condition and is not marked, the adjacent grid point is marked as part of the current connected component and added to the queue, and at the same time, the coordinates and connected component number of this grid point are recorded in the grid point connected component number recording system. During the search, if it is found that a grid point has been marked as part of another connected component, the merging relationship between these two connected components is recorded and the merging relationship is saved in the connected component number system.
[0069] As an example, the steps of numbering the connected components of the fully connected points by the breadth-first search method, saving the numbered lattice points and the corresponding connected component numbers to the lattice point connected component number recording system, and saving the merging relationships between different connected components to the connected component numbering system include: initializing a fully connected search queue and a connected component number counter, where the connected component number counter records the first current connected component number; selecting a point that has not been recorded in the lattice point connected component number recording system from the fully connected points as the first starting point, and adding the first starting point to the fully connected search queue; recording the coordinates of the first starting point and the first current connected component number in the lattice point connected component number recording system; performing a breadth-first search on the fully connected search queue, and during the search process, recording the lattice points and the corresponding connected component numbers to the lattice point connected component number recording system, and recording the merging relationships between the connected components to the connected component numbering system; incrementing the first current connected component number in the connected component number counter; returning to the step of selecting a point that has not been recorded in the lattice point connected component number recording system from the fully connected points until all points in the fully connected points have been recorded in the lattice point connected component number recording system.
[0070] The fully connected search queue is a data structure for breadth-first search, used to store the fully connected points to be processed. During the connected component search process, each point in the queue is taken out in turn, and the connectivity of its adjacent points is checked. If the adjacent points meet the connectivity conditions and have not been marked, they are added to the queue. This queue ensures that the search process proceeds in a hierarchical order, enabling efficient traversal of all connected lattice points.
[0071] The connected component number counter is a counter used to record the current connected component number. It is dynamically updated during the search process, assigning a unique number to each newly discovered connected component for subsequent connected component management and merging operations. During the fully connected point search phase, the connected component number counter records the first current connected component number, used to distinguish different fully connected point connected components.
[0072] The first current connected component number refers to the number assigned to a newly discovered connected component during the full connection point search phase. It is the value of the connected component number counter during the full connection point search phase. Each time a new connected component is discovered, the connected component number counter is incremented, thereby assigning a unique number to the new connected component. This number is used to record the connected component to which each grid point belongs in the grid point connected component number recording system. The first starting point refers to the first point selected from the full connection points that has not been recorded in the grid point connected component number recording system during the full connection point search phase. This point serves as the starting point for breadth-first search and is used to trigger the search for a new connected component. The purpose of selecting the first starting point is to ensure that all unmarked full connection points can be traversed, thereby completing the division of the connected components of all full connection points. Coordinates refer to the position information of a grid point in space. In three-dimensional space, the coordinates of each grid point are usually represented by three components (x, y, z). In the grid point connected component number recording system, the coordinates of each grid point are recorded to facilitate subsequent quick query and update of the connected component information of the grid point. Coordinates are the unique identifier of a grid point, ensuring that each grid point can be accurately identified and operated in the system.
[0073] First, initialize an empty full connection search queue (also known as the search queue ), and a connected component number counter, and set the initial value of the connected component number counter to 1. This value is called the first current connected component number and is used to identify the connected components of the full connection points. This is done to assign a unique number to each newly discovered connected component, ensuring the distinction between connected components and the convenience of subsequent management. Second, traverse the set of full connection points to find a point that has not been recorded in the grid point connected component number recording system and use it as the first starting point. Selecting an unrecorded point is to ensure that each connected component can be completely searched without omission. Add the first starting point to the full connection search queue and record the coordinates and the first current connected component number of this point in the grid point connected component number recording system. This step is to mark the connected component to which the starting point belongs and provide basic information for subsequent searches.
[0074] Then, perform a breadth-first search on the full connection search queue. Take a point from the queue and check the connectivity of all its adjacent points. If an adjacent point is not recorded and meets the connectivity condition, add the adjacent point to the queue and record the coordinates and the connected component number of this point in the grid point connected component number recording system. This step is to gradually expand the current connected component and ensure that all connected points are correctly marked. If it is found during the search that an adjacent point already belongs to another connected component, record the merging relationship between these two connected components in the connected component number system. This step is to handle the cross situation between connected components and ensure the accuracy of the final connected component division.
[0075] Finally, when the fully connected search queue is empty, the search for the current connected domain is complete. At this point, the first current connected domain number in the connected domain number counter is incremented to prepare for the search for the next connected domain. The process then returns to the first starting point selection step and continues to search for the next unrecorded fully connected point. The search process repeats until all fully connected points are recorded by the grid connected domain number recording system. This ensures that all fully connected points are correctly divided into different connected domains, ultimately completing the connected domain division for all fully connected points.
[0076] Please refer to Figure 6 , Figure 6 This is a schematic diagram of the connected domain search process for fully connected points in the first embodiment of the method for connecting domains supporting multiple connectivity based on the LBM discrete velocity model. This diagram describes in detail how to divide the connected domains of fully connected points using the breadth-first search algorithm. The process starts with initializing the fully connected point set. And traversal sequence number d=0 starts, all connection points Added to the breadth-first search queue In. Algorithm check queue If it is 0, the search ends; if it is not 0, the first grid point in the queue is taken out and remove it from the queue. Next, check Is it already in the data structure If not, then Record and d, then check all Adjacent grid points For each adjacent point, if belong and is not marked, then Mark and d, and Join the search queue If Already in If different numbers d' are marked in the data structure, it is necessary to subsequently add d and d' in the data structure to reflect that the connected domains represented by these two numbers are actually connected. This process continues until the search queue is empty, at this time all fully connected points are correctly divided into the corresponding connected domains, thus completing the efficient search of the connected domains.
[0077] As an example, the steps of performing a breadth - first search on the fully - connected search queue and recording the lattice points and the corresponding connected - domain numbers into the lattice - point connected - domain number recording system, and recording the merging relationships between the connected domains into the connected - domain number system include: popping a point from the fully - connected search queue, denoted as the first current point; traversing the first adjacent points of the first current point in all discrete velocity directions; when the first adjacent point is a fully - connected point and has not been recorded by the lattice - point connected - domain number recording system, adding the first adjacent point to the fully - connected search queue, and recording the coordinates of the first adjacent point and the first current connected - domain number in the lattice - point connected - domain number recording system; when the first adjacent point has been recorded by the lattice - point connected - domain number recording system and the connected - domain number corresponding to the first adjacent point is a different connected - domain number, recording the first current connected - domain number and the different connected - domain number as the merging relationship between the connected domains into the connected - domain number system, where the different connected - domain number refers to a connected - domain number other than the first current connected - domain number; returning to the step of popping a point from the fully - connected search queue, denoted as the first current point, until the fully - connected search queue is empty.
[0078] The first current point refers to the point currently being processed that is popped from the fully - connected search queue during the breadth - first search. It is the starting point of the current search and is used to trigger the connectivity check of adjacent points. Each time a point is popped from the queue, this point becomes the first current point, and its role is to serve as the center point of the search for checking the connectivity of all its adjacent points.
[0079] The first adjacent points refer to the adjacent points of the first current point in all discrete velocity directions during the breadth - first search. These adjacent points are the direct neighbors of the current point and are used to determine whether they are connected to the current point. Specifically: in three - dimensional space, according to the discrete velocity model (such as D3Q19 or D3Q27), each lattice point has multiple discrete velocity directions, and the adjacent points in each direction are the first adjacent points. The connectivity check of the first adjacent points is the core step of connected - domain division. By checking whether these points meet the connectivity conditions, it can be determined whether they belong to the same connected domain.
[0080] The different connected - domain number refers to a connected - domain number other than the currently - being - processed connected - domain number (the first current connected - domain number) in the lattice - point connected - domain number recording system. Specifically: when checking a first adjacent point, if the point has been recorded in the lattice - point connected - domain number recording system and its corresponding connected - domain number is different from the first current connected - domain number, then this number is called the different connected - domain number. This situation indicates that there is an intersection or connection relationship between the current connected domain and other connected domains, and this merging relationship needs to be recorded for subsequent unified update of the connected domains.
[0081] First, pop a point from the fully connected search queue and mark it as the first current point. This point is the central point of the current search and is used to trigger the connectivity check of adjacent points. Then, traverse the first adjacent points of the first current point in all discrete velocity directions. These adjacent points are the direct neighbors of the current point and are used to determine whether they are connected to the current point. For each first adjacent point, check whether it is a fully connected point and has not been recorded by the grid connectivity domain number recording system. If so, it means that the adjacent point has not been assigned to any connectivity domain yet. Therefore, add it to the fully connected search queue and record the coordinates of this point and the current connectivity domain number in the grid connectivity domain number recording system, which can ensure that the subsequent search can continue to expand from this point. If the first adjacent point has already been recorded in the grid connectivity domain number recording system and its corresponding connectivity domain number is different from other connectivity domain numbers, it means that the adjacent point belongs to another connectivity domain. At this time, record the current connectivity domain number and other connectivity domain numbers as a merging relationship in the connectivity domain number system for subsequent unified update of the connectivity domains. Finally, return to the step of popping a point from the fully connected search queue and continue to process the next point in the queue until the fully connected search queue is empty, which indicates that the search for the current connectivity domain has been completed and all connected points have been correctly marked and recorded.
[0082] As an example, the steps of numbering the connected components of the non-fully connected points by the breadth-first search method, saving the numbered grid points and the corresponding connected component numbers to the grid point connected component number recording system, and saving the merging relationships between different connected components to the connected component numbering system include: determining the connectivity degree according to the connectivity requirement; initializing the non-fully connected search queue, and using the connected component number in the connected component number counter after the fully connected point search is completed as the second current connected component number; selecting a point that has not been recorded by the grid point connected component number recording system from the non-fully connected points as the second starting point; traversing the second adjacent points of the second starting point in all discrete velocity directions; when all the second adjacent points and the second starting point do not meet the connectivity condition of the connectivity degree, skipping the second starting point and returning to the step of selecting a point that has not been recorded by the grid point connected component number recording system from the non-fully connected points as the second starting point; when at least one of the second adjacent points and the second starting point meets the connectivity condition of the connectivity degree, adding the second starting point to the non-fully connected search queue; recording the coordinates of the second starting point and the second current connected component number in the grid point connected component number recording system; performing a breadth-first search on the non-fully connected search queue, and during the search, recording the grid points and the corresponding connected component numbers to the search grid point connected component number recording system, and recording the merging relationships between the connected components to the connected component numbering system; incrementing the second current connected component number in the connected component number counter; returning to the step of selecting a point that has not been recorded by the grid point connected component number recording system from the non-fully connected points as the second starting point until all points in the non-fully connected points have been recorded by the grid point connected component number recording system.
[0083] The connectivity requirement refers to the requirements for the flexibility and robustness of the connected component division in a three-dimensional geometric model according to the actual application scenario and model quality. Specifically: (1) Flexibility: Geometric models of different qualities require different connectivity constraints. The higher the geometric quality, the weaker the corresponding connectivity constraints required (the smaller the connectivity degree, the weaker the constraint); the lower the geometric quality, the stronger the connectivity constraints. For example, a high-precision watertight geometric model may require a lower connectivity degree (allowing connectivity through small cracks), while a low-quality "dirty" geometric model (such as 3D scan data) requires a higher connectivity degree (avoiding the influence of cracks). (2) Robustness: The connected component division needs to be able to handle defects such as cracks and breakages in the geometric model, ensuring that the division result conforms to the intuitively geometric connected regions. (3) Application scenario: For example, in automotive simulation, the division of the in-vehicle and out-of-vehicle meshes needs to select an appropriate connectivity degree according to the quality of the geometric model and the simulation requirements to ensure the accuracy and efficiency of the calculation.
[0084] The non-fully connected search queue is a data structure for breadth-first search, specifically used to handle the division of connected domains of non-fully connected points. Similar to fully connected points, non-fully connected points also need to determine their belonging connected domains through breadth-first search. The non-fully connected search queue is used to store non-fully connected points to be processed, ensuring that the search process can proceed in a hierarchical order, thereby efficiently traversing all connected non-fully connected points.
[0085] The second current connected domain number refers to the number assigned to the newly discovered connected domain during the non-fully connected point search phase. It is the value of the connected domain number counter during the non-fully connected point search phase. Each time a new connected domain is discovered, the connected domain number counter increments, thereby assigning a unique number to the new connected domain. This number is used to record the connected domain to which each lattice point belongs in the lattice point connected domain number recording system, ensuring that each connected domain has a unique identifier.
[0086] The second starting point refers to the first point selected from the set of non-fully connected points that has not been recorded by the lattice point connected domain number recording system during the non-fully connected point search phase. This point serves as the starting point for breadth-first search to trigger the search for a new connected domain. Selecting an unrecorded point is to ensure that all unmarked non-fully connected points can be traversed, thereby completing the division of the connected domains of all non-fully connected points.
[0087] The second adjacent points refer to the adjacent points of the current point (the second starting point or the point in the queue) in all discrete velocity directions during the breadth-first search process. These adjacent points are the direct neighbors of the current point and are used to determine whether they are connected to the current point. Specifically: in three-dimensional space, according to the discrete velocity model (such as D3Q19 or D3Q27), each lattice point has multiple discrete velocity directions, and the adjacent points in each direction are the second adjacent points. The connectivity check of the second adjacent points is the core step of the connected domain division. By checking whether these points meet the connectivity conditions, it can be determined whether they belong to the same connected domain.
[0088] The connectivity condition refers to the criterion for judging whether two lattice points are connected under a given connectivity. Specifically: according to the definition of connectivity, the connectivity conditions include single-direction connectable and multi-direction connectable. For example, at connectivity 1, two lattice points are connectable in all directions within a 45° range in a certain discrete velocity direction. The judgment of the connectivity condition is based on the connection marking of the lattice points in the discrete velocity direction, ensuring that only lattice points that meet the connectivity requirements are considered connected.
[0089] First, initialize an empty non-fully connected search queue (also called the search queue) ), and use the connected component number in the connected component number counter after the full connection point search is completed as the second current connected component number. This step is to ensure that the connected component numbers of non-full connection points start after the numbers of full connection points, avoiding number conflicts. Then, select a point from the non-full connection point set that has not been recorded by the lattice connected component number recording system as the second starting point. This step is to find an unprocessed non-full connection point as the starting point for the current connected component search.
[0090] Then, traverse the second adjacent points of the second starting point in all discrete velocity directions and check whether these adjacent points satisfy the connection condition with the second starting point. If all second adjacent points do not satisfy the connection condition, skip this second starting point and return to the step of selecting a new second starting point. This step is to avoid dealing with isolated points and ensure that only points connected to adjacent points enter the search queue. If at least one second adjacent point satisfies the connection condition with the second starting point, add the second starting point to the non-full connection search queue and record the coordinates of this point and the second current connected component number in the lattice connected component number recording system. This step is to mark the connected component to which the current point belongs and add it to the search queue to expand the search.
[0091] Next, perform a breadth-first search on the non-full connection search queue. Take a point from the queue and check the connectivity of all its adjacent points. If an adjacent point satisfies the connection condition and has not been recorded, add it to the queue and record the coordinates of this point and the connected component number in the lattice connected component number recording system. If the adjacent point has been recorded and belongs to another connected component, record the merging relationship between these two connected components in the connected component number system. This step is to gradually expand the current connected component and ensure that all connected points are correctly marked. When the non-full connection search queue is empty, it means that the search for the current connected component is completed. At this time, increment the second current connected component number in the connected component number counter to prepare for the search of the next connected component.
[0092] Finally, return to the step of selecting a new second starting point and continue to process the next unrecorded non-full connection point until all non-full connection points are recorded by the lattice connected component number recording system. This step ensures that all non-full connection points are correctly divided into different connected components, completing the division of the connected components of all non-full connection points.
[0093] Please refer to Figure 7 , Figure 7 FIG. is a schematic diagram of the connected component search process for non-full connection points provided in the first embodiment of the connected component division method supporting multiple connectivity based on the LBM discrete velocity model of this application. This figure details how to divide the connected components of non-full connection points. The process starts from initializing the non-full connection point set Starting from traversal sequence number d = 0, check if d is greater than the number of non-fully connected points. If so, end the search; otherwise, select a non-fully connected point , and determine if this point can be connected in at least one grid direction. If so, add it to the breadth-first search queue . Then, perform breadth-first search and check the queue to see if it is empty. If not, take out the first grid point in the queue and remove it from the queue. Subsequently, check if it has been marked in the data structure . If not, record in along with d, and check all the grid points adjacent to . For each adjacent point, if belongs to the fully connected point set and has not been marked, then mark in along with d, and add to the search queue . If has been marked with a different number d* in , then later merge d and d* in the data structure to reflect that the connected components represented by these two numbers are actually connected. This process continues until the search queue is empty. At this time, all non-fully connected points have been correctly divided into the corresponding connected components, and the efficient search for connected components is completed.
[0094] As an example, the steps of performing a breadth-first search on the non-fully connected search queue and recording the lattice points and the corresponding connected domain numbers into the search lattice point connected domain number recording system, and recording the merging relationship between the connected domains into the connected domain number system include: popping a point from the non-fully connected search queue, denoted as the second current point; traversing the third adjacent points of the second current point in all discrete velocity directions; when the third adjacent point and the second current point in the currently traversed discrete velocity direction satisfy the connectivity condition of the connectivity degree and the third adjacent point has not been recorded by the lattice point connected domain number recording system, recording the third adjacent point and the second current connected domain number in the lattice point connected domain number recording system, and adding the third adjacent point to the non-fully connected search queue; when the third adjacent point and the second current point in the currently traversed discrete velocity direction satisfy the connectivity condition of the connectivity degree and the third adjacent point has been recorded by the lattice point connected domain number recording system, recording the connected domain number corresponding to the third adjacent point and the second current connected domain number as a merging relationship into the connected domain number system; returning to the step of popping a point from the non-fully connected search queue, denoted as the second current point, until the non-fully connected search queue is empty.
[0095] The second current point refers to the currently processed point popped from the non-fully connected search queue during the breadth-first search of non-fully connected points. It is the central point of the current search and is used to trigger the connectivity check of adjacent points. Each time a point is popped from the queue, this point becomes the second current point. Its role is to serve as the starting point of the search and is used to check the connectivity of all its adjacent points.
[0096] The third adjacent point refers to the adjacent points of the second current point in all discrete velocity directions during the breadth-first search. These adjacent points are the direct neighbors of the second current point and are used to determine whether they are connected to the second current point.
[0097] First, pop a point from the non-fully connected search queue, denoted as the second current point. This point is the central point of the current search and is used to trigger the connectivity check of adjacent points. Second, traverse the third adjacent points of the second current point in all discrete velocity directions. These adjacent points are the direct neighbors of the second current point and are used to determine whether they are connected to the second current point.
[0098] Then, for each third adjacent point, check whether it meets the connectivity condition. If the third adjacent point has not been recorded by the lattice connected domain number recording system and meets the connectivity condition with the second current point, record the coordinates of the third adjacent point and the second current connected domain number in the lattice connected domain number recording system, and add the third adjacent point to the non-fully connected search queue. This step is to expand the current connected domain and ensure that all connected points are correctly marked. If the third adjacent point has already been recorded in the lattice connected domain number recording system and meets the connectivity condition with the second current point, record the corresponding connected domain number of the third adjacent point and the second current connected domain number as a merging relationship in the connected domain number system. This step is to handle the cross situation between connected domains and ensure the accuracy of the final connected domain division.
[0099] Finally, return to the step of popping a point from the non-fully connected search queue and continue to process the next point in the queue until the non-fully connected search queue is empty. This step ensures that all connected points are traversed and marked, and finally completes the division of the connected domains of non-fully connected points. In this way, the connected domains of non-fully connected points can be efficiently divided, and the merging relationship between connected domains can be processed to ensure the accuracy and consistency of the connected domain division.
[0100] Taking automotive simulation as an example, dirty geometry problems are widespread. Situations such as overlapping surfaces, non-manifold sets, low 3D scanning accuracy, loss of accuracy of complex geometric details, and loss of information during file format conversion are quite common. These problems bring many challenges to the construction and production of automotive models. Overlapping surfaces may be due to inaccurate alignment during the model splicing process or mistakes during Boolean operations, resulting in overlapping between surfaces. Non-manifold sets occur when the topological structure of the model changes, generating some non-standard geometric elements. For example, an edge is shared by multiple surfaces, making the geometric structure of the model complex. Low 3D scanning accuracy may be due to the accuracy limitations of the scanning device itself or the influence of environmental factors during the scanning process, resulting in errors in the scanned geometric data. The loss of accuracy of complex geometric details is caused by simplifying some details during the model design and manufacturing process to pursue efficiency or reduce costs, resulting in the loss of geometric information.
[0101] All of the above dirty geometry problems are likely to lead to the failure of the connected point set division, thereby affecting the production and simulation calculation of automotive models. Only an accurate and intuitive division of the connected point set can ensure the correct invocation of the solver for simulation calculation. Otherwise, problems such as geometric description distortion and calculation divergence are likely to occur. This application precisely proposes a technical solution for these difficulties. By optimizing the division of the connected point set, the dirty geometry problems are effectively solved, and the production quality and efficiency of automotive digital simulation are improved.
[0102] Please refer toFigure 8 , Figure 8 This is a schematic diagram of the cracks and the lattice points near the cracks on the car model provided by the first embodiment of the connected domain division method supporting multi-connectivity based on the LBM discrete velocity model of this application, which specifically includes three parts: Figure 8 Figure (a) in it shows the cracks existing in the front part of the car model, which may be caused by inaccurate model splicing or Boolean operation errors; Figure 8 Figure (b) in it further magnifies the crack area, more clearly showing the impact of the cracks on the details of the car model; Figure 8 Figure (c) in it shows the connectivity of the lattice points near the cracks. The lattice points near the cracks are marked with blue squares, and the red arrows indicate the impact of the cracks on the connected domain division. In the case of a connectivity of 0, the grid points inside and outside the car have the opportunity to be connected through the cracks, resulting in the unsuccessful division of the connected domains inside and outside the car, increasing the computational overhead. Without repairing the cracks, by selecting a higher connectivity (such as connectivity 2), the impact of the gaps can be effectively reduced when searching for the connected point set, so that the grid points inside and outside the car are divided into different connected domains. This schematic diagram illustrates that by adjusting the connectivity, the connected domain division of the dirty geometry model can be optimized, improving the production quality and efficiency of automotive digital simulation.
[0103] Please refer to Figure 9 , Figure 9 This is a comparison schematic diagram of the failure and success of the connected domain division inside and outside the car provided by the first embodiment of the connected domain division method supporting multi-connectivity based on the LBM discrete velocity model of this application, including Figure (a) and Figure (b). In Figure 9 Figure (a) in it, due to the grid at the crack position being small enough, or the selected connectivity being low (such as connectivity 0) during the connected domain division, the grid points inside and outside the car have the opportunity to be connected through the cracks, resulting in the unsuccessful division of the connected domains inside and outside the car. At this time, grids are also generated inside the car, increasing the computational overhead. While in Figure 9 Figure (b) in it, by selecting a higher connectivity (such as connectivity 2) without repairing the cracks, the impact of the gaps can be effectively reduced when searching for the connected point set, so that the grid points inside and outside the car are successfully divided into different connected domains. Therefore, when calculating, only the grid points outside the car can be selected for the flow field numerical simulation, thus saving the computational overhead of the grid points inside the car. This comparison schematic diagram emphasizes that by adjusting the connectivity, the connected domain division of the dirty geometry model can be optimized, thereby improving the production quality and efficiency of automotive digital simulation.
[0104] Step S30, merge the connected domain numbers in the connected domain numbering system to obtain the target connected domain number.
[0105] It should be noted that the target connected component number is the result of the connected component partitioning process recorded in the connected component numbering system, which reflects the final number of each connected component. During the connected component partitioning process, there may be merge relationships between multiple connected components. Therefore, it is necessary to uniformly merge the connected component numbers to ensure that the numbers of each connected component are unique and continuous.
[0106] It can be understood that after completing the connected component partitioning and searching, it is necessary to merge the connected component numbers in the connected component numbering system to obtain the final target connected component number. Specifically, first traverse the connected component numbering system to identify all recorded merge relationships, which indicate which connected components are connected and need to be merged. For each pair of connected component numbers to be merged, select one as the target connected component number and reassign all the lattice points of the other number to this target number. At the same time, update the connected component numbers of all relevant lattice points in the lattice point connected component number recording system to ensure that they point to the new target connected component number. In this way, gradually process all merge relationships to finally obtain a set of continuous and unique connected component numbers, which are the target connected component numbers.
[0107] As an example, the connected component numbering system includes an associative container and a sequential container. The associative container is used to record each connected component number and its corresponding serial number, and the sequential container is used to record the merged connected component numbers. The step of merging the connected component numbers in the connected component numbering system to obtain the target connected component number includes: obtaining the first connected component number and the second connected component number to be merged from the connected component numbering system; when the first connected component number and the second connected component number are different, checking whether the first connected component number and the second connected component number are recorded in the associative container; when both the first connected component number and the second connected component number are recorded in the associative container, obtaining the first serial number and the second serial number corresponding to the first connected component number and the second connected component number from the associative container; updating the data in the associative container and the sequential container according to the first serial number and the second serial number; when the data update is completed, merging the connected component number queue in the sequential container according to the connected component numbers in the associative container; after the merging is completed, returning to the step of obtaining the first connected component number and the second connected component number to be merged from the connected component numbering system until all connected component numbers in the connected component numbering system are traversed to obtain the target connected component number.
[0108] Associative container (also known as data structure ( ) is a data structure for recording the number of each connected component and its corresponding serial number. It is usually a set of key-value pairs, where the key is the connected component number and the value is the serial number corresponding to the connected component number. The main function of the associative container is to quickly search and update the connected component number and its serial number. For example, a hash table or dictionary can be used to implement the associative container. The sequential container (also known as a data structure ( ) is a data structure for recording the connected component numbers after merging. It is usually a set of queues, where each queue represents a connected component number after merging. The main function of the sequential container is to manage the connected component numbers after merging, ensuring that each connected component number has a unique queue to record its merging relationship. For example, a list or array can be used to implement the sequential container. The serial number refers to the unique identifier corresponding to each connected component number in the associative container. The serial number is used to quickly locate and manage the connected component numbers in the sequential container. The serial number is usually an integer, starting from 0 and increasing incrementally.
[0109] Connected Component Numbering System consists of two sub-data structures and (each element is a queue): is an associative container that pairs and records each number participating in the merge (the key in the associative container) and the corresponding serial number of that number in the structure (the value in the associative container); the structure is a sequential container with queues as units, recording the connected component numbers after merging. The number of queues inside represents the number of connected components after merging. The elements in each queue are the temporary connected component numbers recorded for the current connected component. Assuming a lattice point as the starting point for connected component search, carrying a temporary connected component serial number , perform the diffusion of the connected component serial numbers to other lattice points connected to it. When another lattice point carrying a temporary connected component serial number encounters a connected component merge with during the search process, records , records and respectively belong to which . After the connected component search for full-connection points and non-full-connection points is completed, according to the records of the serial number system, a global update of the connected component serial numbers can be performed on the data structure (lattice point connected component number marking system ) that stores the connected component information of all lattice points. This connected component serial number system effectively avoids modifying the global lattice point data structure during the search process, only maintaining the merging relationship between serial numbers, and effectively reducing the computational overhead.
[0110] In the process of merging connected component numbers, the first connected component number refers to the number that is first recognized or extracted among a pair of connected component numbers to be merged. It is the number of the first connected component involved in the current merging operation. In each merging operation, the system processes the merging relationships between pairs of connected component numbers in sequence, and the first connected component number is the former of this pair of numbers, used to identify a specific connected component to participate in the merging operation. Corresponding to the first connected component number, the second connected component number refers to the number that is recognized or extracted later among a pair of connected component numbers to be merged. It is the number of the second connected component involved in the current merging operation. In the merging operation, the system checks whether there is a merging relationship between the connected components represented by the "first connected component number" and the "second connected component number". If so, they are merged into a larger connected component, and the relevant number information is updated.
[0111] The first sequence number refers to the sequence number corresponding to the first connected component number in the associative container, which is used to quickly locate the first connected component number in the sequential container. The second sequence number refers to the sequence number corresponding to the second connected component number in the associative container, which is used to quickly locate the second connected component number in the sequential container. The connected component number queue refers to the queue corresponding to each sequence number in the sequential container. Each queue records the merged connected component numbers. For example, if two connected component numbers need to be merged, they will be recorded in the same queue, indicating that they belong to the same merged connected component.
[0112] First, extract a pair of the first connected component number and the second connected component number to be merged from the connected component number system. This is the starting point of the merging operation. Then, judge whether these two numbers are different, because only connected components with different numbers need to be merged. If they are different, further check whether both of these two numbers exist in the associative container, because the associative container records all valid connected component numbers and their corresponding sequence numbers. If both numbers exist, obtain their respective first sequence number and second sequence number from the associative container. Then, according to these two sequence numbers, update the data in the associative container and the sequential container. This step is to reflect the merging relationship of the two connected components in the system. After the data update is completed, based on the connected component numbers in the associative container, perform a merging operation on the connected component number queues in the sequential container, that is, merge the two connected components into a larger connected component and update its number queue. After the merging is completed, obtain the next pair of numbers to be merged from the connected component number system again, and repeat the above process until all connected component numbers are traversed. Finally, all connected components that need to be merged are correctly processed, and continuous and unique connected component numbers, that is, the target connected component numbers, are obtained. This process ensures the accuracy and consistency of the connected component division, providing accurate connected component information for subsequent engineering simulations and analyses.
[0113] As an example, the step of updating the data in the associative container and the sequential container according to the first serial number and the second serial number includes: when the first serial number and the second serial number are different, traverse the elements in the queue with the second serial number in the sequential container, and update the serial number corresponding to the element in the associative container to the first serial number; insert all the elements in the queue with the second serial number into the queue with the first serial number in the sequential container; delete the queue with the second serial number from the sequential container; when the deletion is completed, traverse the associative container, and decrement all the serial numbers greater than the second serial number in descending order to complete the data update in the associative container and the sequential container.
[0114] In the connected component numbering system, the elements in the queue refer to the connected component numbers contained in the queue corresponding to a specific serial number in the sequential container. Specifically: The sequential container is a set of storage queues, each queue represents a merged set of connected component numbers, and the elements in each queue (i.e., the connected component numbers) represent the numbers of all lattice points belonging to the same connected component. For example, if the queue with serial number 2 in the sequential container contains the elements [5, 7, 9], this means that the connected component numbers 5, 7, and 9 belong to the same connected component after merging, and the serial number of this connected component is 2.
[0115] In the merging operation, when a connected component number needs to be merged into another connected component number, all the elements in one queue are moved to another queue. For example, if all the elements in the queue with serial number 2 need to be merged into the queue with serial number 1, then the elements [5, 7, 9] are inserted into the queue with serial number 1, thus achieving the merging of the two connected components.
[0116] Descending order means that in the sequential container, a subtraction operation is performed on all serial numbers greater than a specific serial number. In this embodiment, it is a subtraction operation by 1 to ensure the continuity and uniqueness of the serial numbers. Specifically: In the merging operation, when a queue (such as the queue with serial number 2) is deleted, all the queue serial numbers greater than this serial number need to be decremented by 1 to fill the gap caused by the deletion of the queue.
[0117] First, when it is found that the first serial number and the second serial number are different, the merging operation starts. The specific method is to traverse the queue with the second serial number in the sequential container, and check each connected component number in the queue one by one. For these elements, find their corresponding records in the associative container, and change their serial numbers from the second serial number to the first serial number. This is done to update the ownership of these connected component numbers in the associative container so that they all point to the same merged connected component.
[0118] Next, copy the entire set of connected component numbers in the queue with the second serial number to the queue with the first serial number. This step is to merge two connected components into a larger connected component in a sequential container. By merging all relevant numbers into the same queue, it is ensured that they belong to the same connected component after the merge. After the copying is completed, delete the queue with the second serial number from the sequential container because all its elements have been merged into the queue with the first serial number. Deleting it is to avoid reprocessing these already merged numbers in subsequent operations.
[0119] Finally, after deleting the queue with the second serial number, in order to maintain the continuity of the serial numbers, it is necessary to adjust the serial numbers in the associative container. The specific operation is to traverse the associative container, find all serial numbers greater than the second serial number, and decrement each of them by 1. The purpose of this is to fill the gap left by deleting the queue with the second serial number, ensure that the order of the serial numbers does not have jumps, and thus maintain the integrity and consistency of the entire connected component numbering system. Through this series of operations, the data in the associative container and the sequential container is updated, providing accurate numbering information for subsequent connected component partitioning.
[0120] As an example, the step of merging the connected component number queues in the sequential container according to the connected component numbers in the associative container when the data update is completed includes: when the data update is completed, the first connected component number is recorded in the associative container and the second connected component number is not recorded in the associative container, record the second connected component number into the connected component number queue where the first connected component number is located; when the second connected component number is recorded in the associative container and the first connected component number is not recorded in the associative container, record the first connected component number into the connected component number queue where the second connected component number is located; when neither the first connected component number nor the second connected component number is recorded in the associative container, use the number of connected components in the sequential container as the new connected component serial number; record the first connected component number, the second connected component number, and the new connected component serial number in the associative container; add a new queue containing the first connected component number and the second connected component number to the sequential container.
[0121] The new connected component serial number refers to a brand-new serial number assigned to the newly merged connected component in the connected component numbering system. This serial number is generated based on the number of connected components in the current sequential container, ensuring that each connected component has a unique identifier. The new queue refers to a new queue created in the sequential container for the newly merged connected component. This queue is used to store all the connected component numbers of the new connected component.
[0122] First, when the data update is completed and the first connected component number is recorded in the associative container but the second connected component number is not recorded, record the second connected component number into the connected component number queue where the first connected component number is located. This step is to merge the second connected component number into the connected component where the first connected component number is located. Second, when the second connected component number is recorded in the associative container but the first connected component number is not recorded, record the first connected component number into the connected component number queue where the second connected component number is located. This step is to merge the first connected component number into the connected component where the second connected component number is located.
[0123] Then, when neither the first connected component number nor the second connected component number is recorded in the associative container, it means that the connected components represented by these two numbers are brand new and a new connected component serial number needs to be assigned. This new serial number is an integer corresponding to the number of connected components in the current sequential container. Next, record the first connected component number, the second connected component number, and the new connected component serial number in the associative container. This step is to establish a mapping relationship between the new connected component number and the new serial number in the associative container.
[0124] Finally, add a new queue containing the first connected component number and the second connected component number to the sequential container. The serial number of this new queue is the new connected component serial number, which is used to manage all the numbers of the newly merged connected component. Through this series of operations, it is ensured that all connected component numbers are correctly merged into the corresponding connected components, and each connected component has a unique serial number and queue, thus maintaining the integrity and consistency of the connected component number system.
[0125] Please refer to Figure 10 , Figure 10 FIG. and which is a schematic diagram of the connected component number merging operation process in the connected component number system provided by the first embodiment of the connected component division method supporting multiple connectivity degrees based on the LBM discrete velocity model in this application. The process starts from checking the two numbers to be merged. First, judge whether these two numbers are equal. If they are equal, the merging operation ends. If they are not equal, further check whether both of these two numbers are recorded in the data structure . If both are recorded in , obtain the corresponding serial numbers , of these two numbers from , and judge whether these two serial numbers are equal. If they are equal, the merging operation ends. If the serial numbers are not equal, initialize a counter c = 0, and then check whether the queue with serial number c in contains . If it does, add to the queue with serial number c, and in the data structure Add a record to , c}, and at the same time increase the value of the counter c. If the queue with sequence number c in does not contain , then directly increase the value of the counter c, and check whether c is greater than the number of queues. If so, end the merging operation; otherwise, continue with the merging. If there is only one number with a record in , add the other number to the corresponding queue in , and add a record to . If neither of the two numbers has a record in , add these two numbers as a new queue to , and add a new record to . During the merging process, if it is necessary to update the sequence number corresponding to a certain number in , or if it is necessary to insert or delete elements in
[0126] Show a simple example: After three separate merging operations on , , , finally two connected components are obtained. Please refer to Figure 11 , Figure 11 which is the schematic diagram of the results of the three connected component number merging operations provided by the first embodiment of the connected component partitioning method supporting multiple connectivity based on the LBM discrete velocity model in this application. When merging , records and , while records , and the merge count c is 0. Then, when merging [[ID=I50]] , records , , and , records and , and the merge count c is 1. Finally, when merging , records , , , and , records and , the combined count c is 1. Through these three merging operations, the numbering system successfully merges multiple connected components into larger connected components, ensuring the continuity and consistency of the connected component numbers, and providing accurate connected component information for subsequent engineering simulations and analyses.
[0127] Step S40: Update the connected component numbers of the lattice points in the lattice point connected component number recording system according to the target connected component numbers, and complete the connected component division.
[0128] It can be understood that, first, traverse the lattice point connected component number recording system, find the currently recorded connected component numbers of each lattice point, and replace them with the corresponding latest numbers in the target connected component numbers. This step ensures that the connected component numbers of all lattice points are consistent with the final connected component division result. Secondly, after the update, the entire connected component division process ends. At this time, each lattice point in the lattice point connected component number recording system accurately belongs to its corresponding connected component, realizing the connected component division of all lattice points. The finally obtained connected component division result can be used for subsequent engineering simulations and analyses, providing accurate geometric connectivity information for related applications.
[0129] This embodiment provides a connected component division method supporting multi-connectivity based on the LBM discrete velocity model. First, select the lattice configuration according to the actual application scenario, determine what the discrete velocity directions are according to the lattice configuration, and mark all lattice points as fully connected points or non-fully connected points according to the discrete velocity directions. This step ensures the flexibility and robustness of the connected component division, can adapt to geometric models of different qualities, and at the same time avoids the influence of geometric cracks and damages on the division result. Then, perform connected component numbering on the fully connected points and non-fully connected points through the breadth-first search method, save the numbered lattice points and the corresponding connected component numbers to the lattice point connected component number recording system, and save the merging relationship between different connected components to the connected component numbering system. This process utilizes the high efficiency of the breadth-first search to quickly traverse all connected lattice points, and at the same time ensures the accuracy of the connected component division by recording the merging relationship. Then, merge the connected component numbers in the connected component numbering system to obtain the target connected component numbers. This step ensures the continuity and uniqueness of all connected component numbers through the merging operation, avoids jumps and redundancies in the numbers, and thus ensures the integrity of the connected component division. Finally, update the connected component numbers of the lattice points in the lattice point connected component number recording system according to the target connected component numbers, and complete the connected component division. This step ensures that the connected component numbers of all lattice points are consistent with the final connected component division result, provides accurate connected component information for subsequent engineering simulations and analyses, and ensures the accuracy and integrity of the connected component division. Through this series of steps, this embodiment can efficiently and robustly divide connected components in three-dimensional geometric models of different qualities, meeting the requirements of complex engineering scenarios.
[0130] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar content as that in the above-mentioned first embodiment can be referred to the above introduction and will not be elaborated hereinafter. On this basis, please refer to Figure 12 , Figure 12 FIG. is a schematic flowchart of the second embodiment of the method for dividing a connected domain with multi-connectivity support based on the LBM discrete velocity model of the present application. The step S40 of the method for dividing a connected domain with multi-connectivity support based on the LBM discrete velocity model includes steps S41 to S43:
[0131] Step S41, traverse the non-full connection points, and merge the target connected domain numbers according to the three-dimensional connection relationship between the non-full connection points and the adjacent connected domains to obtain the first reference connected domain number.
[0132] It should be noted that the adjacent connected domains refer to the connected domains that are directly adjacent to a certain non-full connection point in three-dimensional space. Specifically: in a three-dimensional grid structure, each lattice point (non-full connection point) may be adjacent to multiple connected domains, and these adjacent connected domains are determined by checking the adjacent points of the non-full connection point in all discrete velocity directions. If the adjacent point belongs to a certain connected domain, then this connected domain is regarded as adjacent to the non-full connection point. The identification of adjacent connected domains is based on the discrete velocity direction and connection conditions of the lattice points to ensure that all possible connection relationships are considered in three-dimensional space.
[0133] The three-dimensional connection relationship refers to whether there is an actual and geometrically intuitive connection relationship between a non-full connection point and the surrounding adjacent connected domains in three-dimensional space. This connection relationship not only considers the direct connectivity between points but also the possible indirect connectivity in three-dimensional space. If a non-full connection point is directly connected to the lattice points of a certain connected domain in a certain discrete velocity direction, it is considered that there is a direct connectivity between the non-full connection point and this connected domain. Even if the non-full connection point is not directly connected in a certain direction, but if it can reach a certain connected domain through other paths (such as through multiple adjacent points), it is considered that there is an indirect connectivity. For example, at connectivity 1, if the non-full connection point is connected to the lattice points of a certain connected domain in all directions within a certain direction and its 45° range, it is considered that there is a three-dimensional connection. The judgment of three-dimensional connection also needs to conform to geometric intuition, that is, whether two connected domains are geometrically connected in three-dimensional space. For example, if two connected domains are connected by a thin channel or crack in geometry, it is considered that there is a three-dimensional connection.
[0134] The first reference connected domain number refers to the reference number obtained after merging the target connected domain numbers according to the three-dimensional connection relationship when dealing with non-fully connected points, and is used for subsequent connected domain division and processing. The purpose of the first reference connected domain number is to ensure that when dealing with non-fully connected points, the division result of the connected domain can reflect the actual connection relationship in the three-dimensional space, and avoid inaccurate connected domain division caused by the existence of non-fully connected points.
[0135] Please refer to Figure 13 , Figure 13 FIG. is a schematic comparison diagram of the actual search result and the expected search result of the connected domain with a connectivity of 2 provided by the second embodiment of the connected domain division method supporting multi-connectivity based on the LBM discrete velocity model of the present application. In the figure, the red dots represent the geometric internal connected domains, and these dots form a complete and continuous geometric structure in the three-dimensional space. The dots of different colors in the figure represent the geometric edge scattered connected domains. These dots are located at the edge of the geometric structure and are few in number, showing a scattered distribution characteristic. When the connectivity is 1 or 2, due to the characteristics of the connectivity judgment rule, there will be a situation where there are a large number of scattered connected domains at the geometric edge ( Figure 13 (a) in Figure 13 ), which does not conform to the intuitive expectation of geometric connectivity. In the expected search result ( Figure 13 (b) in
[0136] ), through the connected domain merging method based on the grid body connection, the scattered connected domains at the geometric edge can be smoothly merged into the geometric internal connected domains, which conforms to the actual situation of the geometric structure.
[0137] As an example, the step of traversing the non-fully connected points and merging the target connected domain numbers according to the three-dimensional connection relationship between the non-fully connected points and adjacent connected domains to obtain the first reference connected domain number includes: traversing the non-fully connected points and recording the connection relationships between each non-fully connected point and the surrounding adjacent connected domains; when the connection relationship is a three-dimensional connection relationship, recording the first connected domain corresponding to the connection relationship and the second connected domain corresponding to the connection relationship of the non-fully connected point; traversing all the connected directions of the non-fully connected points and recording the set of connected lattice points belonging to the first connected domain or the second connected domain in the connected direction; when the set of connected lattice points fuses the non-fully connected points to satisfy the grid body connection, merging the connected domain numbers corresponding to the first connected domain and the second connected domain in the target connected domain number to obtain the first reference connected domain number.
[0138] The connection relationship refers to the connectivity between the non-fully connected point and the surrounding adjacent connected domains, which describes whether the non-fully connected point is connected to the lattice points of a certain connected domain in a certain direction.
[0139] The first connected domain refers to the connected domain to which the non-fully connected point belongs. When traversing the non-fully connected points, each non-fully connected point itself belongs to a certain connected domain, and this connected domain is the first connected domain. The first connected domain is determined by the previous connected domain division step, which records the connected domain number to which the non-fully connected point currently belongs. The first connected domain is the starting point of the merging operation and is used to determine which other connected domains the non-fully connected point is connected to.
[0140] The second connected domain refers to the connected domain that has a three-dimensional connection relationship with the non-fully connected point. When checking the connection relationship between the non-fully connected point and the surrounding adjacent connected domains, if it is found that a certain adjacent connected domain is connected to the non-fully connected point through a three-dimensional connection relationship, then this connected domain is called the second connected domain. The second connected domain is the target of the merging operation and is used to determine the connected domain that needs to be merged with the first connected domain.
[0141] The set of connected lattice points refers to the set of all connected lattice points belonging to the first connected domain or the second connected domain in a certain connected direction. It includes all the lattice points connected to the first connected domain or the second connected domain through the non-fully connected point. These lattice points form a path in three-dimensional space, indicating the connection relationship between the two connected domains.
[0142] Mesh body connection means that in three-dimensional space, whether two connected domains connected by non-fully connected points can form a complete mesh. If the connected lattice point set combines non-fully connected points (that is, regarding these points as points in a set and as a whole), and can form a complete mesh structure (the formed mesh is geometrically closed, that is, there are no breakpoints or cracks), and can be merged into a connected whole (continuous geometric structure) geometrically, then it is considered that there is a mesh body connection between these two connected domains. This step is to ensure that in three-dimensional space, the merger of two connected domains is reasonable and conforms to geometric intuition.
[0143] First, check each non-fully connected point one by one to determine its connection relationship with the surrounding connected domains. If it is found that there is a three-dimensional connection relationship between a certain non-fully connected point and two connected domains, that is, these two connected domains are connected by this non-fully connected point in three-dimensional space, then record the first connected domain to which this non-fully connected point belongs, and the second connected domain connected to it. Then, check all the connected directions of this non-fully connected point in detail, and collect the connected lattice point sets belonging to the first connected domain or the second connected domain. These connected lattice point sets depict the connection path between the two connected domains. If these connected lattice point sets combined with the non-fully connected point can form a complete mesh structure, that is, these two connected domains form a continuous and closed geometric structure through these lattice points and non-fully connected points in three-dimensional space, then it is necessary to merge the numbers of the first connected domain and the second connected domain in the target connected domain numbers. After merging all the numbers in the target connected domain numbers that meet the above conditions, the new number set obtained is the first reference connected domain number. This process ensures the accuracy and integrity of the connected domain division in three-dimensional space, avoids the error of connected domain division caused by the existence of non-fully connected points, and provides more accurate connected domain information for subsequent engineering simulation and analysis.
[0144] Taking the automotive geometry as an example, when the connectivity is 2, after completing the search for the connected domains of fully connected points and non-fully connected points, the division of the connected points at the middle section position is as Figure 14 shown, Figure 14 This is a schematic diagram of the automotive geometry connected domain search result provided by the second embodiment of the connected domain division method supporting multiple connectivities based on the LBM discrete velocity model of this application, where the red points represent the connected domains inside the vehicle, and the black points represent the connected domains outside the vehicle. Figure 14 In (a) of Figure 14 it shows the connected domain division of the front part of the vehicle head. The red points are concentrated in the front area of the vehicle head, while the black points are distributed in the area outside the vehicle. Zoom in on the front frame area of the vehicle head, as shown in (b), (c), and (d) of Figure 1In (c) therein, it can be seen that there is an incomplete situation of the connected domain point set at the geometric edge position of the vehicle; after performing the volume connection and merging operation ( In (d) therein), the grid points of the connected domains inside and outside the vehicle can be basically seamlessly connected, and the inside and outside of the vehicle are still correctly divided into two connected domains according to the geometric shape. This schematic diagram shows that by performing the volume connection and merging operation, the problem of incomplete connected domain point set at the geometric edge position can be effectively solved, thereby improving the production quality and efficiency of vehicle digital simulation.
[0145] Step S42: Delete the numbers to be deleted in the first reference connected domain numbers to obtain second reference connected domain numbers, where the numbers to be deleted are the connected domain numbers corresponding to the connected domains with the number of grid points less than the preset grid point number threshold.
[0146] It should be noted that the numbers to be deleted refer to the connected domain numbers in the first reference connected domain numbers where the corresponding connected domain grid point numbers are less than the preset grid point number threshold. Specifically: In the process of connected domain division, each connected domain has a unique number, and these numbers are recorded in the target connected domain numbers in the connected domain number system; after the merging operation, the first reference connected domain numbers obtained may contain some connected domains with very few grid points, which may have no practical significance in actual applications and may even lead to computational instability; the numbers to be deleted are the connected domain numbers with the number of grid points less than the preset threshold and need to be deleted from the first reference connected domain numbers.
[0147] The second reference connected domain numbers refer to the new set of connected domain numbers obtained after deleting all the numbers to be deleted. The number of grid points refers to the total number of grid points contained in each connected domain. The number of grid points is an important index to measure the size of the connected domain, which reflects the complexity of the connected domain and its importance in actual applications. The preset grid point number threshold is a threshold used to judge whether the connected domain has practical significance. In this embodiment, the preset grid point number threshold is set to 5. This means that if the number of grid points of a connected domain is less than 5, it is considered that the connected domain has no practical significance in actual applications and may be a "scattered" connected domain. The setting of this threshold is based on the requirements and experience of actual applications, aiming to ensure that the final connected domain division result has practical significance and computational stability in subsequent engineering simulations and analyses.
[0148] It is understandable that, first, each connected component in the first reference connected component numbers is evaluated, and the number of lattice points contained in each connected component is counted. Then, according to a preset lattice point number threshold (for example, 5), the connected components with a lattice point number less than this threshold are filtered out, and the numbers corresponding to these connected components are the numbers to be deleted. Next, these numbers to be deleted are removed from the first reference connected component numbers, thereby obtaining a new set of connected component numbers, that is, the second reference connected component numbers. This process aims to remove the "scattered" connected components that may have no practical significance or cause computational instability in actual applications, ensuring that the final connected component division result has practical significance and computational stability, and providing more accurate connected component information for subsequent engineering simulations and analyses.
[0149] Step S43, update the target connected component numbers according to the second reference connected component numbers.
[0150] It is understandable that after completing the screening of the first reference connected component numbers and obtaining the second reference connected component numbers, it is necessary to update the target connected component numbers according to the second reference connected component numbers. Specifically, traverse all the connected component numbers in the target connected component numbers. For each number, check whether it exists in the second reference connected component numbers. If it exists, keep the number; if it does not exist, delete it from the target connected component numbers. This process ensures that only the connected component numbers that have practical significance after screening are included in the target connected component numbers, thereby improving the accuracy and practicality of the connected component division result.
[0151] As an example, after step S43, it further includes: marking the lattice points in the connected components corresponding to the second reference connected component numbers as valid connected component lattice points; traversing the adjacent lattice points in all connected directions of the valid connected component lattice points; when the adjacent lattice point is a valid connected component lattice point and the connected component number to which the valid connected component lattice point belongs is different from the connected component number to which the adjacent lattice point belongs, record the connected component boundary according to the valid connected component lattice point, the connected component number to which the valid connected component lattice point belongs, the connected direction between the valid connected component lattice point and the adjacent lattice point, and the connected component number to which the adjacent lattice point belongs; when the adjacent lattice point is not a valid connected component lattice point, record the degenerate point connected component boundary according to the valid connected component lattice point, the connected component number to which the valid connected component lattice point belongs, and the connected direction between the valid connected component lattice point and the adjacent lattice point.
[0152] Valid connected component lattice points refer to all the lattice points in the connected components corresponding to the second reference connected component numbers. These lattice points are filtered to ensure that the connected components to which they belong have a sufficient number of lattice points and meet the preset lattice point number threshold, so they are considered valid. The connected direction refers to the connection direction between lattice points in three-dimensional space.
[0153] The boundary of a connected domain refers to the dividing line between two different connected domains in three-dimensional space. Specifically: when the adjacent lattice points of a valid connected domain lattice point belong to another connected domain, the connection direction between these two lattice points defines the boundary of the connected domain; the boundary of the connected domain records the connection relationship between two different connected domains, which is very important for subsequent engineering simulations and analyses because it can help determine the interaction between different connected domains. For example, record the connected domain serial number of the valid connected domain lattice point as , and it is connected to the lattice point with the connected domain serial number in the connection direction . If is not equal to , then record the boundary of the connected domain {"starting connected domain serial number": , "starting lattice point": , "connection direction": , "ending connected domain serial number": }.
[0154] The boundary of the degenerate point connected domain refers to the boundary formed when the adjacent lattice points of a valid connected domain lattice point do not belong to any connected domain in three-dimensional space. Specifically: when the adjacent lattice point of a valid connected domain lattice point is not a valid connected domain lattice point, this adjacent lattice point is considered a degenerate point; the boundary of the degenerate point connected domain records the connection relationship between the valid connected domain lattice point and the degenerate point, which is very important for subsequent analyses and processing because it can help identify the boundary of the connected domain and possible defects. If is an invalid connected domain point, then record the boundary of the degenerate point connected domain: {"starting connected domain serial number": , "starting lattice point": , "connection direction": }.
[0155] First, mark all the lattice points in the connected domain corresponding to the second reference connected domain number as valid connected domain lattice points. This step is to clarify which lattice points are practically significant after screening. Then, traverse the adjacent lattice points in all connected directions of these valid connected domain lattice points and check their connectivity. If an adjacent lattice point is also a valid connected domain lattice point but belongs to a different connected domain number from the current lattice point, it means that two different connected domains meet here. Therefore, it is necessary to record the connected domain boundary, including information such as the involved lattice points, connected domain numbers, and connected directions. If the adjacent lattice point is not a valid connected domain lattice point, that is, it may belong to an invalid connected domain or has not been assigned to any connected domain, at this time, record the degenerate point connected domain boundary, also including relevant lattice points, connected domain numbers, and connected directions, etc. This process helps to accurately identify and record the boundaries between connected domains, as well as the boundaries between connected domains and non-connected regions, providing detailed geometric information for subsequent engineering simulations and analyses.
[0156] The time complexity of the connected domain search method in this embodiment is mainly determined by the lattice point connected domain search process. Denote the total number of lattice points as , the complexity of the full connection point search is , and the complexity of the non-full connection point search is , where is the number of connected directions to be traversed under different connectivity degrees. The search time is greatly affected by the quantity distribution of full connection points and non-full connection points. Suppose the proportion of the number of full connection points is , then the total connected domain search complexity is s . The time complexity of the connected domain boundary search is .
[0157] In this embodiment, first, by traversing all non-fully connected points, the three-dimensional connection relationship between these points and the surrounding adjacent connected domains is checked. When it is found that two different connected domains are connected through non-fully connected points, the target connected domain numbers of these two connected domains are merged to obtain the first reference connected domain number. This step ensures the accuracy and integrity of the connected domain division in three-dimensional space, avoids errors in the connected domain division caused by non-fully connected points, and improves the robustness of the connected domain division. Then, the connected domain numbers with the number of lattice points less than the preset threshold are deleted from the first reference connected domain number to obtain the second reference connected domain number. This step removes the "scattered" connected domains that may be meaningless in practical applications, improves the calculation efficiency, and ensures the reliability of the connected domain division result. Finally, the target connected domain number is updated according to the second reference connected domain number to ensure that the target connected domain number only contains the connected domain numbers that have been screened and have practical significance, thereby improving the consistency and accuracy of the connected domain division result and providing a reliable basis for subsequent engineering simulations and analyses. Through this series of steps, this embodiment can efficiently, accurately, and robustly complete the connected domain division to meet the requirements of complex engineering scenarios.
[0158] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the method for dividing connected domains with multiple connectivity supported by the LBM discrete velocity model of this application. Based on this technical concept, more forms of simple transformations are within the protection scope of this application.
[0159] This application also provides a device for dividing connected domains with multiple connectivity supported by the LBM discrete velocity model. Please refer to , the device for dividing connected domains with multiple connectivity supported by the LBM discrete velocity model includes:
[0160] The lattice point marking module 10 is used to mark all lattice points as fully connected points or non-fully connected points;
[0161] The connected domain numbering module 20 is used to number the connected domains of the fully connected points and the non-fully connected points by the breadth-first search method, save the numbered lattice points and the corresponding connected domain numbers to the lattice point connected domain number record system, and save the merging relationship between different connected domains to the connected domain number system;
[0162] The connected domain merging module 30 is used to merge the connected domain numbers in the connected domain number system to obtain the target connected domain number;
[0163] The number updating module 40 is used to update the connected domain numbers of the lattice points in the lattice point connected domain number record system according to the target connected domain number to complete the connected domain division.
[0164] The connectivity domain partitioning device based on the LBM discrete velocity model provided in this application adopts the method for partitioning connectivity domains with multi-connectivity degrees based on the LBM discrete velocity model in the above embodiments, and can solve the technical problem of how to efficiently and robustly partition connectivity domains in 3D geometric models of different qualities to meet the requirements of engineering simulations. Compared with the prior art, the beneficial effects of the connectivity domain partitioning device based on the LBM discrete velocity model provided in this application are the same as those of the method for partitioning connectivity domains with multi-connectivity degrees based on the LBM discrete velocity model provided in the above embodiments, and other technical features in the connectivity domain partitioning device based on the LBM discrete velocity model are the same as the features disclosed in the method of the above embodiments, which will not be elaborated here.
[0165] This application provides a connectivity domain partitioning device based on the LBM discrete velocity model with support for multi-connectivity degrees. The connectivity domain partitioning device based on the LBM discrete velocity model includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for partitioning connectivity domains with multi-connectivity degrees based on the LBM discrete velocity model in the first embodiment above.
[0166] Reference is made below to , which shows a schematic structural diagram of a connectivity domain partitioning device based on the LBM discrete velocity model suitable for implementing the embodiments of this application. The connectivity domain partitioning device based on the LBM discrete velocity model in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description: tablet computers), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The shown connectivity domain partitioning device based on the LBM discrete velocity model is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of this application.
[0167] As As shown, the connectivity domain partitioning device that supports multi-connectivity based on the LBM discrete velocity model may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in a ROM (Read Only Memory) 1002 or a program loaded from a storage device 1003 into a RAM (Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the connectivity domain partitioning device that supports multi-connectivity based on the LBM discrete velocity model are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the connectivity domain partitioning device that supports multi-connectivity based on the LBM discrete velocity model to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a connectivity domain partitioning device that supports multi-connectivity based on the LBM discrete velocity model with various systems, it should be understood that it is not required to implement or have all the shown systems. Instead, more or fewer systems may be implemented or had.
[0168] Particularly, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are executed.
[0169] The connectivity domain partitioning device based on the LBM discrete velocity model provided in this application adopts the connectivity domain partitioning method based on the LBM discrete velocity model in the above-mentioned embodiment, and can solve the technical problem of how to efficiently and robustly partition the connectivity domain in 3D geometric models of different qualities to meet the requirements of engineering simulations. Compared with the prior art, the beneficial effects of the connectivity domain partitioning device based on the LBM discrete velocity model provided in this application are the same as those of the connectivity domain partitioning method based on the LBM discrete velocity model provided in the above-mentioned embodiment, and other technical features in the connectivity domain partitioning device based on the LBM discrete velocity model are the same as the features disclosed in the method of the previous embodiment, and will not be elaborated here.
[0170] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware or a combination of them. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0171] As mentioned above, the above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0172] This application provides a computer-readable storage medium with computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the connectivity domain partitioning method based on the LBM discrete velocity model in the above-mentioned embodiment.
[0173] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0174] The above computer-readable storage medium can be included in a connected domain partitioning device that supports multi-connectivity based on the LBM discrete velocity model; or it can exist independently without being assembled into a connected domain partitioning device that supports multi-connectivity based on the LBM discrete velocity model.
[0175] The above computer-readable storage medium carries one or more programs. When the one or more programs are executed by a connected domain partitioning device that supports multi-connectivity based on the LBM discrete velocity model, the connected domain partitioning device that supports multi-connectivity based on the LBM discrete velocity model is caused to: mark all lattice points as fully connected points or non-fully connected points; perform connected domain numbering on the fully connected points and the non-fully connected points through a breadth-first search method, save the numbered lattice points and the corresponding connected domain numbers to a lattice point connected domain number recording system, and save the merging relationship between different connected domains to a connected domain numbering system; merge the connected domain numbers in the connected domain numbering system to obtain a target connected domain number; update the connected domain numbers of the lattice points in the lattice point connected domain number recording system according to the target connected domain number to complete the connected domain partitioning.
[0176] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0177] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0178] The modules described in the embodiments of this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation on the unit itself in some cases.
[0179] The readable storage medium provided by this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned connectivity domain division method supporting multi-connectivity based on the LBM discrete velocity model, and can solve the technical problem of how to efficiently and robustly divide connectivity domains in three-dimensional geometric models of different qualities to meet the requirements of engineering simulations. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the connectivity domain division method supporting multi-connectivity based on the LBM discrete velocity model provided by the above embodiments, and will not be elaborated here.
[0180] This application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it realizes the steps of the above-mentioned connectivity domain division method supporting multi-connectivity based on the LBM discrete velocity model.
[0181] The computer program product provided by this application can solve the technical problem of how to efficiently and robustly divide connectivity domains in three-dimensional geometric models of different qualities to meet the requirements of engineering simulations. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as those of the connectivity domain division method supporting multi-connectivity based on the LBM discrete velocity model provided by the above embodiments, and will not be elaborated here.
[0182] The above are only partial embodiments of this application, and do not limit the patent scope of this application. Any equivalent structural transformation made under the technical concept of this application by using the content of the specification and drawings of this application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of this application.
Claims
1. A method for partitioning connected domains supporting multiple connectivity degrees based on the LBM discrete velocity model, characterized in that: The method comprises: Marking all grid points in a three-dimensional geometric model to be divided into connected domains in an engineering simulation as fully connected points or non-fully connected points, wherein a fully connected point refers to a grid point that is marked as connectable in all discrete velocity directions, and a non-fully connected point refers to a grid point that is not connectable in at least one discrete velocity direction, wherein the discrete velocity direction is determined according to a grid configuration used in the simulation, wherein the three-dimensional geometric model is a car model in a car simulation, and the grid points refer to regular grid points into which the car model is divided, and each grid point represents a small area of the car model; Numbering the connected domains of the fully connected points and the non-fully connected points by a breadth-first search method, saving the numbered grid points and the corresponding connected domain numbers to a grid point connected domain numbering recording system, and saving the merging relationships between different connected domains to a connected domain numbering system; Merging the connected domain numbers in the connected domain numbering system to obtain a target connected domain number; The connected domain number of the grid point in the grid connected domain number recording system is updated according to the target connected domain number, thereby completing the connected domain division of the three-dimensional geometric model.
2. The method according to claim 1, wherein The steps of numbering the connected domains of the fully connected points by a breadth-first search method, saving the numbered grid points and the corresponding connected domain numbers to a grid point connected domain number recording system, and saving the merging relationships between different connected domains to the connected domain numbering system include: Initializing a fully connected search queue and a connected domain number counter, wherein the connected domain number counter records a first current connected domain number; Selecting a point from the fully connected points that has not been recorded by the grid connected domain number recording system as a first starting point, and adding the first starting point to the fully connected search queue; Recording the coordinates of the first starting point and the first current connected domain number in the grid connected domain number recording system; Performing a breadth-first search on the fully connected search queue, and during the search process, recording the grid points and the corresponding connected domain numbers into the grid point connected domain number recording system, and recording the merging relationships between connected domains into the connected domain numbering system; Incrementing the first current connected domain number in the connected domain number counter; Return to the step of selecting a point from the fully connected points that has not been recorded by the grid connected domain number recording system as the first starting point, until all points in the fully connected points are recorded by the grid connected domain number recording system.
3. The method according to claim 2, wherein The steps of performing a breadth-first search on the fully connected search queue, recording the grid points and the corresponding connected domain numbers in the grid point connected domain number recording system during the search process, and recording the merging relationships between connected domains in the connected domain numbering system include: Popping a point from the fully connected search queue and recording it as the first current point; Traversing the first adjacent points of the first current point in all discrete velocity directions; When the first neighboring point is a fully connected point and has not been recorded by the grid point connected domain number recording system, adding the first neighboring point to the fully connected search queue, and recording the coordinates of the first neighboring point and the first current connected domain number in the grid point connected domain number recording system; When the first adjacent point is recorded by the grid connected domain number recording system and the connected domain number corresponding to the first adjacent point is another connected domain number, recording the first current connected domain number and the another connected domain number as a merge relationship between connected domains in the connected domain numbering system, where the another connected domain number refers to a connected domain number other than the first current connected domain number; Return to the step of popping a point from the fully connected search queue and recording it as the first current point until the fully connected search queue is empty.
4. The method according to claim 1, wherein The steps of numbering the connected domains of the non-fully connected points by a breadth-first search method, saving the numbered grid points and the corresponding connected domain numbers to a grid point connected domain number recording system, and saving the merging relationships between different connected domains to the connected domain numbering system include: Determine connectivity based on connectivity requirements; Initialize a non-fully connected search queue, and use the connected domain number in the connected domain number counter after the full connection point search is completed as the second current connected domain number; Selecting a point from the non-fully connected points that has not been recorded by the grid connected domain number recording system as a second starting point; Traversing the second adjacent points of the second starting point in all discrete velocity directions; When all the second adjacent points and the second starting point do not satisfy the connectivity condition of the connectivity, skipping the second starting point and returning to the step of selecting a point from the non-fully connected points that has not been recorded by the grid connected domain number recording system as the second starting point; When at least one of the second adjacent points and the second starting point meets the connectivity condition of the connectivity, the second starting point is added to the non-fully connected search queue; Recording the coordinates of the second starting point and the second current connected domain number in the grid connected domain number recording system; Performing a breadth-first search on the non-fully connected search queue, and during the search process, recording the grid points and the corresponding connected domain numbers into a search grid point connected domain number recording system, and recording the merging relationships between connected domains into a connected domain numbering system; Incrementing the second current connected domain number in the connected domain number counter; Return to the step of selecting a point from the non-fully connected points that has not been recorded by the grid connected domain number recording system as a second starting point, until all points in the non-fully connected points are recorded by the grid connected domain number recording system.
5. The method according to claim 4, wherein The steps of performing a breadth-first search on the non-fully connected search queue, recording the grid points and the corresponding connected domain numbers in a search grid point connected domain number recording system during the search process, and recording the merging relationships between connected domains in the connected domain numbering system include: Popping a point from the non-fully connected search queue and recording it as the second current point; Traversing the third adjacent points of the second current point in all discrete velocity directions; If the third adjacent point in the currently traversed discrete velocity direction and the second current point meet the connectivity condition of the connectivity and the third adjacent point has not been recorded by the grid point connected domain number recording system, the grid point connected domain number recording system records the third adjacent point and the second current connected domain number, and adds the third adjacent point to the non-fully connected search queue; If the third adjacent point in the currently traversed discrete velocity direction and the second current point satisfy the connectivity condition of the connectivity degree and the third adjacent point has been recorded by the grid connected domain number recording system, the connected domain number corresponding to the third adjacent point and the second current connected domain number are recorded as a merge relationship in the connected domain numbering system; Return to the step of popping a point from the non-fully connected search queue and recording it as the second current point until the non-fully connected search queue is empty.
6. The method according to claim 1, wherein The connected domain numbering system includes an associative container and a serial container. The associative container is used to record each connected domain number and the corresponding serial number, and the serial container is used to record the connected domain number after the merger. The step of merging the connected domain numbers in the connected domain numbering system to obtain a target connected domain number comprises: Acquire a first connected domain number and a second connected domain number to be merged from the connected domain numbering system; When the first connected domain number and the second connected domain number are different, checking whether the first connected domain number and the second connected domain number are recorded in the associative container; When both the first connected domain number and the second connected domain number are recorded in the associative container, obtaining a first sequence number and a second sequence number corresponding to the first connected domain number and the second connected domain number from the associative container; updating the data in the associative container and the serial container according to the first sequence number and the second sequence number; When the data update is completed, the connected domain number queues in the sequential container are merged according to the connected domain numbers in the associative container; When the merging is completed, the process returns to the step of obtaining the first connected domain number and the second connected domain number to be merged from the connected domain numbering system until all connected domain numbers in the connected domain numbering system are traversed to obtain the target connected domain number.
7. The method according to claim 6, wherein The step of updating the data in the associative container and the serial container according to the first sequence number and the second sequence number includes: When the first sequence number and the second sequence number are different, traversing the elements in the queue with the second sequence number in the sequential container, and updating the sequence numbers corresponding to the elements in the associative container to the first sequence number; Insert all elements in the queue with the second sequence number into the queue with the first sequence number in the serial container; Deleting the queue with the second sequence number from the serial container; When the deletion is completed, the associative container is traversed and all sequence numbers greater than the second sequence number are sorted in descending order to complete the data update in the associative container and the serial container.
8. The method according to claim 6, wherein When the data update is completed, the step of merging the connected domain number queues in the sequential container according to the connected domain numbers in the associative container includes: When the data update is completed, the first connectivity domain number is recorded in the associative container, and the second connectivity domain number is not recorded in the associative container, recording the second connectivity domain number into the connectivity domain number queue where the first connectivity domain number is located; When the second connectivity domain number is recorded in the associative container and the first connectivity domain number is not recorded in the associative container, recording the first connectivity domain number into the connectivity domain number queue where the second connectivity domain number is located; When neither the first connected domain number nor the second connected domain number is recorded in the associative container, the number of connected domains in the sequential container is used as a new connected domain serial number; Recording the first connected domain number, the second connected domain number, and the new connected domain sequence number in the associative container; A new queue including the first connectivity domain number and the second connectivity domain number is added to the serial container.
9. The method according to claim 1, wherein After the step of merging the connected domain numbers in the connected domain numbering system to obtain the target connected domain number, the method further includes: Traversing the non-fully connected points, merging the target connected domain numbers according to the three-dimensional connection relationship between the non-fully connected points and adjacent connected domains to obtain a first reference connected domain number; Deleting a to-be-deleted number from the first reference connected domain number to obtain a second reference connected domain number, wherein the to-be-deleted number is a connected domain number corresponding to a connected domain having a grid point number less than a preset grid point number threshold; The target connected segment number is updated according to the second reference connected segment number.
10. The method according to claim 9, wherein The step of traversing the non-fully connected points and merging the target connected domain numbers according to the three-dimensional connection relationship between the non-fully connected points and adjacent connected domains to obtain a first reference connected domain number includes: Traversing the non-fully connected points, and recording the connection relationship between each non-fully connected point and its surrounding adjacent connected domains; When the connection relationship is a three-dimensional connection relationship, recording the first connected domain of the non-fully connected points corresponding to the connection relationship and the second connected domain corresponding to the connection relationship; Traversing all connected directions of the non-fully connected points, and recording a set of connected grid points in the connected directions that belong to the first connected domain or the second connected domain; When the connected grid point set is fused with the non-fully connected points to satisfy grid body connectivity, the connected domain numbers corresponding to the first connected domain and the second connected domain in the target connected domain number are merged to obtain a first reference connected domain number.
11. The method according to claim 9, wherein After the step of updating the target connected domain number according to the second reference connected domain number, the method further includes: Marking the grid points in the connected domain corresponding to the second reference connected domain number as valid connected domain grid points; Traversing the adjacent grid points in all connected directions of the effective connected domain grid points; When the adjacent grid point is the valid connected domain grid point and the connected domain number of the valid connected domain grid point is different from the connected domain number of the adjacent grid point, recording the connected domain boundary according to the valid connected domain grid point, the connected domain number of the valid connected domain grid point, the connection direction between the valid connected domain grid point and the adjacent grid point, and the connected domain number of the adjacent grid point; When the adjacent grid point is not the valid connected domain grid point, the degenerate point connected domain boundary is recorded according to the valid connected domain grid point, the connected domain number to which the valid connected domain grid point belongs, and the connection direction between the valid connected domain grid point and the adjacent grid point.
Citation Information
Patent Citations
Method and system for detecting crack proportion in pavement image
CN114998096A
Voxel connected domain division method and device, equipment and storage medium
CN118038000A