Grid generation method and electronic equipment
The grid generation method based on octree point placement and region decomposition solves the problem of low efficiency in parallel grid generation in existing technologies, achieves efficient and high-quality grid partitioning, improves parallel efficiency and algorithm efficiency, and is suitable for scientific and engineering computing of complex models.
Patent Information
- Application Number
- CN202410658240.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2025-11-25
AI Technical Summary
Existing parallel mesh generation methods cannot efficiently and effectively generate meshes, resulting in low parallel efficiency and difficulty in meeting the needs of large-scale scientific and engineering computing.
Wall nodes are generated on the background mesh using an octree point layout method, and the internal mesh is generated through region decomposition and De launay partitioning. A structured tetrahedral element set is used as the parallel partitioning interface to avoid introducing unnecessary geometric constraints. Mesh optimization is performed in conjunction with the OpenMP parallel scheme.
It achieves efficient and high-quality mesh generation, improves parallel efficiency, meets the accuracy requirements of complex models, and enhances algorithm efficiency and mesh quality.
Smart Images

Figure CN121010725A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a grid generation method and an electronic device. Background Technology
[0002] Mesh generation is a preprocessing step in applying the finite element method. Parallel mesh generation is an important research direction in high-performance computing, aiming to optimize the efficiency and speed of large-scale scientific and engineering calculations. Parallel mesh generation is mainly divided into two categories: coarse-grained and fine-grained parallel methods. However, current parallel mesh generation methods cannot efficiently generate high-quality meshes, resulting in low parallel efficiency. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a mesh generation method and an electronic device that can efficiently and effectively generate meshes and improve parallel efficiency.
[0004] In a first aspect, embodiments of the present invention provide a mesh generation method, the method comprising:
[0005] The surface mesh is first boundary restored, and the first tetrahedral mesh obtained by the first boundary restoration is used as the background mesh.
[0006] Multiple wall nodes are obtained by placing points on the background grid;
[0007] A second boundary restoration is performed on the surface mesh and the wall nodes to generate a second tetrahedral mesh containing wall elements.
[0008] The second tetrahedral mesh is decomposed into multiple first sub-regions, and meshes are generated in parallel for each first sub-region.
[0009] The mesh generation method provided in this embodiment of the invention has the following beneficial effects:
[0010] 1) Utilizing tetrahedrons with a similar structure, i.e., wall meshes containing wall elements, as parallel partitioning interfaces avoids introducing unnecessary geometric constraints and ensures mesh quality at the interfaces. This allows for efficient and high-quality mesh generation for complex models, meeting the accuracy requirements of ultra-large-scale numerical computations.
[0011] 2) Treating wall nodes as external inputs and forming De launay meshes together with the surface mesh can avoid the method of inserting wall nodes one by one by calling the De launay interpolation operator after boundary restoration (also known as "surface restoration"), which greatly reduces the computational complexity and improves the efficiency of the algorithm.
[0012] 3) Perform De launay meshing on the sub-regions after domain decomposition. The sub-regions after domain decomposition do not need to communicate with each other to generate the algorithm mesh serially, and each sub-region can call its own optimization algorithm to improve the mesh quality after generation.
[0013] In summary, the mesh generation method provided by the embodiments of the present invention can efficiently and effectively generate high-quality meshes and improve parallel efficiency.
[0014] In conjunction with the first aspect, in some implementations of the first aspect, the step of placing points on the background grid to obtain multiple wall nodes includes:
[0015] Multiple wall nodes are obtained by placing points on the background mesh using an octree method.
[0016] Compared to the Delaunay placement method and the AFT front-push placement method, the octree placement method has higher algorithm adaptability and faster efficiency.
[0017] In conjunction with the first aspect, in some implementations of the first aspect, the background mesh comprises multiple surface nodes, each surface node comprising a size value;
[0018] The method of using an octree to place points on the background mesh to obtain multiple wall nodes includes:
[0019] Calculate the principal inertial axis direction of the background mesh based on the position of the surface nodes;
[0020] Based on the direction of the principal inertial axis, determine the establishment direction and the region segmentation surface;
[0021] An octree is constructed based on the construction direction and the region segmentation surface. The octree contains 8 sub-partitions, which are divided according to the first region segmentation surface.
[0022] The octree is refined using the surface nodes as input;
[0023] Multiple wall nodes are obtained by extracting the corner points of the refined octree.
[0024] Establishing an octree requires defining a relative coordinate system, namely the principal inertial axis directions and the centroid of the surface mesh. The three principal inertial axes plus the centroid of the surface mesh, forming a similar coordinate system, can yield three region division surfaces.
[0025] Octree creation generally refers to creating a data structure containing only 8 sub-regions. Refining an octree involves two steps: creation and refinement. Initially, the octree has only 8 sub-regions; after creation, it is refined based on the surface nodes of the background mesh and the size values of those nodes.
[0026] The region partitioning surface is determined by the principal inertial axis, and the octree is then built based on this region partitioning surface. Therefore, the initial octree with its eight sub-partitions can partition the tetrahedral elements of the background mesh.
[0027] Refining an octree requires surface nodes of the input surface mesh as point sources. As a spatial data structure, the octree determines which leaf node a given surface node belongs to based on its spatial location. Then, by comparing the size of the leaf node with the size of the surface node, it is determined whether the leaf needs refinement. Octree refinement can be achieved by inserting all surface nodes into the octree using this method. All inputs are the surface nodes of the surface mesh; no other inputs are required.
[0028] Each octree leaf (sub-partition space, initially 8) is initially assigned a large size value. Based on the leaf's maximum spatial span, surface nodes from the background mesh are then sequentially inserted into the octree. If the size value of the leaf containing a surface node is greater than the size value of the surface node, that leaf will be refined. Similarly, if the size value of the refined leaf is still greater than the size value of the surface node, refinement continues until a termination condition is triggered: either the octree reaches its maximum refinement level or the leaf size value approaches the surface node size value. After each surface node is inserted, the octree's refinement result is adaptive; that is, in areas with larger surface node sizes, the refinement is less, while in areas with smaller surface node sizes, the refinement is more.
[0029] The corner nodes of an octree are the six nodes of its leaves. Each leaf is actually a cuboid, and the corner nodes are the six vertices of that cuboid. The corner nodes of an octree can be obtained after extracting the leaves.
[0030] Using the principal inertial axis direction of the surface mesh as the guiding coordinate system for octree generation ensures that the number of meshes in each sub-region is comparable after the region decomposition, ensuring balanced load in each sub-region during parallel generation and improving parallel efficiency.
[0031] In conjunction with the first aspect, in some implementations of the first aspect, obtaining multiple wall nodes by extracting the corner points of the refined octree includes:
[0032] Extract the nodes of the first leaves that meet the wall mesh conditions from the refined octree to obtain multiple first corner points, and use the multiple first corner points as multiple wall nodes.
[0033] If at least one face of a leaf in an octree coincides with a region partitioning plane, then that leaf is considered a leaf that meets the wall mesh condition. The wall mesh condition is that at least one point within a tetrahedron is an intermediate wall node. An intermediate wall node is defined as a leaf corner point on the region partitioning plane that falls within the middle layer of the extracted three layers of wall nodes.
[0034] In conjunction with the first aspect, in some implementations of the first aspect, obtaining multiple wall nodes by extracting the corner points of the refined octree includes:
[0035] Extract multiple first leaves from the refined octree that meet the wall grid conditions;
[0036] Local encryption is performed on the plurality of first leaves to obtain a plurality of second leaves;
[0037] By extracting the nodes of the multiple second leaves, multiple wall nodes are obtained.
[0038] Local encryption is used to control the maximum size of the extracted leaves to ensure a uniform transition in the size of the subsequently generated wall units.
[0039] In conjunction with the first aspect, in some implementations of the first aspect, the wall mesh condition includes: at least one face of the leaf of the refined octree coincides with the first region segmentation face.
[0040] In this embodiment of the invention, octree corner points are extracted from the region segmentation surface and one layer of corner points on both sides of each region segmentation surface. That is, three layers of corner points are extracted from each region segmentation surface: octree corner points on the region segmentation surface itself, on one side of the region segmentation surface, and on the other side of the region segmentation surface. These three layers of corner points can generate two layers of tetrahedral elements, i.e., "wall" elements with thickness. The extracted multiple wall nodes can then be used in subsequent steps to construct a wall mesh composed of wall elements.
[0041] In conjunction with the first aspect, in some implementations of the first aspect, the step of placing points on the background grid to obtain multiple wall nodes includes:
[0042] Multiple wall nodes are obtained by placing points on the background mesh using either the De launay placement method or the AFT leading edge advancement placement method.
[0043] The wall mesh is arranged using an octree grid. In some possible embodiments, the grid can also be arranged using a De launay grid or an AFT (Advanced Forward Layout) grid. It should be noted that only the grid arrangement method can be changed; everything else remains the same as described above.
[0044] The Delaunay point placement method uses the region segmentation surface as a guide, changing the serial point placement order to form segmented units. A triangulation where the circumcircle of all tetrahedrons satisfies the empty circle property is called a Delaunay triangulation. The wall mesh point placement method uses Delaunay triangulation, but this partitioning method has a more complex extraction strategy and the point placement position is difficult to control, making its algorithm less adaptable than octree point placement.
[0045] In the AFT (Advanced Forward Layout) algorithm, a portion of the facets are advanced in a specified direction to form segmented wall elements. The core idea of the 3D AFT algorithm is to discretize the boundary into faces, i.e., triangles, and then, using each face as a base, find an optimal point within the region to form an optimal tetrahedron. Simultaneously, the set of faces is updated until all faces in the set have been processed. This layout algorithm has the advantage of reducing constraints and improving the quality of wall elements, but it is relatively slow.
[0046] Therefore, compared with De launay placement method and AFT front advance placement method, octree placement method has higher algorithm adaptability and faster efficiency.
[0047] In conjunction with the first aspect, in some implementations of the first aspect, the decomposition of the second tetrahedral mesh into multiple first sub-regions includes:
[0048] A wall mesh is obtained by extracting the wall elements from the second tetrahedral mesh. The wall elements include tetrahedral elements distributed on both sides of the region dividing surface or having nodes on the region dividing surface.
[0049] Based on the sub-partitions where the remaining tetrahedral units in the second tetrahedral mesh are located, the remaining tetrahedral units are divided into regions to obtain multiple first sub-regions.
[0050] The second tetrahedral mesh contains wall elements. At least one point of the tetrahedron that makes up the wall element is on the region partitioning surface. The wall element will have a separate mark. The wall element is extracted based on the mark on the element.
[0051] After the wall units are extracted, the remaining units will be distributed into 8 unconnected unit sets, which fall into the 8 sub-leaf nodes of the octree, thus completing 8 partitions.
[0052] In conjunction with the first aspect, in some implementations of the first aspect, the parallel generation of meshes for each first sub-region includes:
[0053] Surface extraction is performed on each of the first sub-regions to obtain each of the first sub-surfaces corresponding to each of the first sub-regions;
[0054] Based on each of the first sub-surfaces, an independent serial tetrahedral mesh is generated in each of the first sub-partitions.
[0055] Surface extraction for each of the first sub-regions can be performed in parallel. The purpose of surface extraction is to provide eight independent sub-surfaces for subsequent parallel mesh generation.
[0056] Using the sub-surfaces of 8 sub-regions as input, 8 meshes are generated in parallel. Each sub-region first uses its own extracted sub-surfaces as input and performs a serial tetrahedron generation step on the sub-region, including initial Delaunay, boundary restoration, mesh internal interpolation refinement, and mesh optimization.
[0057] In conjunction with the first aspect, in some implementations of the first aspect, after generating meshes in parallel for each first sub-region, the method further includes:
[0058] Merge the first sub-regions after generating the mesh;
[0059] The merged first sub-regions are output together with the wall mesh to obtain the first tetrahedral model.
[0060] After generating meshes in parallel across partitions, the first sub-regions after generating the meshes are merged and then output together with the extracted wall meshes to obtain the first tetrahedral model.
[0061] In conjunction with the first aspect, in certain implementations of the first aspect, the step of locally encrypting the plurality of first leaves to obtain a plurality of second leaves includes:
[0062] The initial octree has 8 leaves with a level of 1. Each leaf is refined once, and the level of the sub-leaf produced increases by 1.
[0063] Set the maximum number of levels among all leaves to m, and encrypt the leaves with a number of levels greater than m+x among the multiple first leaves until the number of levels of all leaves is less than or equal to m+x.
[0064] The condition for local encryption is to determine the level number of the leaves. The initial octree has 8 leaves with a level number of 1. Each leaf refined once increases the level number of its child leaves by 1. Local encryption involves encrypting the leaf with the largest level number among the extracted first leaves. The condition is: set the maximum level number of all leaves to m, and further subdivide leaves with a level number greater than m+x until all leaves have a level number less than or equal to m+x. The value of x can be set by the user; currently, the default is 2, because a difference of 2 in the level number ensures a relatively uniform transition of the wall grid.
[0065] In conjunction with the first aspect, in some implementations of the first aspect, prior to the first boundary restoration of the surface mesh, the method further includes:
[0066] Based on the first information of the surface mesh, determine whether to perform parallel subdivision of the surface mesh;
[0067] If it is determined that the surface mesh is to be partitioned in parallel, the surface mesh is restored for the first time, and the first tetrahedral mesh obtained by the first boundary restoration is used as the background mesh.
[0068] If it is determined that the surface mesh will not be partitioned in parallel, a serial partitioning algorithm is used to partition the surface mesh serially.
[0069] For example, the first information may include user-defined information or the number of grids in the surface mesh.
[0070] For example, the user-defined information includes information on parallel or serial meshing. The electronic device determines whether to perform parallel meshing on the surface mesh based on the specified information. If the specified information includes information on parallel meshing, it determines that parallel meshing will be performed on the surface mesh; if the specified information includes information on serial meshing, it determines that serial meshing will be performed on the surface mesh.
[0071] For example, when the first piece of information is the number of grids, the electronic device compares the number of grids with a grid number threshold and determines whether to perform parallel partitioning based on the comparison result.
[0072] In conjunction with the first aspect, in some implementations of the first aspect, prior to the first boundary restoration of the surface mesh, the method further includes:
[0073] Determine whether there are regions in the surface mesh with a size smaller than a first threshold;
[0074] If it is determined that there is no region with a size smaller than the first threshold in the surface mesh, the surface mesh is restored for the first time, and the first tetrahedral mesh obtained by the first boundary restoration is used as the background mesh; points are placed on the background mesh to obtain multiple wall nodes.
[0075] The system determines whether the surface mesh contains elongated regions by checking if there are any regions with dimensions smaller than a first threshold. If no elongated regions are found, the system uses a wall mesh partitioning method.
[0076] If a narrow, elongated region is identified in the surface mesh, the wall elements, being two layers of tetrahedral elements formed by three layers of corner points, have a thickness requirement. When certain models or surface meshes have particularly narrow regions (smaller than the surface mesh size), the outer two layers of the three corner points often end up outside the model and cannot be used, causing wall element generation to fail. Therefore, for models or surface meshes with narrow, elongated regions, using a surface mesh partitioning method is more suitable, as surface meshes only extract the corner points of the middle layer for insertion.
[0077] In conjunction with the first aspect, in some implementations of the first aspect, after determining whether the surface mesh has a region with a size smaller than the first threshold, the method further includes:
[0078] If it is determined that there is a region with a size smaller than the first threshold in the surface mesh, the surface mesh is restored for the first time, and the first tetrahedral mesh obtained by the first boundary restoration is used as the background mesh.
[0079] Multiple face nodes are obtained by placing points on the background mesh;
[0080] A second boundary restoration is performed on the surface mesh and the face nodes to generate a third tetrahedral mesh containing face elements.
[0081] The third tetrahedral mesh is decomposed into multiple second sub-regions, and meshes are generated in parallel for each second sub-region.
[0082] If it's a surface mesh process, surface nodes will appear later, but tetrahedral elements will not appear because there's only one layer of corner points, which can only generate triangular face elements. However, the idea of partitioning is the same. That is, wall meshes divide the internal region using two layers of tetrahedral elements, while surface meshes partition using one layer of surface mesh (this surface is a face of a tetrahedron).
[0083] Wall meshes are composed of wall units, and surface meshes are composed of surface units.
[0084] Both wall meshes and surface meshes are generated by inserting extracted corner points into the existing mesh. They can be used to divide space into regions within the mesh and are unrelated to surface meshes. Essentially, corner points are inserted into the spatial regions enclosed by the surface mesh.
[0085] Secondly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory is used to store a computer program, the computer program including program instructions, and when the processor executes the program instructions, the electronic device performs the steps of the method described above.
[0086] Thirdly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, the computer program including program instructions that, when the program requests to be run by a computer, cause the computer to perform the method described above.
[0087] Fourthly, embodiments of the present invention provide a computer program product comprising instructions that, when the computer program product is run on a computer or any at least one processor, cause the computer to perform the functions / steps as described above.
[0088] The technical solution of the mesh generation method and electronic device provided in this invention includes: performing a first boundary restoration on the surface mesh, using the first tetrahedral mesh obtained from the first boundary restoration as a background mesh; placing points on the background mesh to obtain multiple wall nodes; performing a second boundary restoration on the surface mesh and the wall nodes to generate a second tetrahedral mesh containing wall elements; performing region decomposition on the second tetrahedral mesh to obtain multiple first sub-regions, and generating meshes in parallel for each first sub-region. This method can efficiently and effectively generate high-quality meshes and improve parallel efficiency. Attached Figure Description
[0089] Figure 1 This is a schematic diagram illustrating an application scenario of the mesh generation method provided in an embodiment of the present invention;
[0090] Figure 2 This is a schematic diagram illustrating the generation of wall meshes on geometry in an embodiment of the present invention;
[0091] Figure 3 A flowchart of a mesh generation method provided in an embodiment of the present invention;
[0092] Figure 4 for Figure 3 The flowchart shows how to place points on the background grid to obtain multiple wall nodes.
[0093] Figure 5 for Figure 4 The flowchart of multiple wall nodes is obtained by extracting the corner points of the refined octree.
[0094] Figure 6 for Figure 5 The flowchart shows how to locally encrypt multiple first leaves to obtain multiple second leaves;
[0095] Figure 7 for Figure 3 The flowchart describes the process of decomposing the second tetrahedral mesh into multiple first sub-regions and generating meshes in parallel for each first sub-region.
[0096] Figure 8 A flowchart illustrating yet another mesh generation method provided in an embodiment of the present invention;
[0097] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0098] To better understand the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0099] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0100] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0101] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0102] To better understand the embodiments of this application, the terms or concepts that may be involved in the embodiments are explained below.
[0103] (1) De launay mesh: It is a commonly used triangulation meshing technique. De launay triangulation maximizes the minimum angle and has two characteristics: "closest to regularization" triangulation mesh and uniqueness (any four points cannot be concentric). In three-dimensional space, it is represented as tetrahedral subdivision and the formation of tetrahedral mesh.
[0104] (2) Octree: A tree-like data structure for describing three-dimensional space. It is often used for tetrahedral mesh partitioning, which divides the geometry into eight sub-cube meshes according to three spatial directions to form an octree.
[0105] (3) Advance Front Method (AFT): It is one of the general automatic unstructured finite element mesh generation methods. Starting from the boundary, it finds suitable points among the boundary points and interior points to form a tetrahedron.
[0106] (4) Interface wall: refers to a set of structured tetrahedral units formed by using the De launay interpolation operator with octree nodes as reference coordinates. It is a type of volume mesh with thickness, similar to a wall, which can divide the mesh into several zones.
[0107] (5) Class structure: Spatial grid structure with the same characteristics.
[0108] Mesh generation is a preprocessing step in the finite element method (FEM). It discretizes a continuous solution domain with infinite degrees of freedom into an equivalent discrete system with finite degrees of freedom. This discrete system consists of a finite number of subdomains (elements). Research on mesh generation algorithms plays a crucial role in numerical solutions. However, generating high-quality meshes for complex solution domains remains challenging. In engineering applications, mesh generation often relies heavily on manual processing, resulting in significant time commitment during numerical solutions. Therefore, fully automated, high-quality mesh generation for complex models is a key research area in Computer-Aided Engineering (CAE).
[0109] Parallel mesh generation is an important research direction in high-performance computing, aiming to optimize the efficiency and speed of large-scale scientific and engineering computations. When dealing with large-scale and complex mathematical models, it is often necessary to decompose the problem into smaller, more manageable parts. Parallel mesh generation is a core component of parallel computing; by partitioning the complex problem domain into regions, it allows for multi-partition collaborative computation of the simulation, thereby achieving rapid problem-solving. Parallel mesh generation is mainly divided into two categories: coarse-grained and fine-grained parallel methods.
[0110] Coarse-grained parallelism refers to dividing a large-scale mesh into several sub-mesh areas through mesh generation, and then performing serial mesh generation within each sub-mesh. This is currently the mainstream method. The advantage of this method is its ease of implementation and its ability to leverage the foundation of serial mesh generation. The challenge lies in ensuring load balancing across partitions, coordinating and synchronizing the boundary cells between partitions, and ensuring that the computational and communication loads of all processors remain roughly balanced to avoid resource idleness or overload. Furthermore, due to the constraints imposed after partitioning, mesh quality at partition boundaries is difficult to guarantee. Coarse-grained parallel algorithms include parallel constrained tetrahedral mesh generation algorithms and parallel unconstrained tetrahedral mesh generation algorithms. A representative algorithm for parallel unconstrained tetrahedral mesh generation is based on coarse-mesh partitioning. This type of algorithm first uses a larger cell size to generate a small-scale coarse mesh for the solution domain; then, it uses the coarse mesh for domain decomposition. This algorithm mainly uses graph partitioning to decompose the coarse mesh into a series of sub-mesh areas; then, it refines the sub-mesh areas in parallel, ultimately obtaining a large-scale fine mesh with small cell sizes.
[0111] The main difficulties of this type of algorithm that uses sub-mesh as sub-region for mesh generation are: (1) it is difficult to ensure that the refined surface mesh fits the curved surface of the CAD model; (2) it is difficult to ensure that the sub-region will not form a narrow region, because a narrow region will limit the quality of the internal unit.
[0112] The parallel constrained tetrahedral mesh generation algorithm takes the triangular mesh of the solution domain boundary as input and maintains the representation of the solution domain boundary unchanged. Therefore, it has many advantages over the parallel unconstrained tetrahedral mesh generation algorithm. On the one hand, the parallel constrained tetrahedral mesh generation algorithm can be applied to more scenarios, such as local mesh regeneration and flow field mesh filling of boundary layer meshes. On the other hand, the parallel constrained tetrahedral mesh generation algorithm can decouple the volume mesh generation process from the surface mesh generation process, thus being more conducive to large-scale mesh generation of complex CAD models. This algorithm adopts a domain decomposition strategy. The advantage of the domain decomposition strategy is that the mesh generation of the sub-regions after decomposition can use existing serial mesh generation algorithms. The disadvantage of the domain decomposition strategy is that partitioning inevitably introduces additional constraints to mesh generation, which limits the application of the domain decomposition strategy in large-scale mesh generation of complex models.
[0113] Fine-grained parallelism refers to the redesign of parallel mesh data structures to fully parallelize the operations on the most basic mesh units, such as point insertion, edge restoration, and volume collapse, thereby achieving overall parallel mesh generation. This method relies on specific data structures to enable dynamic memory access and computation. Adopting a strategy of alternating coarse-grained and multi-level parallel generation for different problems and computational environments is currently the most effective approach.
[0114] The implementation path of fine-grained mesh generation is complex, requiring parallel design for both the data structure and all mesh operations, making it impossible to reuse serial algorithms. Current mesh generation operators lack parallel reconstruction architectures, such as point insertion, face intersection, and De launay triangulation. Therefore, achieving parallel reconstruction of fine-grained meshes is difficult and labor-intensive. Furthermore, fine-grained mesh generation implies simultaneous computation of various parallel tasks, consuming significant time in communication and conflict resolution, thus reducing parallel efficiency. The mainstream mesh generation algorithms in the industry are still coarse-grained methods.
[0115] Based on the above-mentioned technical problems, embodiments of the present invention provide a mesh generation method and electronic device, which realizes efficient, reliable and fast parallel constrained tetrahedral mesh generation, optimizes the efficiency and speed of large-scale scientific and engineering computing, ensures the quality of partitioned meshes, and thus ensures the meshing of complex large models.
[0116] The partitioning method used in this embodiment of the invention is interface wall partitioning. An interface wall refers to a set of structured tetrahedral elements formed using the De launay interpolation operator with octree nodes as reference coordinates. This tetrahedral element set is distributed along three principal directions of a coordinate system, with three layers of parallel nodes in each principal direction. Every two tetrahedral elements can be merged into a cube, and their size increases or decreases with changes in the internal size field. Simultaneously, this tetrahedral element set includes tetrahedral elements connected to surface triangles, ensuring that the interior of the watertight surface model is further divided into eight independent watertight regions for subsequent parallel mesh generation. The overall size of the wall elements can also be controlled by parameters.
[0117] This invention employs a parallel constrained tetrahedral mesh generation algorithm. The Delaunay mesh, obtained after the first surface restoration, serves as the background mesh and size field. An octree, adaptively encrypted from the size source, is used as the primary data structure to form an initial Delaunay mesh with interface partitions. Subsequently, a region decomposition method is used to recursively partition the initial mesh, and a parallel OpenMP scheme is employed to synchronously mesh and optimize each partition.
[0118] Figure 1 This diagram illustrates an application scenario of the mesh generation method provided in this embodiment of the invention. The mesh generation method provided in this embodiment can be applied to the "mesh generation" module in finite element analysis software, employing the OpenMP parallel constrained tetrahedral mesh generation algorithm, such as... Figure 1 As shown, the input consists of a surface mesh (also known as a "triangular mesh") or a geometric model at the boundary of the given solution domain. If the input is a surface mesh, the "mesh generation" module directly processes the surface mesh to generate a tetrahedral mesh within the solution domain, while maintaining the boundary of the tetrahedral mesh consistent with the input triangular mesh. If the input is a geometric model, the geometric model is first converted into a surface mesh, and then the "mesh generation" module processes the surface mesh to generate a tetrahedral mesh within the solution domain. The "computation and solution" module then performs numerical simulation based on the finite element method to solve for the tetrahedral mesh. Finally, the "post-processing" module processes the results obtained from the numerical simulation, such as generating images and animations. Constrained tetrahedral mesh generation decouples the generation process of the surface mesh and the internal mesh of the solution domain, and can be widely used in industrial CAE analysis.
[0119] The mesh generation method provided in this invention can be applied to the mesh generation module of finite element simulation software or the mesh module in CAE software. Figure 2 This is a schematic diagram illustrating the generation of a wall mesh on a geometry in an embodiment of the present invention. Using the mesh generation method provided in this embodiment will generate a wall mesh with a structure-like appearance containing interface segmentation, for example... Figure 2The wall meshes on the cylinders and cubes are shown. The interface walls are a set of structured tetrahedral elements distributed along the three principal directions of a coordinate system. Each pair of tetrahedral elements can be combined into a cube. The model is divided into multiple independent regions by these structured, thick wall elements.
[0120] In this embodiment of the invention, the wall grid can also be referred to as a "wall partition". The wall unit is the element that makes up the wall grid.
[0121] Figure 3 This is a flowchart illustrating a mesh generation method provided in an embodiment of the present invention. Figure 3 As shown, the method includes steps 102-108.
[0122] Step 102: Perform the first boundary restoration on the surface mesh, and use the first tetrahedral mesh obtained from the first boundary restoration as the background mesh.
[0123] In this step, the first two steps of the serial tetrahedron generation algorithm, namely the initial De launay tetrahedron generation and boundary restoration, are used to process the table mesh to obtain the background mesh returned by the first boundary restoration.
[0124] Step 104: Place points on the background grid to obtain multiple wall nodes.
[0125] In some possible embodiments, step 104 specifically includes: using an octree to place points on the background mesh to obtain multiple wall nodes.
[0126] For example, the background mesh comprises multiple surface nodes. Each surface node on the background mesh is equivalent to a point source, and each point source contains a size value. The size value is the average of the lengths of all edges connected to each surface node.
[0127] In some possible embodiments, such as Figure 4 As shown, step 104 specifically includes: steps 104A-104E.
[0128] Step 104A: Calculate the principal inertial axis direction of the background mesh based on the position of the surface nodes;
[0129] Step 104B: Determine the establishment direction and region segmentation surface based on the direction of the principal inertial axis;
[0130] For example, based on the surface node coordinates of the background mesh, three principal inertial axis directions and three segmentation surfaces can be obtained. These three principal inertial axis directions are also the directions for establishing the octree.
[0131] Step 104C: Construct an octree based on the construction direction and the region segmentation plane. The octree contains 8 sub-partitions, which are divided according to the region segmentation plane.
[0132] In this step, an octree is built on the background mesh based on the established direction and the region segmentation surface.
[0133] Establishing an octree requires defining a relative coordinate system, namely the principal inertial axis directions and the centroid of the surface mesh. The three principal inertial axes plus the centroid of the surface mesh, forming a similar coordinate system, can yield three region division surfaces.
[0134] Octree creation generally refers to creating a data structure containing only 8 sub-regions. Refining an octree involves two steps: creation and refinement. Initially, the octree has only 8 sub-regions; after creation, it is refined based on the surface nodes of the background mesh and the size values of those nodes.
[0135] The region partitioning surface is determined by the principal inertial axis, and the octree is then built based on this region partitioning surface. Therefore, the initial octree with its eight sub-partitions can partition the tetrahedral elements of the background mesh.
[0136] Step 104D: Refine the octree using surface nodes as input;
[0137] In this step, the octree is refined using the surface nodes of the background mesh as input.
[0138] Refining an octree requires surface nodes of the input surface mesh as point sources. As a spatial data structure, the octree determines which leaf node a given surface node belongs to based on its spatial location. Then, by comparing the size of the leaf node with the size of the surface node, it is determined whether the leaf needs refinement. Octree refinement can be achieved by inserting all surface nodes into the octree using this method. All inputs are the surface nodes of the surface mesh; no other inputs are required.
[0139] Each octree leaf (sub-partition space, initially 8) is initially assigned a large size value. Based on the leaf's maximum spatial span, surface nodes from the background mesh are then sequentially inserted into the octree. If the size value of the leaf containing a surface node is greater than the size value of the surface node, that leaf will be refined. Similarly, if the size value of the refined leaf is still greater than the size value of the surface node, refinement continues until a termination condition is triggered: either the octree reaches its maximum refinement level or the leaf size value approaches the surface node size value. After each surface node is inserted, the octree's refinement result is adaptive; that is, in areas with larger surface node sizes, the refinement is less, while in areas with smaller surface node sizes, the refinement is more.
[0140] In simple terms, a size field is a function that determines the size value at any location in space. A point-source size field refers to a size field constructed by interpolation from point sources. The size values from the point sources are the primary source of the size field information. The size field information is essentially a size value from each surface node on the background mesh. Based on the size values from these discrete surface nodes, the size value at any location in space can be obtained through interpolation.
[0141] Step 104E: By extracting the corner points of the refined octree, multiple wall nodes are obtained.
[0142] In this step, the corner points of the octree are the six nodes of the leaves. Each leaf is actually a cuboid, and the corner points are the six vertices of the cuboid. The corner points of the octree can be obtained after the leaves are extracted.
[0143] In some possible embodiments, step 104E specifically includes: extracting multiple first leaf nodes that meet the wall mesh conditions from the refined octree to obtain multiple first corner points, and using the multiple first corner points as multiple wall nodes.
[0144] For example, the wall mesh condition includes: at least one face of the leaf of the refined octree coincides with the region partition face.
[0145] If at least one face of a leaf in an octree coincides with a region partitioning plane, then that leaf is considered a leaf that meets the wall mesh condition. The wall mesh condition is that at least one point within a tetrahedron is an intermediate wall node. An intermediate wall node is defined as a leaf corner point on the region partitioning plane that falls within the middle layer of the extracted three layers of wall nodes.
[0146] In this embodiment of the invention, octree corner points are extracted from the region segmentation surface and one layer of corner points on both sides of each region segmentation surface. That is, three layers of corner points are extracted from each region segmentation surface: octree corner points on the region segmentation surface itself, on one side of the region segmentation surface, and on the other side of the region segmentation surface. These three layers of corner points can generate two layers of tetrahedral elements, i.e., "wall" elements with thickness. Therefore, the multiple wall nodes extracted in step 104E can be used in subsequent steps to construct a wall mesh composed of wall elements.
[0147] In some possible embodiments, such as Figure 5 As shown, step 104E specifically includes steps 104a-104c.
[0148] Step 104a: Extract multiple first leaves from the refined octree that meet the wall mesh conditions;
[0149] Step 104b: Locally encrypt multiple first leaves to obtain multiple second leaves;
[0150] In some possible embodiments, such as Figure 6 As shown, step 104b specifically includes steps 1042-1044.
[0151] Step 1042: Set the initial octree to have 1 level for the 8 leaves. After each leaf is refined, the level of the sub-leaf produced increases by 1.
[0152] Step 1044: Set the maximum number of levels in all leaves to m, and encrypt the leaves with a level greater than m+x in the first leaves until the number of levels in all leaves is less than or equal to m+x.
[0153] Local refinement is used to control the maximum size of extracted leaves to ensure a uniform transition in the size of subsequently generated wall units. The condition for local refinement is to determine the number of levels in the leaves. The initial octree has 8 leaves with a level of 1, and the level of each sub-leaf generated after refining each leaf increases by 1. Local refinement involves refining the leaves with the largest level among the extracted first leaves. The condition is: set the maximum level among all leaves to m, and subdivide leaves with a level greater than m+x until all leaves have a level less than or equal to m+x. The value of x can be set by the user; currently, the default is 2, because a difference of 2 in the level number ensures a relatively uniform transition in the wall mesh.
[0154] Step 104c: By extracting multiple second leaf nodes, multiple wall nodes are obtained.
[0155] In this step, KD-tree is used to extract and deduplicate nodes from multiple second leaves to obtain multiple wall nodes.
[0156] As mentioned above, wall nodes are corner points extracted from the corresponding octree leaf nodes. Therefore, multiple leaves may share the same corner point, resulting in duplicate wall nodes. To address this, a kd-tree is constructed from all extracted wall nodes, and its spatial structure properties are used to remove duplicate wall nodes.
[0157] For example, some wall nodes may be very close to the surface, resulting in poor-quality tetrahedrons. Similarly, kd-tree can be used to remove duplicates and then delete wall nodes that are too close to the surface. The selection of wall nodes close to the surface can be configured by the user, with the default value being 1 / 10 of the surface mesh node size.
[0158] The wall mesh is arranged using an octree grid. In some possible embodiments, the grid can also be arranged using a De launay grid or an AFT (Advanced Forward Layout) grid. It should be noted that only the grid arrangement method can be changed; everything else remains the same as described above.
[0159] The Delaunay point placement method uses the region segmentation surface as a guide, changing the serial point placement order to form segmented units. A triangulation where the circumcircle of all tetrahedrons satisfies the empty circle property is called a Delaunay triangulation. The wall mesh point placement method uses Delaunay triangulation, but this partitioning method has a more complex extraction strategy and the point placement position is difficult to control, making its algorithm less adaptable than octree point placement.
[0160] In the AFT (Advanced Forward Layout) algorithm, a portion of the facets are advanced in a specified direction to form segmented wall elements. The core idea of the 3D AFT algorithm is to discretize the boundary into faces, i.e., triangles, and then, using each face as a base, find an optimal point within the region to form an optimal tetrahedron. Simultaneously, the set of faces is updated until all faces in the set have been processed. This layout algorithm has the advantage of reducing constraints and improving the quality of wall elements, but it is relatively slow.
[0161] Therefore, compared with De launay placement method and AFT front advance placement method, octree placement method has higher algorithm adaptability and faster efficiency.
[0162] Step 106: Perform a second boundary restoration on the surface mesh and wall nodes to generate a second tetrahedral mesh containing wall elements.
[0163] In this step, the surface mesh input for the second boundary recovery is the same as the surface mesh input for the first boundary recovery. The surface mesh input for the first boundary recovery is used to generate the background mesh, which provides information for the surface mesh input for the second boundary recovery, namely the wall nodes. The input for the second boundary recovery consists of two parts: the surface mesh and the selected wall nodes.
[0164] The second boundary recovery returns a tetrahedral mesh, namely the second tetrahedral mesh, which generates wall elements inside compared to the background mesh. Since the second tetrahedral mesh contains wall elements, it is therefore a wall mesh.
[0165] Before performing a second boundary restoration on the surface mesh and wall nodes, all nodes, namely wall nodes and surface nodes, need to be sorted according to their adjacent spatial positions. This is helpful for forming the De launay tetrahedral mesh and can improve efficiency.
[0166] For example, Hilbert sort can be used to sort all nodes.
[0167] Step 108: Decompose the second tetrahedral mesh into multiple first sub-regions, and generate meshes in parallel for each first sub-region.
[0168] In some possible embodiments, such as Figure 7 As shown, step 108 specifically includes:
[0169] Step 108A: Obtain the wall mesh by extracting the wall elements from the second tetrahedral mesh. The wall elements include tetrahedral elements distributed on both sides of the region partitioning surface or with nodes on the region partitioning surface.
[0170] In this step, the wall elements contained in the second tetrahedral mesh have at least one point on the region segmentation surface of the tetrahedron that makes up the wall element. The wall elements will have individual marks, and the wall elements are extracted based on the marks on the elements.
[0171] Step 108B: Based on the sub-regions where the remaining tetrahedral elements in the second tetrahedral mesh are located, divide the remaining tetrahedral elements into regions to obtain multiple first sub-regions.
[0172] In this step, after the wall units are extracted, the remaining units will be distributed into 8 unconnected unit sets, which fall into the 8 sub-leaf nodes of the octree, thus completing 8 partitions.
[0173] Step 108C: Extract the surface of each first sub-region to obtain each first sub-surface corresponding to each first sub-region;
[0174] In this step, surface extraction of each first sub-region can be performed in parallel. The purpose of surface extraction is to provide eight independent sub-surfaces for subsequent parallel mesh generation.
[0175] Step 108D: Generate independent serial tetrahedral meshes in each first sub-partition based on each first sub-surface.
[0176] In this step, eight sub-regions' sub-surfaces are used as input to generate eight meshes in parallel. Each sub-region first uses its own extracted sub-surface as input and performs a serial tetrahedron generation step on the sub-region, including initial de launay, boundary restoration, mesh internal interpolation refinement, and mesh optimization.
[0177] The mesh generation method provided in this embodiment of the invention has the following beneficial effects:
[0178] 1) Utilizing tetrahedral meshes (wall meshes) as parallel partitioning interfaces avoids introducing redundant geometric constraints, ensuring mesh quality at the interfaces. This allows for efficient and high-quality mesh generation for complex models, meeting the accuracy requirements of ultra-large-scale numerical computations.
[0179] 2) Using the main inertial axis direction of the surface mesh as the guiding coordinate system for octree generation can ensure that the number of meshes in each sub-region is comparable after the region is decomposed, ensuring that the load of each sub-region is balanced during parallel generation and improving parallel efficiency.
[0180] 3) Using the De launay surface mesh after the first surface restoration as the background mesh, determine the spatial relationship between the wall nodes to be inserted and the geometric model. Utilize an efficient kd-tree and the size field of the surface nodes to control the spatial position of the wall nodes to be inserted. Using the De launay surface mesh as the background mesh can quickly filter out candidate wall nodes outside the geometric model or too close to the surface, ensuring the validity of subsequent inputs and guaranteeing the quality of the elements formed by the inserted wall nodes and surface elements.
[0181] 4) The wall nodes to be inserted into the De launay mesh are sorted using the Hilbbert sorting method. The filtered wall nodes are used as input along with the surface mesh to generate an initial partitioned De launay mesh with interfaces. Using the filtered wall nodes as external input to form the De launay partition simultaneously with the surface mesh avoids the need to call the De launay interpolation operator one by one after boundary restoration, which greatly reduces the computational complexity and improves the algorithm efficiency.
[0182] 5) The Delaunay mesh is performed on the sub-regions after domain decomposition using the OpenMPI / MPI scheme. The sub-regions after domain decomposition do not need to communicate with each other to generate the algorithm mesh serially, and each sub-region can call its own optimization algorithm to improve mesh quality after generation.
[0183] The mesh generation method provided in this invention can be applied to efficient and high-quality mesh generation in any computational field involving mesh generation and solution. The mesh generation method provided in this invention can also be adapted to fields such as finite difference and finite volume.
[0184] The mesh generation method provided in this invention includes: performing a first boundary restoration on the surface mesh, using the first tetrahedral mesh obtained from the first boundary restoration as a background mesh; placing points on the background mesh to obtain multiple wall nodes; performing a second boundary restoration on the surface mesh and the wall nodes to generate a second tetrahedral mesh containing wall elements; performing region decomposition on the second tetrahedral mesh to obtain multiple first sub-regions, and generating meshes in parallel for each first sub-region. This method enables efficient and high-quality mesh generation, improving parallel efficiency.
[0185] Optionally, Figure 8 A flowchart illustrating yet another mesh generation method provided in an embodiment of the present invention. For example... Figure 8 As shown, after step 108, the following steps are also included:
[0186] Step 110: Merge the first sub-regions after generating the grid;
[0187] Step 112: Output the merged first sub-regions together with the wall mesh to obtain the first tetrahedral model.
[0188] Optionally, such as Figure 8 As shown, before step 102, there are steps 202-206.
[0189] Step 202: Based on the first information of the surface mesh, determine whether to perform parallel meshing. If not, proceed to step 204; if yes, proceed to step 206.
[0190] For example, the first information may include user-defined information or the number of grids in the surface mesh.
[0191] For example, the user-defined information includes information on parallel or serial meshing. The electronic device determines whether to perform parallel meshing on the surface mesh based on the specified information. If the specified information includes information on parallel meshing, it determines that parallel meshing will be performed on the surface mesh; if the specified information includes information on serial meshing, it determines that serial meshing will be performed on the surface mesh.
[0192] For example, when the first piece of information is the number of grids, the electronic device compares the number of grids with a grid number threshold and determines whether to perform parallel partitioning based on the comparison result.
[0193] Step 204: Perform serial meshing on the surface using a serial meshing algorithm. End of process.
[0194] Step 206: Determine whether there are regions on the surface mesh with a size smaller than the first threshold. If yes, proceed to step 208; otherwise, proceed to step 102.
[0195] In this step, it is determined whether there are any regions on the surface mesh with a size smaller than a first threshold, and whether there are any elongated regions on the surface mesh. If it is determined that there are no elongated regions on the surface mesh, steps 102 to 112 are executed, using the partitioning method of the wall mesh.
[0196] If a narrow, elongated region is identified in the surface mesh, the wall elements, being two layers of tetrahedral elements formed by three layers of corner points, have a thickness requirement. When certain models or surface meshes have particularly narrow regions (smaller than the surface mesh size), the outer two layers of the three corner points often end up outside the model and cannot be used, causing wall element generation to fail. Therefore, for models or surface meshes with narrow, elongated regions, using a surface mesh partitioning method is more suitable, as surface meshes only extract the corner points of the middle layer for insertion.
[0197] If it's a surface mesh process, surface nodes will appear later, but tetrahedral elements will not appear because there's only one layer of corner points, which can only generate triangular face elements. However, the idea of partitioning is the same. That is, wall meshes divide the internal region using two layers of tetrahedral elements, while surface meshes partition using one layer of surface mesh (this surface is a face of a tetrahedron).
[0198] like Figure 8 As shown, step 206 is followed by steps 208-214.
[0199] Step 208: Perform the first boundary restoration on the surface mesh, and use the first tetrahedral mesh obtained from the first boundary restoration as the background mesh;
[0200] Step 210: Place points on the background mesh to obtain multiple face nodes.
[0201] This step is similar to step 104, except that the extracted corner points do not form wall elements, but triangular elements, i.e., face elements, so the extracted corner points are face nodes.
[0202] Both wall meshes and surface meshes are generated by inserting extracted corner points into the existing mesh. They can be used to divide space into regions within the mesh and are unrelated to surface meshes. Essentially, corner points are inserted into the spatial regions enclosed by the surface mesh.
[0203] Wall meshes are composed of wall units, and surface meshes are composed of surface units.
[0204] As can be seen from the above, the only difference between step 210 and step 104 is that the strategies for extracting corner points are different, resulting in multiple nodes being face nodes.
[0205] Step 212: Perform a second boundary restoration on the surface mesh and surface nodes to generate a third tetrahedral mesh containing surface elements.
[0206] This step is similar to step 106, except that the nodes input along with the surface mesh are not wall nodes, but surface nodes, so that the generated third tetrahedral mesh contains surface elements.
[0207] Step 214: Decompose the third tetrahedral mesh into multiple second sub-regions, and generate meshes for each second sub-region in parallel.
[0208] This step is similar to step 108, except that: instead of wall elements, surface elements are extracted first, and the surface mesh is obtained by extracting surface elements from the third tetrahedral mesh.
[0209] Step 216: Merge the second sub-regions after generating the mesh;
[0210] This step is the same as step 110, and will not be repeated here.
[0211] Step 218: Output the merged second sub-regions together with the surface mesh to obtain the second tetrahedron model.
[0212] This step is similar to step 110, except that the merged second sub-regions are output together with the surface mesh.
[0213] Figure 9 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. It should be understood that the electronic device 400 is capable of performing each step in the above-described mesh generation method. To avoid repetition, details are not provided here. The electronic device 400 includes a processor 401 and a memory 402.
[0214] This application also provides an electronic device, including at least one processor 401 and at least one memory 402, wherein the at least one memory 402 is used to store at least one program, and when the at least one processor 401 runs the at least one program, the electronic device performs the operations as described in the above method embodiments.
[0215] This application provides a computer-readable storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform the functions / steps described in the above method embodiments.
[0216] This application also provides a computer program product containing instructions that, when run on an electronic device or any at least one processor, cause the electronic device to perform the functions / steps described in the above method embodiments.
[0217] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0218] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0219] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. The protection scope of this application should be determined by the protection scope of the claims.
Claims
1. A mesh generation method, characterized in that, The method includes: The surface mesh is first boundary restored, and the first tetrahedral mesh obtained by the first boundary restoration is used as the background mesh. Multiple wall nodes are obtained by placing points on the background grid; A second boundary restoration is performed on the surface mesh and the wall nodes to generate a second tetrahedral mesh containing wall elements. The second tetrahedral mesh is decomposed into multiple first sub-regions, and meshes are generated in parallel for each first sub-region.
2. The method according to claim 1, characterized in that, The process involves placing points on the background grid to obtain multiple wall nodes, including: Multiple wall nodes are obtained by placing points on the background mesh using an octree method.
3. The method according to claim 2, characterized in that, The background mesh contains multiple surface nodes, and each surface node contains a size value; The method of using an octree to place points on the background mesh to obtain multiple wall nodes includes: Calculate the principal inertial axis direction of the background mesh based on the position of the surface nodes; Based on the direction of the principal inertial axis, determine the establishment direction and the region segmentation surface; An octree is constructed based on the construction direction and the region segmentation surface. The octree contains 8 sub-partitions, which are divided according to the first region segmentation surface. The octree is refined using the surface nodes as input; Multiple wall nodes are obtained by extracting the corner points of the refined octree.
4. The method according to claim 3, characterized in that, The process involves extracting the corner points of the refined octree to obtain multiple wall nodes, including: Extract the nodes of the first leaves that meet the wall mesh conditions from the refined octree to obtain multiple first corner points, and use the multiple first corner points as multiple wall nodes.
5. The method according to claim 3, characterized in that, The process involves extracting the corner points of the refined octree to obtain multiple wall nodes, including: Extract multiple first leaves from the refined octree that meet the wall grid conditions; Local encryption is performed on the plurality of first leaves to obtain a plurality of second leaves; By extracting the nodes of the multiple second leaves, multiple wall nodes are obtained.
6. The method according to claim 4 or 5, characterized in that, The wall mesh condition includes: at least one face of the leaf of the refined octree coincides with the first region segmentation face.
7. The method according to claim 1, characterized in that, The process involves placing points on the background grid to obtain multiple wall nodes, including: Multiple wall nodes are obtained by placing points on the background mesh using either the Delaunay placement method or the AFT leading edge advancement placement method.
8. The method according to claim 1, characterized in that, The process of decomposing the second tetrahedral mesh into multiple first sub-regions includes: A wall mesh is obtained by extracting the wall elements from the second tetrahedral mesh. The wall elements include tetrahedral elements distributed on both sides of the region dividing surface or having nodes on the region dividing surface. Based on the sub-partitions where the remaining tetrahedral units in the second tetrahedral mesh are located, the remaining tetrahedral units are divided into regions to obtain multiple first sub-regions.
9. The method according to claim 8, characterized in that, The parallel generation of meshes for each first sub-region includes: Surface extraction is performed on each of the first sub-regions to obtain each of the first sub-surfaces corresponding to each of the first sub-regions; Based on each of the first sub-surfaces, an independent serial tetrahedral mesh is generated in each of the first sub-partitions.
10. The method according to claim 1, characterized in that, After generating meshes in parallel for each first sub-region, the process further includes: Merge the first sub-regions after generating the mesh; The merged first sub-regions are output together with the wall mesh to obtain the first tetrahedral model.
11. The method according to claim 5, characterized in that, The process of locally encrypting the plurality of first leaves to obtain a plurality of second leaves includes: The initial octree has 8 leaves with a level of 1. Each leaf is refined once, and the level of the sub-leaf produced increases by 1. Set the maximum number of levels among all leaves to m, and encrypt the leaves with a number of levels greater than m+x among the multiple first leaves until the number of levels of all leaves is less than or equal to m+x.
12. The method according to claim 1, characterized in that, Before performing the first boundary restoration on the surface mesh, the process also includes: Based on the first information of the surface mesh, determine whether to perform parallel subdivision of the surface mesh; If it is determined that the surface mesh is to be partitioned in parallel, the surface mesh is restored for the first time, and the first tetrahedral mesh obtained by the first boundary restoration is used as the background mesh. If it is determined that the surface mesh will not be partitioned in parallel, a serial partitioning algorithm is used to partition the surface mesh serially.
13. The method according to claim 1 or 12, characterized in that, Before performing the first boundary restoration on the surface mesh, the process also includes: Determine whether there are regions in the surface mesh with a size smaller than a first threshold; If it is determined that there is no region with a size smaller than the first threshold in the surface mesh, the surface mesh is restored for the first time, and the first tetrahedral mesh obtained by the first boundary restoration is used as the background mesh; points are placed on the background mesh to obtain multiple wall nodes.
14. The method according to claim 13, characterized in that, After determining whether there are regions with a size smaller than the first threshold in the surface mesh, the method further includes: If it is determined that there is a region with a size smaller than the first threshold in the surface mesh, the surface mesh is restored for the first time, and the first tetrahedral mesh obtained by the first boundary restoration is used as the background mesh. Multiple face nodes are obtained by placing points on the background mesh; A second boundary restoration is performed on the surface mesh and the face nodes to generate a third tetrahedral mesh containing face elements. The third tetrahedral mesh is decomposed into multiple second sub-regions, and meshes are generated in parallel for each second sub-region.
15. An electronic device, characterized in that, The device includes a processor and a memory, wherein the memory is used to store a computer program, the computer program including program instructions that, when the processor executes the program instructions, cause the electronic device to perform the steps of the method as described in any one of claims 1-14.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when requested to be run by a computer, cause the computer to perform the method as described in any one of claims 1-14.