Electromagnetic finite element calculation method and system based on hierarchical compression
Through layered compression technology, the memory and computing bottleneck problems of large-scale sparse matrix solution in electromagnetic finite element analysis are solved, efficient electromagnetic simulation is achieved, original information is retained, and high-precision solutions are obtained.
Patent Information
- Application Number
- CN202410709612.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-08-23
AI Technical Summary
Existing electromagnetic finite element analysis methods consume a lot of computing resources and time when solving large-scale sparse matrix equations, resulting in memory and computing bottlenecks, which limits the development of electromagnetic simulation.
Using the electromagnetic finite element calculation method based on hierarchical compression, by establishing a finite element matrix model and dividing the coefficient map, the compressible coefficient subgraph matrix block is obtained, and the hierarchical compression matrix decomposition is performed, and only the compressible matrix block is subjected to LU decomposition. and trigonometric solving, reducing the consumption of memory and computing resources.
It significantly reduces the memory resources and computing resources required for solution, effectively solves storage and computing bottlenecks, improves simulation efficiency, retains the original information of the electromagnetic system, and obtains high-precision solutions.
Smart Images

Figure CN118536358A
Abstract
Description
Technical Field
[0001] The invention belongs to the field of electromagnetic technology, and in particular relates to an electromagnetic finite element calculation method and system based on layered compression. Background Art
[0002] As a classic method in computational electromagnetics, electromagnetic finite element analysis has become the main tool for analyzing electromagnetic field characteristics of complex geometric shapes and complex materials. Among them, solving the finite element matrix equation obtained by discretizing the electromagnetic system accounts for about 70%-80% of the total solution time of finite element analysis, which is the main performance bottleneck of this method. Therefore, studying efficient matrix equation analysis methods is of great significance in the field of electromagnetic simulation.
[0003] In the electromagnetic field, for large-scale system-level electromagnetic problems, the finite element electromagnetic algorithm generates a large amount of grid volume through discrete models, that is, the unknown quantity of the matrix equation, which places a very high demand on subsequent computing resources. It can be alleviated by higher-performance computing clusters, but the requirements for timeliness of electromagnetic computing are also getting higher and higher. In order to efficiently complete electromagnetic simulation with limited computing resources, efficient matrix equation solving technology is the key to solving the problem.
[0004] Existing electromagnetic finite element analysis methods use sparse matrix decomposition and sparse triangular solution methods to solve finite element matrix equations. Since large-scale sparse matrix decomposition consumes a lot of computing resources and computing time, as the complexity and electrical size of electromagnetic systems increase, the memory resources, computing resources and computing time consumed by sparse matrix storage and decomposition become increasingly unacceptable, forming memory bottlenecks and computing time bottlenecks that restrict electromagnetic finite element analysis, severely limiting the development of computational electromagnetics. Summary of the invention
[0005] The purpose of the present invention is to address the deficiencies of the above-mentioned prior art and to propose an electromagnetic finite element calculation method and system based on layered compression. The technical problem to be solved by the present invention is achieved through the following technical solutions:
[0006] The present invention provides an electromagnetic finite element calculation method based on layered compression, the electromagnetic finite element calculation method comprising:
[0007] Establishing a finite element matrix model based on the electromagnetic system model, wherein the finite element matrix model includes a coefficient matrix;
[0008] A coefficient graph is obtained according to the coefficient matrix of the finite element matrix model, and a compression result is determined according to two coefficient subgraphs obtained by segmenting the coefficient graph, and a matrix block corresponding to the coefficient subgraph whose compression result is compressible is decomposed to obtain two hierarchical compression matrices, wherein the matrix block corresponding to the coefficient subgraph is a matrix block corresponding to the coefficient subgraph mapped to the coefficient matrix, and the dimension of the hierarchical compression matrix is smaller than the dimension of the matrix block;
[0009] Obtaining a first matrix factor and a second matrix factor according to a lower triangular matrix and an upper triangular matrix obtained by performing Gaussian elimination on the hierarchical compression matrix, wherein the lower triangular matrix is a matrix composed of coefficients eliminated by Gaussian elimination, and the upper triangular matrix is a matrix composed of coefficients not eliminated in the hierarchical compression matrix;
[0010] A final result is obtained according to the first matrix factor and the second matrix factor.
[0011] In one embodiment of the present invention, a finite element matrix model is established based on an electromagnetic system model, including:
[0012] Meshing the electromagnetic system model to obtain a plurality of blocks;
[0013] Discretizing each of the divided blocks to obtain a plurality of discrete coefficients;
[0014] The finite element matrix model is obtained according to the multiple discrete coefficients.
[0015] In one embodiment of the present invention, a coefficient graph is obtained according to the coefficient matrix of the finite element matrix model, and a compression result is determined according to two coefficient sub-graphs obtained by segmenting the coefficient graph, and a matrix block corresponding to the coefficient sub-graph whose compression result is compressible is decomposed to obtain two hierarchical compression matrices, including:
[0016] Step 2.1, taking all elements on the main diagonal in the finite element matrix model as vertices and other non-zero elements in the finite element matrix model except all elements on the main diagonal as edges, to obtain a coefficient graph, wherein the main diagonal is a diagonal formed by connecting the elements in the first row and first column and the elements in the last row and last column in the finite element matrix model;
[0017] Step 2.2, dividing the coefficient graph to obtain two coefficient subgraphs, wherein the two coefficient subgraphs are not connected to each other;
[0018] Step 2.3, based on the self-distance and the spacing of the coefficient subgraph, obtaining a compression result of the coefficient subgraph, wherein the compression result includes compressible or incompressible;
[0019] Step 2.4, if the compression result of the coefficient subgraph is incompressible, determine whether the number of divisions of the coefficient subgraph is less than the maximum number of divisions. If it is less than the maximum number of divisions, jump to step 2.2 and continue to divide the coefficient subgraph in the manner of step 2.2. If it is greater than or equal to the maximum number of divisions, do not compress the matrix block corresponding to the coefficient subgraph;
[0020] Step 2.5: If the compression result of the coefficient subgraph is compressible, decompose the matrix block corresponding to the coefficient subgraph to obtain the two layered compression matrices.
[0021] In one embodiment of the present invention, the step 2.2 comprises:
[0022] The coefficient graph is segmented using a nested decomposition method to obtain two coefficient subgraphs.
[0023] In one embodiment of the present invention, the step 2.3 comprises:
[0024] Obtaining self-distances according to the number of vertices in the coefficient subgraph, and obtaining spacings according to the number of vertex clusters in the coefficient subgraph;
[0025] It is determined whether the self-distance is less than or equal to the spacing. If so, the compression result is compressible; if not, the compression result is incompressible.
[0026] In one embodiment of the present invention, obtaining the spacing according to the number of vertex clusters of the coefficient subgraph includes:
[0027] Obtain one or two vertex clusters of the coefficient subgraph;
[0028] If the number of vertex clusters in the coefficient subgraph is one, the spacing is zero. If the number of vertex clusters in the coefficient subgraph is two, the minimum distance between the edges in the edge sets of the two vertex clusters is used as the spacing, wherein the edge set is a set of edges connecting each vertex in one vertex cluster with each vertex in another vertex cluster.
[0029] In one embodiment of the present invention, the matrix block corresponding to the coefficient subgraph is decomposed to obtain the two hierarchical compression matrices, including:
[0030] The matrix block corresponding to the coefficient subgraph is decomposed by using a singular value decomposition method to obtain the two hierarchical compression matrices.
[0031] In one embodiment of the present invention, the first matrix factor and the second matrix factor are obtained according to the lower triangular matrix and the upper triangular matrix obtained by performing Gaussian elimination on the layered compressed matrix, including:
[0032] Gaussian elimination is performed on the hierarchical compression matrix using Gaussian elimination method to obtain the lower triangular matrix and the upper triangular matrix, and the lower triangular matrix is used as the first matrix factor and the upper triangular matrix is used as the second matrix factor.
[0033] In one embodiment of the present invention, obtaining a final result according to the first matrix factor and the second matrix factor includes:
[0034] Based on the back substitution method of the triangular linear equation system, the final result is obtained according to the first matrix factor and the second matrix factor.
[0035] The present invention also provides an electromagnetic finite element calculation system based on layered compression, the electromagnetic finite element calculation system comprising:
[0036] A matrix model building module, used to build a finite element matrix model based on the electromagnetic system model, wherein the finite element matrix model includes a coefficient matrix;
[0037] A hierarchical compression matrix generation module, used to obtain a coefficient graph according to the coefficient matrix of the finite element matrix model, and determine a compression result according to two coefficient subgraphs obtained by segmenting the coefficient graph, and decompose the matrix block corresponding to the coefficient subgraph whose compression result is compressible to obtain two hierarchical compression matrices, wherein the matrix block corresponding to the coefficient subgraph is the matrix block corresponding to the coefficient subgraph mapped to the coefficient matrix, and the dimension of the hierarchical compression matrix is smaller than the dimension of the matrix block;
[0038] A matrix factor generation module, used to obtain a first matrix factor and a second matrix factor according to a lower triangular matrix and an upper triangular matrix obtained by performing Gaussian elimination on the layered compressed matrix, wherein the lower triangular matrix is a matrix composed of coefficients eliminated by Gaussian elimination, and the upper triangular matrix is a matrix composed of coefficients not eliminated in the layered compressed matrix;
[0039] A result generating module is used to obtain a final result according to the first matrix factor and the second matrix factor.
[0040] Beneficial effects of the present invention:
[0041] The electromagnetic finite element calculation method provided by the present invention obtains a coefficient graph according to the coefficient matrix of the finite element matrix model, and then divides the coefficient graph into two coefficient sub-graphs, and when the compression result of the coefficient sub-graph is compressible, the matrix block corresponding to the coefficient sub-graph is decomposed to obtain a layered compressed matrix, thereby achieving the result of compressing the compressible matrix blocks and not compressing the incompressible matrix blocks. In addition, the electromagnetic finite element calculation method provided by the present invention only performs LU decomposition (i.e., matrix decomposition) and triangular solution on the layered compressed matrix obtained by layered compression, which can significantly reduce the memory resources and computing resources required for the solution, effectively solve the storage and computing bottlenecks of the existing methods, and can efficiently perform the solution, reducing the memory space and solution time consumed by the solution.
[0042] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a flow chart of an electromagnetic finite element calculation method based on layered compression provided by an embodiment of the present invention;
[0044] Figure 2 It is a structural schematic diagram of an electromagnetic finite element calculation system based on hierarchical compression provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0046] Embodiment 1
[0047] See also Figure 1 , Figure 1 1 is a flow chart of an electromagnetic finite element calculation method based on layered compression provided by an embodiment of the present invention. An electromagnetic finite element calculation method based on layered compression is provided by an embodiment of the present invention. The electromagnetic finite element calculation method includes:
[0048] Step 1: Establish a finite element matrix model based on the electromagnetic system model, where the finite element matrix model includes a coefficient matrix.
[0049] Specifically, the electromagnetic system to be analyzed is modeled, and the modeling can be performed specifically according to the geometry, material, boundary conditions and excitation of the electromagnetic system, thereby obtaining an electromagnetic system model, wherein the geometry, material, boundary conditions and excitation of the electromagnetic system are all designed according to the design requirements and will not be repeated here. After the electromagnetic system model is established, a finite element matrix model (also a finite element matrix equation) can be constructed based on the electromagnetic system model.
[0050] In an optional embodiment, step 1 may specifically include:
[0051] Step 1.1: Mesh the electromagnetic system model to obtain multiple blocks.
[0052] Optionally, the structural form of each partition block is a tetrahedron. This embodiment does not limit the specific number of partition blocks, and those skilled in the art can set it according to actual needs.
[0053] Step 1.2: Discretize each partition block to obtain multiple discrete coefficients.
[0054] Specifically, each partition block is formed by connecting multiple points. When the function values of two or more points are set to 1 and the function values of other points are set to 0, a high-order basis function of the partition block can be constructed, thereby discretizing each partition block using the high-order basis function to obtain multiple discrete coefficients. For example, in this embodiment, the function values of two or three points of the partition block are set to 1, and a high-order basis function is constructed, and the high-order basis function is a Nedelec type high-order interpolation vector basis function.
[0055] Therefore, the high-order basis functions of the partition blocks can be used to discretize the partition blocks to obtain discrete coefficients of the partition blocks.
[0056] Step 1.3: Obtain a finite element matrix model based on multiple discrete coefficients.
[0057] Specifically, a coefficient matrix is constructed from the discrete coefficients of all the divided blocks according to the arrangement of the divided blocks, so that a finite element matrix model composed of the coefficient matrix can be established.
[0058] Step 2: Obtain a coefficient graph according to the coefficient matrix of the finite element matrix model, and determine the compression result according to the two coefficient sub-graphs obtained by dividing the coefficient graph, decompose the matrix block corresponding to the compressible coefficient sub-graph whose compression result is a compressible coefficient sub-graph to obtain two hierarchical compression matrices, wherein the matrix block corresponding to the coefficient sub-graph is the matrix block corresponding to the coefficient sub-graph mapped to the coefficient matrix, the dimension of the hierarchical compression matrix is smaller than the dimension of the matrix block, and the result of multiplying the two hierarchical compression matrices is a matrix block.
[0059] Specifically, the coefficient matrix of the finite element matrix model is first converted into a coefficient graph, and then the coefficient graph is segmented to obtain two coefficient sub-graphs. Then, the compression results of the two coefficient sub-graphs are determined respectively, and the matrix blocks corresponding to the compressible coefficient sub-graphs are decomposed to obtain two hierarchical compressed matrices. Therefore, the matrix block can be expressed as the product of two hierarchical compressed matrices with smaller dimensions.
[0060] In an optional embodiment, step 2 may specifically include:
[0061] Step 2.1, take all elements on the main diagonal in the finite element matrix model as vertices, and other non-zero elements in the finite element matrix model except all elements on the main diagonal as edges, to obtain a coefficient graph, where the main diagonal is the diagonal formed by connecting the elements in the first row and first column and the elements in the last row and last column in the finite element matrix model.
[0062] Specifically, this embodiment uses all elements on the main diagonal as vertices, and then uses other non-zero elements in the finite element matrix model as edges to establish a graph, which is recorded as a coefficient graph.
[0063] Step 2.2: Split the coefficient graph to obtain two coefficient sub-graphs, where the two coefficient sub-graphs are not connected to each other.
[0064] In this embodiment, the coefficient graph is segmented using the Nested Dissection (ND) method to obtain two coefficient subgraphs. The two coefficient subgraphs are of the same or similar size and are not connected to each other, that is, when the number of vertices of the coefficient graph is an even number, the two coefficient subgraphs obtained by segmentation are of the same size, and when the number of vertices of the coefficient graph is an odd number, the number of vertices of the two coefficient subgraphs differs by one, so the sizes of the two coefficient subgraphs are similar. In this way, an incompressible large matrix block can be segmented into small matrix blocks, so that the small matrix blocks have the possibility of being compressed.
[0065] Step 2.3: Based on the self-distance and the spacing of the coefficient subgraph, a compression result of the coefficient subgraph is obtained, wherein the compression result includes compressible or incompressible.
[0066] Specifically, for each coefficient subgraph obtained in step 2.2, the compression result is obtained through the self-distance and spacing of each coefficient subgraph. If the compression result is incompressible, step 2.4 is executed; if the compression result is compressible, step 2.5 is executed.
[0067] Step 2.31, obtain the self-distance according to the number of vertices in the coefficient subgraph, and obtain the spacing according to the number of vertex clusters in the coefficient subgraph.
[0068] Specifically, the number of vertices in the coefficient subgraph is recorded as the self-distance; the number of vertex clusters in the coefficient subgraph can be one or two, because the separation of the coefficient subgraph obtained by nested decomposition is continuous, so after cutting, either one group of continuous vertices or two groups of separated vertices are obtained, so the spacing can be determined according to the number of vertex clusters in the coefficient subgraph. Among them, the vertex cluster is a cluster composed of vertices connected by serial numbers, for example, vertex 1 and vertex 2 form a vertex cluster, and vertex 4 and vertex 5 form a vertex cluster.
[0069] In this embodiment, the spacing is obtained according to the number of vertex clusters of the coefficient subgraph, including:
[0070] S1. Get one or two vertex clusters of the coefficient subgraph.
[0071] S2. If the number of vertex clusters in the coefficient subgraph is one, the spacing is zero. If the number of vertex clusters in the coefficient subgraph is two, the minimum distance between the edges in the edge sets of the two vertex clusters is taken as the spacing, where the edge set is a set of edges connecting each vertex in one vertex cluster to each vertex in another vertex cluster.
[0072] Step 2.32: Determine whether the self-distance is less than or equal to the spacing. If so, the compression result is compressible; if not, the compression result is incompressible.
[0073] The main purpose of step 2.32 of this embodiment is to measure the possibility of compression. When the self-distance is less than or equal to the spacing, the possibility of compression is high, otherwise, the possibility of compression is low.
[0074] Step 2.4: If the compression result of the coefficient subgraph is incompressible, determine whether the number of divisions of the coefficient subgraph is less than the maximum number of divisions. If it is less than the maximum number of divisions, jump to step 2.2 and continue to divide the coefficient subgraph in the manner of step 2.2. If it is greater than or equal to the maximum number of divisions, do not compress the matrix block corresponding to the coefficient subgraph.
[0075] Specifically, for each coefficient subgraph, if step 2.3 determines that the compression result of the coefficient subgraph is incompressible, it is necessary to further determine whether the number of divisions of the coefficient subgraph is less than the maximum number of divisions. If it is less than the maximum number of divisions, jump to step 2.2, continue to divide the coefficient subgraph again in the manner of step 2.2, and continue to execute according to the subsequent steps. If the number of divisions of the coefficient subgraph is greater than or equal to the maximum number of divisions, it means that the coefficient subgraph cannot be further divided, and the processing of the coefficient subgraph is stopped. For example, the maximum number of divisions is 5 times.
[0076] Step 2.5: If the compression result of the coefficient subgraph is compressible, the matrix block corresponding to the coefficient subgraph is decomposed to obtain two hierarchical compression matrices.
[0077] In this embodiment, the matrix block corresponding to the coefficient subgraph is decomposed using a singular value decomposition (SVD) method to obtain two hierarchical compression matrices.
[0078] Step 3: Obtain a first matrix factor and a second matrix factor based on a lower triangular matrix and an upper triangular matrix obtained by performing Gaussian elimination on the layered compressed matrix, wherein the lower triangular matrix is a matrix composed of coefficients eliminated by Gaussian elimination, and the upper triangular matrix is a matrix composed of coefficients not eliminated in the layered compressed matrix.
[0079] Specifically, Gaussian elimination is performed on the hierarchical compression matrix using Gaussian elimination to obtain a lower triangular matrix and an upper triangular matrix. The lower triangular matrix is used as the first matrix factor, and the upper triangular matrix is used as the second matrix factor. The first matrix factor is denoted as L, and the second matrix factor is denoted as U. At this time, A=LU, and A is the hierarchical compression matrix.
[0080] Step 4: Obtain the final result according to the first matrix factor and the second matrix factor.
[0081] In this embodiment, based on the back-substitution method of the triangular linear equations, the final result is obtained according to the first matrix factor and the second matrix factor.
[0082] Specifically, the finite element matrix model is expressed as b=Dx, where b is the left-hand term of the finite element matrix model, D is the coefficient matrix, and x is the required solution. The back substitution method of the triangular linear equations is used to solve Ly=b and Ux=y respectively, where y is the intermediate variable. The solution x of the finite element matrix model can be obtained, which is the final result. The solution of the finite element matrix model can then be used to draw the radiation pattern of the electromagnetic system.
[0083] At present, there is a sparse matrix compression and decomposition method based on sparse matrix block low-rank compression (BLR, Block Low-Rank Representations) in the prior art, which can significantly reduce the memory resources and computing resources required for solving, and greatly improve the solving efficiency. However, the sparse matrix block low-rank compression method needs to compress each matrix block of the finite element matrix model, and when compressing the incompressible full-rank matrix block in the finite element matrix model, the coefficient matrix will lose the original information of the electromagnetic system, so that the method cannot obtain the correct solution. In practice, the phenomenon of being unable to use due to incorrect simulation results often occurs. The method provided by the present invention obtains a coefficient graph according to the coefficient matrix of the finite element matrix model, and then divides the coefficient graph to obtain two coefficient sub-graphs, and when the compression result of the coefficient sub-graph is compressible, the matrix block corresponding to the coefficient sub-graph is decomposed to obtain a layered compressed matrix, and when the compression result is incompressible and the number of divisions has not reached the maximum number of divisions, the coefficient sub-graph will continue to be divided, so as to achieve the result of compressing the compressible matrix block and not compressing the incompressible matrix block. Therefore, the present invention can retain all original information of the electromagnetic system in the form of layered compression without causing information loss, thereby reducing the solution time and obtaining an accurate solution.
[0084] The present invention only performs LU decomposition and triangular solution on the layered compressed matrix obtained through layered compression, which can significantly reduce the memory resources and computing resources required for the solution, effectively solve the storage and computing bottlenecks of the existing methods, and can efficiently perform the solution, reduce the memory space and solution time consumed by the solution, so that electromagnetic finite element analysis can be simulated with high precision.
[0085] Embodiment 2
[0086] See also Figure 2 , Figure 2 is a structural schematic diagram of an electromagnetic finite element calculation system based on hierarchical compression provided in an embodiment of the present invention. An electromagnetic finite element calculation system based on hierarchical compression is provided in an embodiment of the present invention, and is used to implement the electromagnetic finite element calculation method provided in Embodiment 1. The electromagnetic finite element calculation system includes:
[0087] A matrix model building module is used to build a finite element matrix model based on the electromagnetic system model, and the finite element matrix model includes a coefficient matrix;
[0088] A hierarchical compression matrix generation module is used to obtain a coefficient graph according to a coefficient matrix of a finite element matrix model, and determine a compression result according to two coefficient subgraphs obtained by segmenting the coefficient graph, and decompose a matrix block corresponding to a compressible coefficient subgraph whose compression result is a compressible coefficient subgraph to obtain two hierarchical compression matrices, wherein the matrix block corresponding to the coefficient subgraph is a matrix block corresponding to the mapping of the coefficient subgraph to the coefficient matrix, and the dimension of the hierarchical compression matrix is smaller than the dimension of the matrix block;
[0089] A matrix factor generation module, used for obtaining a first matrix factor and a second matrix factor according to a lower triangular matrix and an upper triangular matrix obtained by performing Gaussian elimination on the hierarchical compression matrix, wherein the lower triangular matrix is a matrix composed of coefficients eliminated by Gaussian elimination, and the upper triangular matrix is a matrix composed of coefficients not eliminated in the hierarchical compression matrix;
[0090] A result generating module is used to obtain a final result according to the first matrix factor and the second matrix factor.
[0091] The electromagnetic finite element calculation system provided in this embodiment has similar implementation principles and technical effects to the electromagnetic finite element calculation method provided in the first embodiment, and will not be described in detail here.
[0092] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0093] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification.
[0094] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. An electromagnetic finite element calculation method based on layered compression, characterized in that: The electromagnetic finite element calculation method comprises: Establishing a finite element matrix model based on the electromagnetic system model, wherein the finite element matrix model includes a coefficient matrix; A coefficient graph is obtained according to the coefficient matrix of the finite element matrix model, and a compression result is determined according to two coefficient subgraphs obtained by segmenting the coefficient graph, and a matrix block corresponding to the coefficient subgraph whose compression result is compressible is decomposed to obtain two hierarchical compression matrices, wherein the matrix block corresponding to the coefficient subgraph is a matrix block corresponding to the coefficient subgraph mapped to the coefficient matrix, and the dimension of the hierarchical compression matrix is smaller than the dimension of the matrix block; Obtaining a first matrix factor and a second matrix factor according to a lower triangular matrix and an upper triangular matrix obtained by performing Gaussian elimination on the hierarchical compression matrix, wherein the lower triangular matrix is a matrix composed of coefficients eliminated by Gaussian elimination, and the upper triangular matrix is a matrix composed of coefficients not eliminated in the hierarchical compression matrix; A final result is obtained according to the first matrix factor and the second matrix factor.
2. The electromagnetic finite element calculation method based on layered compression according to claim 1 is characterized in that: Establish a finite element matrix model based on the electromagnetic system model, including: Meshing the electromagnetic system model to obtain a plurality of partition blocks; Discretizing each of the divided blocks to obtain a plurality of discrete coefficients; The finite element matrix model is obtained according to the multiple discrete coefficients.
3. The electromagnetic finite element calculation method based on layered compression according to claim 1 is characterized in that: A coefficient graph is obtained according to the coefficient matrix of the finite element matrix model, and a compression result is determined according to two coefficient subgraphs obtained by dividing the coefficient graph, and a matrix block corresponding to the coefficient subgraph whose compression result is compressible is decomposed to obtain two hierarchical compression matrices, including: Step 2.1, taking all elements on the main diagonal in the finite element matrix model as vertices and other non-zero elements in the finite element matrix model except all elements on the main diagonal as edges, to obtain a coefficient graph, wherein the main diagonal is a diagonal formed by connecting the elements in the first row and first column and the elements in the last row and last column in the finite element matrix model; Step 2.2, dividing the coefficient graph to obtain two coefficient subgraphs, wherein the two coefficient subgraphs are not connected to each other; Step 2.3, based on the self-distance and the spacing of the coefficient subgraph, obtaining a compression result of the coefficient subgraph, wherein the compression result includes compressible or incompressible; Step 2.4, if the compression result of the coefficient subgraph is incompressible, determine whether the number of divisions of the coefficient subgraph is less than the maximum number of divisions. If it is less than the maximum number of divisions, jump to step 2.2 and continue to divide the coefficient subgraph in the manner of step 2.
2. If it is greater than or equal to the maximum number of divisions, do not compress the matrix block corresponding to the coefficient subgraph; Step 2.5: If the compression result of the coefficient subgraph is compressible, decompose the matrix block corresponding to the coefficient subgraph to obtain the two layered compression matrices.
4. The electromagnetic finite element calculation method based on layered compression according to claim 3 is characterized in that: The step 2.2 comprises: The coefficient graph is segmented using a nested decomposition method to obtain two coefficient subgraphs.
5. The electromagnetic finite element calculation method based on layered compression according to claim 3 is characterized in that: The step 2.3 comprises: Obtaining self-distances according to the number of vertices in the coefficient subgraph, and obtaining spacings according to the number of vertex clusters in the coefficient subgraph; It is determined whether the self-distance is less than or equal to the spacing. If so, the compression result is compressible; if not, the compression result is incompressible.
6. The electromagnetic finite element calculation method based on layered compression according to claim 5 is characterized in that: The spacing is obtained according to the number of vertex clusters of the coefficient subgraph, including: Obtain one or two vertex clusters of the coefficient subgraph; If the number of vertex clusters in the coefficient subgraph is one, the spacing is zero. If the number of vertex clusters in the coefficient subgraph is two, the minimum distance between the edges in the edge sets of the two vertex clusters is used as the spacing, wherein the edge set is a set of edges connecting each vertex in one vertex cluster with each vertex in another vertex cluster.
7. The electromagnetic finite element calculation method based on layered compression according to claim 3 is characterized in that: Decomposing the matrix block corresponding to the coefficient subgraph to obtain the two hierarchical compression matrices, including: The matrix block corresponding to the coefficient subgraph is decomposed by using a singular value decomposition method to obtain the two hierarchical compression matrices.
8. The electromagnetic finite element calculation method based on layered compression according to claim 1 is characterized in that: According to the lower triangular matrix and the upper triangular matrix obtained by performing Gaussian elimination on the hierarchical compression matrix, a first matrix factor and a second matrix factor are obtained, including: Gaussian elimination is performed on the hierarchical compression matrix using Gaussian elimination method to obtain the lower triangular matrix and the upper triangular matrix, and the lower triangular matrix is used as the first matrix factor and the upper triangular matrix is used as the second matrix factor.
9. The electromagnetic finite element calculation method based on layered compression according to claim 1 is characterized in that: Obtaining a final result according to the first matrix factor and the second matrix factor includes: Based on the back substitution method of the triangular linear equation system, the final result is obtained according to the first matrix factor and the second matrix factor.
10. An electromagnetic finite element calculation system based on hierarchical compression, characterized in that: The electromagnetic finite element calculation system comprises: A matrix model building module, used to build a finite element matrix model based on the electromagnetic system model, wherein the finite element matrix model includes a coefficient matrix; A hierarchical compression matrix generation module, used to obtain a coefficient graph according to the coefficient matrix of the finite element matrix model, and determine a compression result according to two coefficient subgraphs obtained by segmenting the coefficient graph, and decompose the matrix block corresponding to the coefficient subgraph whose compression result is compressible to obtain two hierarchical compression matrices, wherein the matrix block corresponding to the coefficient subgraph is the matrix block corresponding to the coefficient subgraph mapped to the coefficient matrix, and the dimension of the hierarchical compression matrix is smaller than the dimension of the matrix block; A matrix factor generation module, used to obtain a first matrix factor and a second matrix factor according to a lower triangular matrix and an upper triangular matrix obtained by performing Gaussian elimination on the layered compressed matrix, wherein the lower triangular matrix is a matrix composed of coefficients eliminated by Gaussian elimination, and the upper triangular matrix is a matrix composed of coefficients not eliminated in the layered compressed matrix; A result generating module is used to obtain a final result according to the first matrix factor and the second matrix factor.
