A large sparse matrix acceleration solving method, system and storage medium

By restoring the port node connection relationships and using undirected graph decomposition techniques, the problem of low efficiency in sparse matrix solving is solved, realizing an efficient sparse matrix solving method suitable for circuit and electromagnetic field analysis in EDA simulation tools.

CN115167813BActive Publication Date: 2026-04-28XPEEDIC CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XPEEDIC CO LTD
Filing Date
2022-07-06
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing technologies in EDA simulation tools are slow and inaccurate in solving large sparse matrices, especially when dealing with high-frequency electromagnetic field analysis and complex chip structures, resulting in high computational complexity and excessively long computation time.

Method used

By restoring the connection relationships of the port nodes, the initial finite element matrix is ​​transformed into an unorientable graph, and then optimally decomposed, renumbered, and reordered to generate the final finite element matrix. Parallel solution technology is used to improve the solution efficiency.

Benefits of technology

While maintaining accuracy, it significantly improves the efficiency of sparse matrix solving, simplifies the operation process, and is suitable for complex circuit and electromagnetic field analysis in the EDA industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115167813B_ABST
    Figure CN115167813B_ABST
Patent Text Reader

Abstract

The application discloses a large sparse matrix accelerated solving method and system and a storage medium, and belongs to the field of electromagnetism calculation. In view of the problems of slow solving efficiency and poor accuracy of the existing large sparse matrix, the application provides a large sparse matrix accelerated solving method, which comprises the following steps: connecting the connection relationship of a reduced port node to an initial finite element matrix to obtain a reduced secondary finite element matrix; converting the secondary finite element matrix into an undirected graph; decomposing the undirected graph and selecting an optimal decomposition through an evaluation function; renumbering the nodes of the secondary finite element matrix according to the optimal decomposition; reordering the secondary finite element matrix according to the renumbering of the nodes to generate a new final finite element matrix; and solving the final finite element matrix. The application guarantees the subsequent solving accuracy by connecting the connection relationship of the reduced port node, and the optimal decomposition is obtained by decomposing the matrix converted into the undirected graph, and the subsequent operation is performed according to the optimal decomposition to improve the matrix solving speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computational electromagnetics technology, and more specifically, relates to a method, system and storage medium for accelerating the solution of large sparse matrices. Background Technology

[0002] Modern EDA simulation tools, whether for circuit analysis or 3D electromagnetic field analysis, face the problem of decreasing computation speed as the simulation scale increases. For circuit problems, the slowdown stems from the massive number of voltage nodes and branch current nodes in complex circuits; for 3D electromagnetic field problems, especially with finite element analysis, the slowdown arises from the dense mesh size. Mathematically, a large number of voltage and current nodes, or a dense mesh size, corresponds to a very large-dimensional sparse matrix. How to quickly and efficiently solve large-scale sparse matrices while maintaining computational accuracy is a common challenge in the modern EDA industry. The traditional approach is to write more efficient sparse matrix solvers, such as well-known matrix solver software like Umfpack, Pardiso, and KLU. Using these matrix solvers to solve large-scale matrices is far more computationally efficient than writing custom programs. However, these general-purpose matrix solvers are not adept at handling specific problems encountered in the EDA industry, such as analyzing nonlinear circuits with ibis models or analyzing DC voltages on circuit boards. The former, due to nonlinear effects, requires large matrix inversion at every time step during computation, while the latter can strictly decouple large matrices by considering the power plane and ground plane separately. These are problems that traditional matrix solvers cannot solve, necessitating new approaches and methods.

[0003] In the EDA industry, the commonly used computational methods utilize 3D electromagnetic field theory and finite element methods to analyze signal / power integrity and electromagnetic compatibility issues of chips / packages / boards. These methods are highly effective and mature, with tools like Ansys' HFSS and Cadance's Clerity3D employing finite element methods for 3D electromagnetic field calculation and analysis. However, as signal operating frequencies increase, chip dimensions shrink, and internal chip structures become more complex, commercial EDA simulation tools face increasing computational complexity when dealing with these problems. This is due to the high-resolution mesh requirements of 3D modeling, which raises the number of unknowns in the mesh from tens of thousands to hundreds of thousands, and even millions. In such cases, matrix solving becomes significantly slower. Engineers often have to wait several days or even weeks for a single calculation result, a severe time-consuming issue that poses a significant problem for EDA designers and chip design and manufacturing companies.

[0004] To address the aforementioned issues, corresponding improvements have been made. For example, Chinese patent application CN202110024925.X, published on April 30, 2021, discloses a method for accelerating sparse matrix computation. This method first reads the first sparse matrix to be multiplied, performs non-zero detection on the first sparse matrix, and generates first state information for each row of data in the first sparse matrix based on the detection results, storing it in a register; and stores the detected non-zero data of the first sparse matrix in RAM. Then, it reads the second sparse matrix to be multiplied, performs non-zero detection on the second sparse matrix, and generates second state information for each column of data in the second sparse matrix based on the detection results, storing it in a register. Finally, it performs logical operations on the first and second state information, reads the data from RAM based on the logical operation results, and multiplies it with the data of the second sparse matrix to obtain the product matrix data. The drawback of this patent is that while it reduces the amount of data read during computation, thus accelerating processing speed, it cannot adequately meet the required processing accuracy. Summary of the Invention

[0005] 1. The problem to be solved

[0006] To address the problems of slow efficiency and poor accuracy in solving large sparse matrices using existing methods, this invention provides a method, system, and storage medium for accelerating the solution of large sparse matrices. The method of this invention ensures the accuracy of subsequent solutions by restoring the connection relationships between port nodes. It obtains the optimal decomposition by transforming the matrix into an unoriented graph and performing subsequent operations according to the optimal decomposition, which greatly improves the matrix solution speed. The system structure of this invention is simple, achieving a good balance between accuracy and efficiency.

[0007] 2. Technical Solution

[0008] To solve the above problems, the present invention adopts the following technical solution.

[0009] A method for accelerating the solution of large sparse matrices includes the following steps:

[0010] S1: Restore the connection relationship of the port nodes in the initial finite element matrix to obtain the restored quadratic finite element matrix;

[0011] S2: Transform the quadratic finite element matrix into an unoriented graph;

[0012] S3: Decompose the unorienting graph and select the optimal decomposition using an evaluation function;

[0013] S4: Renumber the nodes of the quadratic finite element matrix according to the optimal decomposition;

[0014] S5: Reorder the quadratic finite element matrix according to the renumbering of the nodes to generate a new final finite element matrix;

[0015] S6: Solve for the final finite element matrix.

[0016] Furthermore, the specific steps in step S2 are as follows:

[0017] S21: Define two new data structures: nodes and edges. A node is the node corresponding to the column containing a non-zero element, and the row is the row containing the non-zero element. An edge is the edge formed by the nodes corresponding to the columns containing non-zero elements.

[0018] S22: Map each non-zero element in each row of the quadratic finite element matrix to a connection between points;

[0019] S23: Every two points correspond to an undirected edge;

[0020] S24: Repeat steps S22-S23 in sequence until all non-zero elements in each row of the quadratic finite element matrix are connected, and finally generate an unoriented graph.

[0021] Furthermore, the evaluation function in step S3 is defined as follows: For a matrix, it is decomposed into N submatrices, where N is a multiple of 2. The coupling coefficient S of the submatrices is the dimension of the coupling matrix divided by the average dimension of the submatrices. The optimal decomposition is the number of blocks corresponding to the minimum coupling coefficient.

[0022] Furthermore, in step S3, the Metis program is used to decompose the unorienting graph.

[0023] Furthermore, the source of the initial finite element matrix in step S1 is: by reading the mesh file, using the mesh to perform finite element numerical modeling and create the matrix.

[0024] Furthermore, in step S1, while generating the initial finite element matrix, the connection relationship between the port node and other mesh nodes is backed up in advance.

[0025] A system that applies any of the above-mentioned methods for accelerating the solution of large sparse matrices includes:

[0026] Restoration module: used to restore the port node connection relationship of the initial finite element matrix to obtain a quadratic finite element matrix;

[0027] Conversion module: Used to convert a quadratic finite element matrix into an unoriented graph;

[0028] Decomposition module: Used to decompose unoriented graphs and obtain the optimal decomposition;

[0029] Renumbering module: Used to renumber the nodes of the quadratic finite element matrix based on the optimal decomposition in the decomposition module;

[0030] Reordering module: Used to reorder the quadratic finite element matrix based on the renumbering of nodes in the renumbering module, and generate the final finite element matrix;

[0031] Solver module: Used to solve the final finite element matrix in the reordering module.

[0032] Control module: Used to control the operation of each module.

[0033] A computer-readable storage medium storing a computer program that, when executed by a processor, performs any of the methods described above.

[0034] 3. Beneficial effects

[0035] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0036] (1) When solving large sparse matrices, this invention first restores the port node connection relationship of the initial finite element matrix, ensuring the completeness of the matrix topology and providing high accuracy and completeness support for subsequent steps, thereby ensuring the accuracy of the entire process. Secondly, by converting the quadratic finite element matrix into an unoriented graph and then decomposing it, the cost and efficiency problems caused by directly decomposing the mesh file in the past are changed. Furthermore, the nodes of the quadratic finite element matrix are renumbered according to the optimal decomposition and a new final finite element matrix is ​​generated, avoiding the appearance of an excessively large coupling matrix in the new final finite element matrix, further accelerating the matrix solution speed. Finally, the final finite element matrix is ​​solved in parallel, which further improves the solution speed. The whole method can significantly improve the solution efficiency while ensuring the solution accuracy, and it is simple to operate and easy to implement, and can be widely used in the EDA industry.

[0037] (2) This invention defines two new data structures, points and edges, and scans each row of the quadratic finite element matrix to obtain the relationship between all points and edges, generating an undirected graph. Then, the undirected graph is decomposed to obtain the optimal decomposition, which improves efficiency. This is a change from the previous method of directly decomposing the finite element mesh file, which required the program to establish I / O communication with the disk and incurred additional overhead in addition to reading the finite element mesh file. Furthermore, the optimal decomposition is selected by choosing the number of blocks corresponding to the smallest coupling coefficient in the evaluation function. This optimal decomposition scheme has better applicability to nonlinear matrices and greatly helps to improve the efficiency of subsequent calculations.

[0038] (3) The system of the present invention converts the node connection relationship of the initial finite element matrix into an unoriented graph, then decomposes the unoriented graph to obtain the optimal decomposition, renumbers the nodes in the quadratic finite element matrix according to the optimal decomposition, and reorders the matrix according to the renumbering to finally achieve the solution; while ensuring accuracy, it improves efficiency. Each module works independently while cooperating with each other. The structure is simple and easy to control. Attached Figure Description

[0039] Figure 1 This is a schematic diagram of the process of the present invention;

[0040] Figure 2 This is a topological diagram of the original matrix;

[0041] Figure 3 This is a topological diagram of the matrix after partitioning.

[0042] Figure 4 A schematic diagram for solving large system matrices;

[0043] Figure 5 This is a schematic diagram of matrix solving after block partitioning;

[0044] Figure 6 A schematic diagram to reconstruct the connection relationship between port nodes;

[0045] Figure 7 This is a schematic diagram for converting the graph into an unorientable graph;

[0046] Figure 8 This is a schematic diagram of the transformation of the final finite element matrix. Detailed Implementation

[0047] The present invention will now be further described with reference to specific embodiments and accompanying drawings.

[0048] In the EDA industry, as signal operating frequencies increase, chip sizes shrink, and internal chip structures become more complex, the number of unknowns corresponding to the mesh increases from tens of thousands to hundreds of thousands, and even millions. Under these circumstances, matrix solving becomes much slower. This application addresses this issue by combining the characteristics of EDA circuit / electromagnetic field analysis with the full information of a sparse matrix to reconstruct the circuit / mesh topology and connectivity. Then, graph decomposition techniques are used to partition the topology corresponding to the matrix, and the partitioned graphs are rearranged to generate a matrix with a special pattern, generally called a striped edged sparse matrix. Finally, mathematical knowledge is used to solve this coefficient matrix in parallel, thus solving the industry problem of slow computation speed for large-scale matrices. For a sparse matrix of dimension n (n is usually hundreds of thousands or millions), by dividing the matrix into k submatrices, each of dimension p, these k submatrices are coupled through a matrix of dimension m. For k submatrices, the computational cost of matrix inversion (multiplication and division) is approximately k*p^3; for a coupled matrix, the computational cost is approximately m^3. The total computational cost of the partitioned matrix is ​​approximately k*p^3 + m^3, where k*p + m = n. When the matrix dimension n is large, if the partitioned matrix satisfies p >> m, then the computational cost of the partitioned matrix k*p^3 + m^3 is approximately equal to k*p^3, and the computational cost of the unpartitioned matrix (k*p + m)^3 is approximately equal to (k*p)^3. It can be seen that (k*p)^3 is much larger than k*p^3! Furthermore, considering that the inversion operations of each submatrix can be performed in parallel, the partitioned matrix is ​​far more efficient than the unpartitioned matrix in terms of both computational cost and time. Please refer to the following section for the specific solution of this application.

[0049] Example 1

[0050] like Figure 1 As shown, a method for accelerating the solution of large sparse matrices includes the following steps:

[0051] S1: Reconstruct the connection relationships of the port nodes in the initial finite element matrix to obtain the reconstructed quadratic finite element matrix; specifically: such as... Figure 6 As shown, Figure 6In the diagram, 'a' on the left represents the initial finite element matrix. The row containing the port nodes in this initial finite element matrix contains only one non-zero element (i.e., the fifth row of matrix 'a' contains the port nodes), hiding the connection relationships between the port nodes and other nodes. This makes it impossible to obtain the connection relationships between the port nodes and other mesh nodes through the non-zero elements in the port node row. Since subsequent steps in this application involve decomposition and partitioning, if the connection relationships between the port nodes and other nodes in the matrix are not restored, the matrix's connection relationships will be incomplete. This will lead to pseudo-decomposition or decomposition errors during subsequent decomposition steps. Pseudo-decomposition will result in differences in the condition numbers of the submatrices after partitioning, affecting the accuracy of the calculation results. Therefore, this step restores the connection relationships between the port nodes and other nodes in the initial finite element matrix, thus obtaining... Figure 6 In Figure b on the right, b represents the restored quadratic finite element matrix. Figure b shows that at this point, there is a non-zero element 1 on each side of the fifth row port node, indicating that port node 5 is connected to mesh nodes 3 and 7. Furthermore, the restoration in this step involves backing up the connection relationships between port nodes and other mesh nodes while simultaneously generating the initial finite element matrix, without altering the initial finite element matrix, making the operation convenient. The initial finite element matrix can be obtained by reading and parsing the mesh file of the chip structure, using the mesh for finite element numerical modeling, and creating the matrix. The topological relationship of the initial finite element matrix is ​​as follows: Figure 2 As shown, since using meshes to construct finite element numerical models and create matrices is common in existing technologies, please refer to "Finite Element Method for Electromagnetic Fields" for details. It is not a core improvement point of this application, so this application will not elaborate on it in detail.

[0052] S2: Transform the quadratic finite element matrix into a non-directional graph, as shown below. Figure 7 As shown; specifically, this step includes the following steps:

[0053] S21: Define two new data structures: nodes and edges. A node is the node corresponding to the column containing a non-zero element, and the row is the row containing the non-zero element. An edge is the edge formed by the nodes corresponding to the columns containing non-zero elements.

[0054] S22: The quadratic finite element matrix ( Figure 7 In the left side of the middle section (a), each non-zero element is mapped to a connection between points;

[0055] S23: Every two points correspond to an undirected edge;

[0056] S24: Repeat steps S22-S23 until all non-zero elements in each row of the quadratic finite element matrix are connected. These relationships between points and edges are then used to generate an undirected graph (e.g., ...). Figure 7As shown in the right-hand side b, b represents the data structure of an undirected graph (the red numbers represent the nodes that are restored and connected to the port nodes); specifically, according to Figure 7 As shown, each row corresponds to a point I, and the non-zero element of each row (assuming they are all 1) corresponds to a point J that is connected to point I. By combining two vector types, V and E can completely represent how many points there are in the matrix or graph, and how the points are connected. Since the connection between I and J and the connection between J and I are recorded twice, they are undirected. Therefore, the set formed by V and E is an undirected graph.

[0057] S3: Decompose the unoriented graph and select the optimal decomposition using an evaluation function. It's important to note that traditional methods directly decompose the mesh file, which is typically stored on disk and needs to be read into memory by the graph decomposition program for processing. The decomposition result is then saved as a new file. This method requires I / O communication between the graph decomposition program and the disk, incurring additional overhead beyond reading the mesh file. This application departs from this traditional approach. This step starts from the matrix already constructed in the mesh file. By restoring the connection relationships of the port nodes in the initial finite element matrix, a quadratic finite element matrix is ​​obtained, ensuring the completeness of the quadratic finite element matrix topology. This application does not directly decompose the mesh file but converts the quadratic finite element matrix into an unoriented graph before decomposing it, avoiding the additional overhead of reading and writing mesh files to the disk. Furthermore, this step uses the Metis program for unoriented graph decomposition, which offers high decomposition accuracy and is a mature technology.

[0058] In this step, an evaluation function is used for optimal decomposition. The evaluation function allows the decomposition program to automatically determine the optimal decomposition result, breaking it down into the most appropriate number of submatrices. This avoids the problem of excessively large coupling matrices in the new matrix during subsequent processes, thereby accelerating the efficiency of parallel matrix computation. Specifically, the evaluation function is defined as follows: For a matrix (in this example, a quadratic finite element matrix), it is decomposed into N submatrices, where N is a multiple of 2. The coupling coefficient S of the submatrices is the dimension of the coupling matrix divided by the average dimension of the submatrices. The optimal decomposition is the number of blocks corresponding to the minimum coupling coefficient. This approach is more applicable to nonlinear matrices and significantly improves the efficiency of subsequent computations.

[0059] S4: Renumber the nodes of the quadratic finite element matrix according to the optimal decomposition. Specifically, the nodes of the quadratic finite element matrix are renumbered according to different partitions using the optimal decomposition scheme. That is, the node coordinates (I,J) of the newly generated matrix correspond to the node coordinates (i,j) of the original matrix, and a set of node mappings is established. For example, the original numbering of the quadratic finite element matrix is ​​1,2,3,4,5,6,7,8,9,10,11,12; after the optimal decomposition, the numbering of the new matrix is ​​1,2,3,11,6,7,8,9,10,12,4,5. The new numbering can be used to quickly regenerate the block matrix.

[0060] Specifically, step S4 can be described with an example. For instance, suppose the dimension of the quadratic finite element matrix is ​​12, that is, from... Figure 8 To understand this, there are 12 nodes. Assuming the initial numbering is sequential ({1,2,3,4,5,6,7,8,9,10,11,12}), if the optimal decomposition in step S3 is 2, then the result could be {111222222111}. In the decomposition result, '1' in parentheses indicates the node should be in the first block, and '2' indicates the node is in the second block. It can be seen that the third and fourth nodes are in different blocks, and the ninth and tenth nodes are in different blocks. Randomly selecting one node from the third and fourth nodes, and from the ninth and tenth nodes (choosing the node with the smaller node number), and considering it a node in the coupling matrix, and then reordering them, we can obtain the new optimal decomposition numbering: {1,2,3,11,6,7,8,9,10,12,4,5}.

[0061] S5: Reorder the quadratic finite element matrix according to the renumbered nodes (i.e., the new node numbers) to generate a new final finite element matrix, as shown below. Figure 3 As shown, the original quadratic finite element matrix is ​​reordered by renumbering the nodes to generate a new block matrix (i.e., the final finite element matrix). Then, the right-hand side terms corresponding to the excitation ends are reordered using the new nodes. A parallel solution scheme is employed for both the block matrix and the right-hand side terms. Specifically, in finite element analysis and numerical solution, the most important task is solving the equation Ax = b. Here, A is an N x N square matrix; for finite element problems, A is a sparse matrix, x is an N x 1 unknown column vector, and b represents an N x 1 excitation vector, also called the right-hand side term or right-hand term vector. When the value of N is very large, such as exceeding 1 million, directly solving for the unknown x using a commercial matrix solver becomes very slow. Figure 4 and Figure 5 The matrix models before and after partitioning are given respectively. By utilizing the matrix characteristics after partitioning, the matrix solution speed can be accelerated. Figure 4This is a schematic diagram illustrating Ax = b, where A represents a large sparse matrix; x represents an unknown quantity; and b is the right-hand side term. Figure 4 This is a schematic diagram of the partitioned matrix and the equation Ax = b. In the diagram, A1, A2, A3, and A4 represent the partitioned submatrices; A5 is the coupling matrix; E i (i = 1, 2, 3, 4) and F i (i = 1, 2, 3, 4) is used to describe the coupling between submatrices A1, A2, A3, A4 and the matrix; x i (i = 1, 2, 3, 4) correspond to the unknowns after block division; b i (i = 1, 2, 3, 4) For the right-hand side of the block, the matrix after the block can be solved in parallel for each submatrix A1, A2, A3, A4, which greatly improves the computational efficiency.

[0062] Depend on Figure 2 and Figure 3 It can be seen that before partitioning, the matrix elements are arranged randomly; after partitioning, the matrix elements are divided into 4 blocks, and the coupling of each block is arranged to... Figure 3 In the top-right submatrix, each submatrix after partitioning has fewer matrix elements, requiring fewer multiplication and division operations for solving. Combined with multi-threaded parallelism, this significantly accelerates the solution process. Furthermore, regenerating the matrix based on the new node numbers eliminates the need to rewrite the matrix and allows for faster rearrangement, avoiding the previous method of generating matrices using new grid data. Figure 8 As shown, Figure 8 The left part 'a' represents the quadratic finite element matrix, and the right part 'b' represents the new final finite element matrix. The final finite element matrix has the property of DBBD (double-bored block diagonal).

[0063] S6: Solve the final finite element matrix. Since the final finite element matrix has the properties of DBBD, it can be solved in parallel. For specific solution methods, refer to relevant literature, such as: [1]: Stabilizedborded block diagonalforms for parallel sparse solver. Parallel Computing. 31 (2005) 275-289; [2]: Parallel direct methods for Block-Diagonal-Boardered sparsematrices. ResearchGate / 2296092.

[0064] The method of this invention restores the port node connection relationships of the initial matrix, providing high-precision and complete support for subsequent steps, avoiding the emergence of submatrices with condition number differences, and ensuring matrix solution accuracy. Secondly, by converting the quadratic finite element matrix into an unoriented graph and then decomposing it, the cost and efficiency problems caused by directly decomposing the mesh file in the past are avoided. Furthermore, based on the optimal decomposition, the nodes of the quadratic finite element matrix are renumbered to generate a new final finite element matrix, avoiding excessively large coupling matrices in the new final finite element matrix, further accelerating the matrix solution speed. Finally, parallel solution is used for the final finite element matrix, further improving the solution speed. The entire method can significantly improve the solution efficiency while ensuring solution accuracy, and it is simple to operate and easy to implement, making it widely used in the EDA industry.

[0065] Example 2

[0066] A system that applies the above-described method for accelerating the solution of large sparse matrices includes:

[0067] Restoration module: used to restore the port node connection relationship of the initial finite element matrix to obtain a quadratic finite element matrix;

[0068] Conversion module: Used to convert a quadratic finite element matrix into an unoriented graph;

[0069] Decomposition module: Used to decompose unoriented graphs and obtain the optimal decomposition;

[0070] Renumbering module: Used to renumber the nodes of the quadratic finite element matrix based on the optimal decomposition in the decomposition module;

[0071] Reordering module: Used to reorder the quadratic finite element matrix based on the renumbering of nodes in the renumbering module, and generate the final finite element matrix;

[0072] Solver module: Used to solve the final finite element matrix in the reordering module.

[0073] Control module: Used to control the operation of each module.

[0074] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium and, when executed by the computer, can include the processes of the embodiments of the above methods.

[0075] The system of this invention transforms the initial finite element matrix into an unoriented graph by restoring the node connection relationships, then decomposes the unoriented graph to obtain the optimal decomposition, renumbers the nodes in the quadratic finite element matrix according to the optimal decomposition, and reorders the matrix according to the renumbered nodes to finally achieve the solution. It improves efficiency while ensuring accuracy, achieving a good balance between accuracy and efficiency. The modules work independently while cooperating with each other, and the structure is simple and easy to control.

[0076] Example 3

[0077] A computer-readable storage medium storing a computer program that, when executed by a processor, performs the method described above. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.

[0078] The examples described herein are merely preferred embodiments of the invention and are not intended to limit the concept and scope of the invention. Any modifications and improvements made by those skilled in the art to the technical solutions of the invention without departing from the design concept of the invention should fall within the protection scope of the invention.

Claims

1. A method for accelerating the solution of large sparse matrices, characterized in that: Includes the following steps: S1: Restore the connection relationship of the port nodes in the initial finite element matrix to obtain the restored quadratic finite element matrix; S2: Transform the quadratic finite element matrix into an unoriented graph; S3: Decompose the unorienting graph and select the optimal decomposition using an evaluation function; S4: Renumber the nodes of the quadratic finite element matrix according to the optimal decomposition; S5: Reorder the quadratic finite element matrix according to the renumbering of the nodes to generate a new final finite element matrix; S6: Solve for the final finite element matrix; The specific steps in step S2 are as follows: S21: Define two new data structures: nodes and edges. A node is the column containing a non-zero element, which is the node corresponding to that row, and the row contains the non-zero element. Edge: The edge formed by the nodes corresponding to the columns containing non-zero elements; S22: Map each non-zero element in each row of the quadratic finite element matrix to a connection between points; S23: Every two points correspond to an undirected edge; S24: Repeat steps S22-S23 in sequence until all non-zero elements in each row of the quadratic finite element matrix are connected, and finally generate an unoriented graph.

2. The method for accelerating the solution of large sparse matrices according to claim 1, characterized in that: In step S3, the evaluation function is defined as follows: For a matrix, it is decomposed into N submatrices, where N is a multiple of 2. The coupling coefficient S of the submatrices is the dimension of the coupling matrix divided by the average dimension of the submatrices. The optimal decomposition is the number of blocks corresponding to the minimum coupling coefficient.

3. A method for accelerating the solution of large sparse matrices according to claim 1 or 2, characterized in that: In step S3, the Metis program is used to decompose the unorienting graph.

4. The method for accelerating the solution of large sparse matrices according to claim 1, characterized in that: The initial finite element matrix in step S1 is obtained by reading a mesh file, using the mesh for finite element numerical modeling, and creating the matrix.

5. The method for accelerating the solution of large sparse matrices according to claim 4, characterized in that: In step S1, while generating the initial finite element matrix, the connection relationship between the port node and other mesh nodes is backed up in advance.

6. A system applying any one of the methods for accelerating the solution of large sparse matrices as described in claims 1-5, characterized in that: include: Restoration module: used to restore the port node connection relationship of the initial finite element matrix to obtain a quadratic finite element matrix; Conversion module: Used to convert a quadratic finite element matrix into an unoriented graph; Decomposition module: Used to decompose unoriented graphs and obtain the optimal decomposition; Renumbering module: Used to renumber the nodes of the quadratic finite element matrix based on the optimal decomposition in the decomposition module; Reordering module: Used to reorder the quadratic finite element matrix based on the renumbering of nodes in the renumbering module, and generate the final finite element matrix; Solver module: Used to solve the final finite element matrix in the reordering module; Control module: Used to control the operation of each module.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it performs the method of any one of claims 1-5.

Citation Information

Patent Citations

  • A method, apparatus, device and medium for accelerating sparse matrix computation

    CN112732222B

  • Irregular iteration parallelization method

    CN102096744A

  • Methods and systems for using bi-directional level sets to partition an undirected graph representing a matrix to be used in CAE

    US20140343899A1