A tetrahedral mesh optimization method based on volume uniformity and angle uniformity
Through the tetrahedral mesh optimization method based on uniform volume and uniform angle, the problems of thin elements in tetrahedral mesh are solved, the grid quality and numerical simulation accuracy and efficiency are improved, and the grid uniformity is achieved and stability.
Patent Information
- Application Number
- CN202410686894.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-05-30
AI Technical Summary
In the prior art, tetrahedral mesh optimization is difficult to completely eliminate thin elements, affecting calculation accuracy and efficiency, and the grid quality requires strict accuracy for numerical simulation.
A tetrahedral mesh optimization method based on volume uniformity and angle uniformity is adopted. Through topological transformation and smoothing algorithms, thin elements are reduced and grid uniformity is improved, and an energy function is introduced to promote the uniform distribution of tetrahedral volume and angle.
It significantly reduces thin element elements, improves the geometric quality of the mesh and the accuracy and efficiency of numerical calculations, enhances the overall uniformity and stability of the tetrahedral mesh, and improves the accuracy and reliability of numerical simulation.
Smart Images

Figure CN118505931B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a tetrahedral mesh optimization process in the pre-processing of electromagnetic device numerical simulation field, and in particular to a tetrahedral mesh optimization method based on volume uniformity and angle uniformity. Background Art
[0002] In the field of numerical computing, many studies involve numerical simulation techniques based on partial differential equations, such as finite volume method, finite difference method, finite element method and boundary element method. Before applying the above numerical solution methods to analyze the problem, it is usually necessary to discretize the geometric domain of the problem into a combination of many basic units. This key process is called mesh generation, which aims to discretize the Euclidean space into a collection of linear mesh units in order to simulate most nonlinear problems in the real world. In the past three decades, tetrahedral mesh generation technology has made significant progress, and many efficient and practical algorithms have been developed. These algorithms include advancing frontier method, envelope method, Laplace method, and various techniques related to Delaunay tetrahedralization and Voronoi diagram. Despite these advances, generating high-quality tetrahedral meshes remains a major challenge because it is difficult to completely eliminate thin elements in theory and practice. The presence of thin elements will have an adverse effect on the subsequent application of tetrahedral meshes.
[0003] In the numerical simulation of electromagnetic devices, the influence of mesh quality on computational accuracy and efficiency is particularly significant. The numerical simulation of electromagnetic devices usually involves complex geometric structures and accurate propagation of high-frequency electromagnetic waves, so high-quality meshes are required to ensure accurate computational results and efficient solution processes. In order to improve the accuracy of numerical calculations, strict requirements are placed on the quality of the mesh, which requires a lot of effort to optimize the quality of the mesh to ensure the accuracy of numerical calculations. To this end, the present invention proposes a method for enhancing the quality of tetrahedral meshes by reducing thin elements and improving uniformity. Inspired by minimal surfaces that minimize square surface areas, our method introduces a new energy function that integrates the weighted square volumes of tetrahedral units. When minimized with constant weights, the function promotes uniformity of tetrahedral volumes. Adjusting weights according to local geometry can homogenize the dihedral angles within the mesh. A key feature of our energy function is its convexity, which allows efficient minimization using a Newton solver.
[0004] The present invention aims to solve the mesh quality optimization problem existing in the prior art and provide a tetrahedral mesh optimization method based on volume uniformity and angle uniformity. By reducing thin elements and improving uniformity, the quality of the tetrahedral mesh is significantly improved to meet the demand for high-precision and high-quality meshes in numerical simulation, especially for the application of numerical simulation of electromagnetic devices. Summary of the invention
[0005] In order to solve the difficulty of thin element processing in the mesh optimization stage in the prior art, an embodiment of the present application provides a tetrahedral mesh optimization method based on volume uniformity and angle uniformity.
[0006] According to an embodiment of the present application, a tetrahedral mesh optimization method based on volume uniformity and angle uniformity is provided, comprising:
[0007] S1: Obtain the tetrahedral mesh of the initial electromagnetic device and the energy convergence condition of the user-given point smoothing algorithm;
[0008] S2: updating the connection mode of the tetrahedral mesh through topological transformation;
[0009] S3: Based on the volume uniform algorithm, the vertices of the tetrahedral mesh after the topological transformation are smoothed, and the volume energy of the smoothed vertices is calculated. If the volume energy does not reach the energy convergence condition of the user-given point, steps S2 and S3 are repeated. The volume uniform algorithm moves the point to be smoothed along the decreasing direction of the volume energy so that the volume of the tetrahedron containing the point to be smoothed is more uniform.
[0010] S4: Based on the angle uniformity algorithm, the vertices of the tetrahedral mesh updated by the topological transformation are smoothed, and the angle energy of the smoothed vertices is calculated. If the angle energy does not reach the energy convergence condition of the user-given point, steps S2 and S4 are repeated. The angle uniformity algorithm moves the point to be smoothed along the decreasing direction of the angle energy so that the dihedral angle of the tetrahedron containing the point to be smoothed is more uniform.
[0011] Furthermore, the interconnection mode of the tetrahedral mesh is updated through topological transformation, specifically including:
[0012] The tetrahedral mesh is traversed to find tetrahedral units with poor dihedral angle quality. First, an edge removal operation is performed on each edge of the tetrahedral unit. If the mesh connectivity cannot be improved, a face removal operation is performed on each face of the tetrahedral unit. In this process, the criterion for judging whether the mesh topology is improved is whether the minimum dihedral angle is improved.
[0013] Furthermore, based on the volume uniformity algorithm, the vertices of the tetrahedral mesh updated by the topological transformation are smoothed, specifically including:
[0014] S31: Find the vertices to be smoothed in the tetrahedral mesh and traverse them.
[0015] S32: Find the tetrahedral unit containing the vertex to be smoothed, and calculate the volume V of each tetrahedral unit. m .
[0016] S33: Calculate the initial volume energy of the vertex to be smoothed based on the calculated volume:
[0017]
[0018] in represents the vertex p i At current location The energy represents the volume of the mth tetrahedron containing this vertex, ρ m is the density parameter.
[0019] S34: Calculate the volume energy of the point to be smoothed based on the calculated initial volume energy The gradient direction a k :
[0020]
[0021] where v mj , v ml , v mk Indicates the number of vertices p to be smoothed in the m-th tetrahedron i Pointing to the other three vertices p of the tetrahedron mj 、p ml 、p mk Three vectors.
[0022] And get the initial volume energy The Hazen matrix H k :
[0023]
[0024] where s m =(v mj -v ml )×(v mk -v ml ).
[0025] Finally, the descent direction of the gradient is obtained
[0026] where g k is the volume energy The gradient direction, H k is the volume energy The Hazen matrix H of .
[0027] S35: Descending direction d according to the obtained gradient k , determine the moving step length a of the point to be smoothed by linear search k , and then get the new position of the smoothed point
[0028]
[0029] in is the position of the previous step in the iteration, a k is the moving step length, d k is the descending direction of the gradient.
[0030] S36: Calculate the new position of the smoothed point Volume energy And according to the energy convergence condition ∈ given by the user E Determine whether the volume energy converges:
[0031]
[0032] When the energy drop is less than the user-given convergence condition ∈ E , end the smoothing of the current point; otherwise, re-execute steps S32 to S36.
[0033] Furthermore, based on the angle uniformity algorithm, the vertices of the tetrahedral mesh updated by the topological transformation are smoothed, specifically including:
[0034] S41: Find the vertices to be smoothed in the tetrahedral mesh and traverse them;
[0035] S42: Find the tetrahedral unit containing the vertex to be smoothed, and calculate the volume V of each tetrahedral unit. m ;
[0036] S43: Calculate the initial angle energy of the vertex to be smoothed based on the calculated volume:
[0037]
[0038] in represents the vertex p i At current location The energy represents the volume of the mth tetrahedron containing this vertex, A m is the area;
[0039] S44: Calculate the angle energy of the point to be smoothed based on the calculated initial angle energy The gradient direction g k :
[0040]
[0041] where v mj , v ml , v mk Indicates the number of vertices p to be smoothed in the m-th tetrahedron i Pointing to the other three vertices p of the tetrahedron mj 、p ml 、pmk Three vectors of ;
[0042] And get the initial angle energy The Hazen matrix H k :
[0043]
[0044] where s m =(v mj -v ml )×(v mk -v ml );
[0045] Finally, the descent direction of the gradient is obtained
[0046] where g k is the angle energy The gradient direction, H k is the angle energy The Hazen matrix H of
[0047] S45: Descending direction d according to the obtained gradient k , determine the moving step length a of the point to be smoothed by linear search k , and then get the new position of the smoothed point
[0048]
[0049] in is the position of the previous step in the iteration, a k is the moving step length, d k is the descending direction of the gradient;
[0050] S46: Calculate the new position of the smoothed point Angular Energy And according to the energy convergence condition ∈ given by the user E Determine whether the angle energy converges:
[0051]
[0052] When the energy drop is less than the user-given convergence condition ∈ E , end the smoothing of the current point; otherwise, re-execute steps S42 to S46.
[0053] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0054] It effectively solves the problems that are difficult to deal with in the tetrahedral mesh optimization stage and effectively reduces the thin elements. By optimizing the volume uniformity first and then optimizing the angle uniformity, the thin elements in the mesh are significantly reduced, which not only improves the geometric quality of the mesh, but also improves the accuracy and efficiency of subsequent numerical calculations. In addition to reducing the worst thin elements, the angle uniformity optimization method also greatly improves the overall tetrahedral mesh quality, promotes the generation of tetrahedral meshes with higher uniformity and fewer thin elements, reduces the numerical instability caused by extremely small angles, and thus improves the accuracy and reliability of numerical simulations. Compared with existing methods, it shows superior performance.
[0055] In addition, volume uniform optimization and angle uniform optimization bring better mesh uniformity, which is manifested in the following aspects: by introducing volume square energy, the uniform distribution of tetrahedral unit volume is effectively promoted, avoiding the problem of excessive or too small volume in local areas, thereby improving the overall uniformity of the mesh. By combining the angle uniform smoothing algorithm with topological transformation, the uniformity of dihedral angles in tetrahedral meshes is enhanced, ensuring the regularity and stability of tetrahedral shapes, making them closer to regular tetrahedrons.
[0056] In summary, the method of the present invention significantly improves the overall quality of the tetrahedral mesh by integrating volume uniformity and angle uniformity optimization strategies, and provides a more reliable and efficient pre-processing tool for numerical simulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0058] Figure 1 The present invention is a flow chart showing a tetrahedral mesh optimization method based on volume uniformity and angle uniformity according to an exemplary embodiment.
[0059] Figure 2 is a schematic diagram of an initial tetrahedron example of an electromagnetic device example according to an exemplary embodiment.
[0060] Figure 3 is a histogram of initial volume distribution of an electromagnetic device according to an exemplary embodiment.
[0061] Figure 4 is a schematic diagram showing the distribution of initial thin elements of an electromagnetic device according to an exemplary embodiment.
[0062] Figure 5 is a diagram showing an initial dihedral angle distribution of an electromagnetic device according to an exemplary embodiment.
[0063] Figure 6is a diagram showing a surface removal process according to an exemplary embodiment.
[0064] Figure 7 is a diagram showing an edge removal process according to an exemplary embodiment.
[0065] Figure 8 is a volume distribution histogram of a tetrahedral mesh of an electromagnetic device after volume uniformity optimization according to an exemplary embodiment.
[0066] Fig. 9 The figure is a schematic diagram of the distribution of thin elements of a tetrahedral mesh of an electromagnetic device after volume uniformity optimization according to an exemplary embodiment.
[0067] Fig.10 1 is a diagram showing a dihedral angle distribution of a tetrahedral mesh of an electromagnetic device after volume uniformity optimization according to an exemplary embodiment.
[0068] Fig.11 is a volume distribution histogram of a tetrahedral mesh of an electromagnetic device after angle uniformity optimization according to an exemplary embodiment.
[0069] Fig.12 1 is a schematic diagram of the distribution of thin elements of a tetrahedral mesh of an electromagnetic device after uniform angle optimization according to an exemplary embodiment.
[0070] Fig.13 is a dihedral angle distribution diagram of a tetrahedral mesh of an electromagnetic device after uniform optimization of the angle s according to an exemplary embodiment.
[0071] Fig.14 FIG. 4 is a schematic diagram of a final mesh after tetrahedral mesh optimization of an electromagnetic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0072] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0073] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0074] Figure 1 is a flow chart of a tetrahedral mesh optimization method based on volume uniformity and angle uniformity according to an exemplary embodiment. Figure 1 As shown, the method may include the following steps:
[0075] S1: Get the tetrahedral mesh of the initial electromagnetic device, and the user gives the energy convergence condition of the point smoothing algorithm;
[0076] Specifically, firstly, the initial tetrahedral mesh of the input electromagnetic device is obtained. Then, the conditions ∈ ... E If the energy convergence condition is too large, it will lead to insufficient convergence and the optimization result will be greatly reduced. If the energy convergence condition is too small, it is easy to make the convergence condition too high and the optimization time will be too long. In this specific implementation scheme, we use an electromagnetic device (such as a microstrip antenna) as an example to demonstrate the optimization process. Figure 2 As shown; the volume distribution of its initial tetrahedral mesh is as follows Figure 3 As shown in the histogram, it is not uniform; its initial difference unit, thin element, Figure 4 As shown in the figure, the red part of the grid contains a large number of difference units; its initial dihedral angle is Figure 5 As shown, it is used to compare with the optimized quality.
[0077] S2: updating the connection mode of the tetrahedral mesh through topological transformation;
[0078] Specifically, the tetrahedral mesh is traversed to find tetrahedral units with poor dihedral angle quality. First, each edge of the tetrahedral unit is removed. If the mesh connectivity is not improved, each face of the tetrahedral unit is removed. In this process, the criterion for determining whether the mesh topology is improved is whether the minimum dihedral angle is improved.
[0079] By updating this step through topological transformation, the quality of the tetrahedral mesh can be improved and some thin element problems can be solved. In addition, updating the interconnection method of the tetrahedral mesh can improve the effects of the subsequent point smoothing strategies based on the volume uniform algorithm and the angle uniform algorithm.
[0080] S3: Based on the volume uniform algorithm, the vertices of the tetrahedral mesh updated by the topological transformation are smoothed, and the volume energy of the smoothed vertices is calculated. If the volume energy does not reach the energy convergence condition of the user-given point, steps S2 and S3 are repeated. The volume uniform algorithm moves the point to be smoothed along the decreasing direction of the volume energy so that the volume of the tetrahedron containing the point to be smoothed is more uniform. This step may include the following sub-steps:
[0081] S31: Find the vertices to be smoothed in the tetrahedral mesh and traverse them.
[0082] S32: Find the tetrahedral unit containing the vertex to be smoothed, and calculate the volume V of each tetrahedral unit. m .
[0083] S33: Calculate the initial volume energy of the vertex to be smoothed based on the calculated volume:
[0084]
[0085] in represents the vertex p i At current location The energy represents the volume of the mth tetrahedron containing this vertex, ρ m is the density parameter.
[0086] S34: Calculate the volume energy of the point to be smoothed based on the calculated initial volume energy The gradient direction g k :
[0087]
[0088] where v mj , v ml , v mk Indicates the number of vertices p to be smoothed in the m-th tetrahedron i Pointing to the other three vertices p of the tetrahedron mj 、p nk 、p nj Three vectors.
[0089] And get the initial volume energy The Hazen matrix H k :
[0090]
[0091] where s m =(v mj -v ml )×(v mk -v ml ).
[0092] Finally, the descent direction of the gradient is obtained
[0093] where g k is the volume energy The gradient direction, H k is the volume energy The Hazen matrix H.
[0094] S35: Descending direction d according to the obtained gradient k , determine the moving step length a of the point to be smoothed by linear search k , and then get the new position of the smoothed point
[0095]
[0096] in is the position of the previous step in the iteration, a k is the moving step length, d k is the descending direction of the gradient.
[0097] S36: Calculate the new position of the smoothed point Volume energy And according to the energy convergence condition ∈ given by the user E Determine whether the volume energy converges:
[0098]
[0099] When the energy drop is less than the user-given convergence condition ∈ E , end the smoothing of the current point; otherwise, re-execute steps S32 to S36.
[0100] After the volume uniformity algorithm, we can see the distribution histogram of the unit volume in the tetrahedral grid as follows Figure 8 Compared with the volume distribution diagram before optimization ( Figure 3 ), the volume peak is higher, which means that the volume distribution is more uniform, meeting the purpose of the volume uniformity algorithm. The difference unit distribution after the volume uniformity algorithm is as follows Fig. 9 As shown, compared with the thin element distribution map before optimization ( Figure 4 ), the thin element has been reduced. The dihedral angle distribution after the volume uniformity algorithm is shown in the figure Fig.10 As shown, it can be found that both the minimum dihedral angle and the maximum dihedral angle are significantly improved, and the average minimum dihedral angle and the average maximum dihedral angle are also greatly improved.
[0101] Therefore, the volume uniformity-based smoothing algorithm designed in step S3 solves the problem of excessive volume span of tetrahedral units in tetrahedral meshes, while also improving the problem of thin elements, ultimately further improving the quality of tetrahedral meshes.
[0102] S4: Based on the angle uniformity algorithm, the vertices of the tetrahedral mesh updated after the topological transformation are smoothed, and the angle energy of the smoothed vertices is calculated. If the angle energy does not reach the energy convergence condition of the user-given point, steps S2 and S4 are repeated. The angle uniformity algorithm moves the point to be smoothed along the decreasing direction of the angle energy so that the dihedral angle of the tetrahedron containing the point to be smoothed is more uniform. This step may include the following sub-steps:
[0103] S41: Find the vertices to be smoothed in the tetrahedral mesh and traverse them;
[0104] S42: Find the tetrahedral unit containing the vertex to be smoothed, and calculate the volume V of each tetrahedral unit. m ;
[0105] S43: Calculate the initial angle energy of the vertex to be smoothed based on the calculated volume:
[0106]
[0107] in represents the vertex p i At current location The energy represents the volume of the mth tetrahedron containing this vertex, A m is the area;
[0108] S44: Calculate the angle energy of the point to be smoothed based on the calculated initial angle energy The gradient direction g k :
[0109]
[0110] where v mj , v ml , v mk Indicates the number of vertices p to be smoothed in the m-th tetrahedron i Pointing to the other three vertices p of the tetrahedron mj 、p ml 、p mk Three vectors of ;
[0111] And get the initial angle energy The Hazen matrix H k :
[0112]
[0113] where s m =(v mj -v ml )×(v mk -v ml);
[0114] Finally, the descent direction of the gradient is obtained
[0115] where g k is the angle energy The gradient direction, H k is the angle energy The Hazen matrix H of
[0116] S45: Descending direction d according to the obtained gradient k , determine the moving step length a of the point to be smoothed by linear search k , and then get the new position of the smoothed point
[0117]
[0118] in is the position of the previous step in the iteration, a k is the moving step length, d k is the descending direction of the gradient;
[0119] S46: Calculate the new position of the smoothed point Angular Energy And according to the energy convergence condition ∈ given by the user E Determine whether the angle energy converges:
[0120]
[0121] When the energy drop is less than the user-given convergence condition ∈ E , end the smoothing of the current point; otherwise, re-execute steps S42 to S46.
[0122] After the angle uniformity algorithm, we can see the distribution histogram of the unit volume in the tetrahedral grid as follows Fig.11 Compared with the volume distribution diagram after volume optimization ( Figure 8 ), the volume distribution is slightly uneven, because the angle uniform energy function does not pursue volume uniformity too much, but it is still a huge improvement compared to the volume distribution before optimization. The difference unit distribution after the angle uniform algorithm is shown in Fig.12 As shown in the figure, it can be clearly seen that the red units in the figure have been greatly reduced, and the angle uniformity algorithm has a significant effect on improving the thin elements in the grid. The dihedral angle distribution after the angle uniformity algorithm is shown in Fig.13 As shown, it can be found that both the minimum dihedral angle and the maximum dihedral angle are significantly improved, and the average minimum dihedral angle and the average maximum dihedral angle are also greatly improved.
[0123] Therefore, the angle-uniform smoothing algorithm designed in step S4 solves the problem of poor dihedral angle quality of tetrahedral elements in tetrahedral meshes, while also improving the problem of thin elements, ultimately further improving the quality of tetrahedral meshes.
[0124] Finally, after multiple iterations, we obtain the optimized mesh. From its angle distribution diagram ( Fig.13 ) shows that the optimized mesh no longer contains thin elements with a degree below 15, and its quality has been significantly improved. The final mesh is shown in Fig.14 shown.
[0125] Those skilled in the art will readily appreciate other embodiments of the present application after considering the description and practicing the contents disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The description and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.
[0126] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A tetrahedral mesh optimization method based on volume uniformity and angle uniformity, characterized in that: include: S1: Obtain the tetrahedral mesh of the initial electromagnetic device and the energy convergence condition of the user-given point smoothing algorithm; S2: updating the connection mode of the tetrahedral mesh through topological transformation; S3: Based on the volume uniform algorithm, the vertices of the tetrahedral mesh after the topological transformation are smoothed, and the volume energy of the smoothed vertices is calculated. If the volume energy does not reach the energy convergence condition of the user-given point, steps S2 and S3 are repeated. The volume uniform algorithm moves the point to be smoothed along the decreasing direction of the volume energy so that the volume of the tetrahedron containing the point to be smoothed is more uniform. S4: Based on the angle uniformity algorithm, the vertices of the tetrahedral mesh updated after the topological transformation are smoothed, and the angle energy of the smoothed vertices is calculated. If the angle energy does not reach the energy convergence condition of the user-given point, steps S2 and S4 are repeated. The angle uniformity algorithm moves the point to be smoothed along the decreasing direction of the angle energy so that the dihedral angle of the tetrahedron containing the point to be smoothed is more uniform.
2. The method according to claim 1, characterized in that The interconnection method of the tetrahedral mesh is updated through topological transformation, including: The tetrahedral mesh is traversed to find tetrahedral units with poor dihedral angle quality. First, an edge removal operation is performed on each edge of the tetrahedral unit. If the mesh connectivity cannot be improved, a face removal operation is performed on each face of the tetrahedral unit. In this process, the criterion for judging whether the mesh topology is improved is whether the minimum dihedral angle is improved.
3. The method according to claim 1, characterized in that Based on the volume uniformity algorithm, the vertices of the tetrahedral mesh updated after the topological transformation are smoothed, including: S31: Find the vertices to be smoothed in the tetrahedral mesh and traverse them; S32: Find the tetrahedral unit containing the vertex to be smoothed, and calculate the volume V of each tetrahedral unit. m ; S33: Based on the calculated volume V m , calculate the initial volume energy of the vertex to be smoothed: in represents the vertex p i At current location The energy represents the volume of the mth tetrahedron containing this vertex, ρ m is the density parameter; S34: Calculate the volume energy of the point to be smoothed based on the calculated initial volume energy The gradient direction g k : where v mj , v ml , v mk Indicates the number of vertices p to be smoothed in the m-th tetrahedron i Pointing to the other three vertices p of the tetrahedron mj 、p ml 、p mk Three vectors of ; And get the initial volume energy The Hazen matrix H k : where s m =(v mj -v ml )×(v mk -v ml ); Finally, the gradient d is obtained. k =-H k-1 g k ; where g k is the volume energy The gradient direction, H k is the volume energy The Hazen matrix H of S35: Descending direction d according to the obtained gradient k , determine the moving step length a of the point to be smoothed by linear search k , and then get the new position of the smoothed point in is the position of the previous step in the iteration, a k is the moving step length, d k is the descending direction of the gradient; S36: Calculate the new position of the smoothed point Volume energy And according to the energy convergence condition ∈ given by the user E Determine whether the volume energy converges: When the energy drop is less than the user-given convergence condition ∈ E , end the smoothing of the current point; otherwise, re-execute steps S32 to S36.
4. The method according to claim 1, characterized in that Based on the angle uniform algorithm, the vertices of the tetrahedral mesh updated after the topological transformation are smoothed, including: S41: Find the vertices to be smoothed in the tetrahedral mesh and traverse them; S42: Find the tetrahedral unit containing the vertex to be smoothed, and calculate the volume V of each tetrahedral unit. m ; S43: Calculate the initial angle energy of the vertex to be smoothed based on the calculated volume: in It means the vertex pi is at the current position The energy represents the volume of the mth tetrahedron containing this vertex, A m is the area; S44: Calculate the angle energy of the point to be smoothed based on the calculated initial angle energy The gradient direction g k : where v mj , v ml , v mk Indicates the number of vertices p to be smoothed in the m-th tetrahedron i Pointing to the other three vertices p of the tetrahedron mj 、p ml 、p mk Three vectors of ; And get the initial angle energy The Hazen matrix H k : where s m =(v mj -v ml )×(v mk -v ml ); Finally, the descent direction of the gradient is obtained where g k is the angle energy The gradient direction, H k is the angle energy The Hazen matrix H of S45: Descending direction d according to the obtained gradient k , determine the moving step length a of the point to be smoothed by linear search k , and then get the new position of the smoothed point in is the position of the previous step in the iteration, a k is the moving step length, d k is the descending direction of the gradient; S46: Calculate the new position of the smoothed point Angular Energy And according to the energy convergence condition ∈ given by the user E Determine whether the angle energy converges: When the energy drop is less than the user-given convergence condition ∈ E , end the smoothing of the current point; otherwise, re-execute steps S42 to S46.
