Electromagnetic finite element analysis method and device based on mixed precision solution of matrix equations
By using a matrix equation solution method with mixed accuracy in electromagnetic finite element analysis, the problem of memory and calculation time bottlenecks in complex electromagnetic system analysis is solved, and high-precision and high-efficiency analysis effect is achieved.
Patent Information
- Application Number
- CN202410604528.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-05-15
AI Technical Summary
The existing electromagnetic finite element analysis methods encounter memory bottlenecks and calculation time bottlenecks when dealing with complex electromagnetic systems, and at the same time, single-precision calculation cannot meet the requirements of high-precision analysis.
The matrix equation method based on mixed precision is used to determine the double-precision finite element matrix equation through Maxwell's equation, combined with nested split sorting algorithm and LU symbol decomposition, it is converted into single precision for partial solution, and the double-precision accuracy is restored through subsequent transformation.
It effectively reduces the memory usage and solution time, overcomes the accuracy loss problem of single-precision calculation, and improves the speed and accuracy of electromagnetic finite element analysis.
Smart Images

Figure CN118378489B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of simulation technology, and in particular to an electromagnetic finite element analysis method and device based on mixed precision solution of matrix equations. Background Art
[0002] Matrix solution time accounts for the vast majority of electromagnetic simulation time, so efficient matrix solution methods are of great significance in the field of electromagnetic simulation.
[0003] An existing electromagnetic finite element analysis method is to use double precision to store and calculate matrix equations. However, with the increase in the complexity and electrical size of the electromagnetic system, it is difficult for the processor's memory to store the matrix equations, and the processor's double precision calculation speed is very limited, forming a memory bottleneck and a calculation time bottleneck that restrict electromagnetic finite element analysis, limiting the development of computational electromagnetics. Another existing electromagnetic finite element analysis method is to use single precision to store and calculate matrix equations. However, the accuracy of the results obtained by single precision calculation cannot meet the accuracy requirements of electromagnetic finite element analysis, the error is too large, and high-precision simulation cannot be performed.
[0004] How to save computing resources while ensuring the accuracy of electromagnetic finite element analysis is an urgent problem to be solved at this stage. Summary of the invention
[0005] In order to solve the above problems existing in the prior art, the present invention provides an electromagnetic finite element analysis method and device based on mixed precision solution of matrix equations. Specifically, it includes:
[0006] In a first aspect, the present invention provides an electromagnetic finite element analysis method based on mixed precision solution of matrix equations, comprising:
[0007] Based on Maxwell's equations, a double-precision finite element matrix equation corresponding to a target electromagnetic system to be subjected to electromagnetic finite element analysis is determined;
[0008] The nested partitioning and sorting algorithm is used to reorder the initial coefficient matrix of the double-precision finite element matrix equation to obtain the first coefficient matrix;
[0009] Perform LU symbol decomposition on the first coefficient matrix to obtain the position distribution of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix;
[0010] Convert the first coefficient matrix from double precision to single precision to obtain a second coefficient matrix;
[0011] According to the second coefficient matrix, respectively determine the values of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix, and construct the lower triangular matrix and the upper triangular matrix;
[0012] The items about the excitation of the target electromagnetic system in the double-precision finite element matrix equation are converted into single-precision, and the target finite element matrix equation is obtained based on the lower triangular matrix and the upper triangular matrix;
[0013] According to the lower triangular matrix, the upper triangular matrix and the target finite element matrix equation, a solution corresponding to the double-precision finite element matrix equation that can meet the double-precision solution accuracy requirement is determined.
[0014] In a second aspect, the present invention further provides an electromagnetic finite element analysis device based on mixed precision solution of matrix equations, comprising:
[0015] A determination module, used for determining a double-precision finite element matrix equation corresponding to a target electromagnetic system to be subjected to electromagnetic finite element analysis based on Maxwell equations;
[0016] A processing module, used for reordering the initial coefficient matrix of the double-precision finite element matrix equation by using a nested partitioning and sorting algorithm to obtain a first coefficient matrix;
[0017] The processing module is further used to perform LU symbol decomposition on the first coefficient matrix to obtain the position distribution of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix;
[0018] The processing module is further used to convert the first coefficient matrix from double precision to single precision to obtain a second coefficient matrix;
[0019] The processing module is further used to determine the values of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix according to the second coefficient matrix, and construct the lower triangular matrix and the upper triangular matrix;
[0020] The processing module is further used to convert the items about the excitation of the target electromagnetic system in the double-precision finite element matrix equation into single-precision, and obtain the target finite element matrix equation based on the lower triangular matrix and the upper triangular matrix;
[0021] The processing module is also used to determine the solution corresponding to the double-precision finite element matrix equation that can meet the double-precision solution accuracy requirement based on the lower triangular matrix, the upper triangular matrix and the target finite element matrix equation.
[0022] In a third aspect, the present invention further provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0023] Memory, used to store computer programs;
[0024] The processor is used to implement any method provided in the first aspect when executing a program stored in the memory.
[0025] In a fourth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any one of the methods provided in the first aspect is implemented.
[0026] In a fifth aspect, the present invention provides a program product, which includes computer program instructions, and when the computer program instructions are executed, they can implement any of the methods provided in the first aspect.
[0027] Beneficial effects of the present invention:
[0028] The electromagnetic finite element analysis method and device based on mixed precision matrix equation solution provided by the present invention determine the double precision finite element matrix equation corresponding to the target electromagnetic system to be subjected to electromagnetic finite element analysis based on Maxwell equations; adopt a nested partitioning and sorting algorithm to reorder the initial coefficient matrix of the double precision finite element matrix equation to obtain a first coefficient matrix; perform LU symbol decomposition on the first coefficient matrix to obtain the position distribution of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix; convert the first coefficient matrix from double precision to single precision to obtain a second coefficient matrix; determine the values of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix according to the second coefficient matrix, and construct the lower triangular matrix and the upper triangular matrix; convert the terms related to the excitation of the target electromagnetic system in the double precision finite element matrix equation to single precision, and based on the lower triangular matrix and the upper triangular matrix to obtain the target finite element matrix equation; according to the lower triangular matrix, the upper triangular matrix and the target finite element matrix equation, the solution corresponding to the double-precision finite element matrix equation that can meet the double-precision solution accuracy requirements is determined. On the one hand, by converting double precision into single precision for partial solution operations, the low-precision computing capability supported by the existing processor is realized, and the difficult problem that the high-dimensional matrix equations generated by the finite element discretization of complex and electrically large electromagnetic systems cannot be stored and solved is broken through, thereby improving the speed of electromagnetic finite element analysis; on the other hand, combined with the subsequent conversion of single precision into double precision to obtain a solution that meets the double-precision solution accuracy requirements, a mixed precision solution is realized. Compared with a single double precision solution method, this mixed precision solution method can effectively reduce memory usage and solution time. Compared with a single single precision solution method, it can overcome the problem of precision loss and improve the accuracy of electromagnetic finite element analysis.
[0029] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A schematic flow chart of an electromagnetic finite element analysis method based on mixed precision solution of matrix equations provided by the present invention;
[0031] Figure 2A schematic structural diagram of an electromagnetic finite element analysis device based on mixed precision for solving matrix equations provided by the present invention. DETAILED DESCRIPTION
[0032] 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.
[0033] In the electromagnetic field, for large-scale system-level electromagnetic problems, the finite element electromagnetic algorithm will generate a large amount of grids in the discrete model, that is, the unknowns of the matrix equation, and the demand for subsequent computing resources is very high. Although it can be alleviated by a higher-performance computing cluster, the requirements for timeliness of electromagnetic computing are also getting higher and higher. In order to efficiently complete electromagnetic simulation with limited computing resources, the improvement of the matrix equation solving technology itself is also the key to solving the problem. Based on this, the present invention provides an electromagnetic finite element analysis method based on mixed precision to solve matrix equations, which can improve the speed and accuracy of electromagnetic finite element analysis.
[0034] Figure 1 A flow chart of an electromagnetic finite element analysis method based on mixed precision solution of matrix equations provided by the present invention is shown as follows: Figure 1 As shown, the method includes:
[0035] S101. Based on Maxwell's equations, determine a double-precision finite element matrix equation corresponding to a target electromagnetic system to be subjected to electromagnetic finite element analysis.
[0036] In a possible implementation, based on Maxwell's equations, determining a double-precision finite element matrix equation corresponding to a target electromagnetic system to be subjected to electromagnetic finite element analysis includes the following steps A1-A3:
[0037] A1. Model the target electromagnetic system and obtain the target model.
[0038] Exemplarily, the geometry, materials, boundary conditions and excitations of the target electromagnetic system are modeled to obtain a target model.
[0039] A2. Grid the target model and use high-order basis functions to discretize the grid results to obtain discrete results.
[0040] A3. Based on Maxwell's equations and the discrete results, determine the double-precision finite element matrix equation corresponding to the target electromagnetic system to be subjected to electromagnetic finite element analysis.
[0041] The electromagnetic system can be described using Maxwell's equations. For example, the obtained discrete results are substituted into the Maxwell's equations corresponding to the target electromagnetic system to obtain the double-precision finite element matrix equation corresponding to the target electromagnetic system, which is expressed as:
[0042] Ax = b,
[0043] Among them, x represents the unknown quantity of the discrete point corresponding to the target electromagnetic system, A and b represent the coefficient matrix and the right-hand side term obtained by substituting the discrete points into Maxwell's equations, respectively.
[0044] S102, using a nested partitioning and sorting algorithm to reorder the initial coefficient matrix of the double-precision finite element matrix equation to obtain a first coefficient matrix.
[0045] In a possible implementation, a nested partitioning and sorting algorithm is used to reorder the initial coefficient matrix of the double-precision finite element matrix equation to obtain a first coefficient matrix, including B1 and B2 as follows:
[0046] B1. Use the nested subdivision algorithm to calculate the column sorting matrix P corresponding to the initial coefficient matrix of the double-precision finite element matrix equation.
[0047] B2, reorder the initial coefficient matrix of the double precision finite element matrix equation according to the column ordering matrix P to obtain the first coefficient matrix, which is expressed as:
[0048] A'=PAP T ,
[0049] Where A' represents the first coefficient matrix, A represents the initial coefficient matrix of the double precision finite element matrix equation, P represents the column sorting matrix corresponding to the initial coefficient matrix of the double precision finite element matrix equation, and P T represents the transpose of the column-ordered matrix P.
[0050] LU Factorization is a type of matrix decomposition that can decompose a matrix into the product of a lower triangular matrix and an upper triangular matrix. Since filler elements are generated in the original matrix during LU factorization, the above processing can reduce the number of filler elements in the solution process, thereby improving the efficiency of subsequent LU factorization.
[0051] S103, performing LU symbol decomposition on the first coefficient matrix to obtain the position distribution of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix.
[0052] In a possible implementation, LU symbol decomposition is performed on the first coefficient matrix to obtain the position distribution of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix, including the following steps C1-C3;
[0053] C1. Obtain the adjacency graph corresponding to the first coefficient matrix. The adjacency graph is represented by G(V,E), where G represents a graph, V represents a vertex of the graph, and E represents an edge of the graph.
[0054] C2, trigger from the vertex of the adjacency graph, perform a depth-first search to calculate the reachable domain, which is represented by G R (V,E).
[0055] C3. According to the arrival domain, the position distribution of each non-zero element in the lower triangular matrix (L, lower triangular matrix) and the position distribution of each non-zero element in the upper triangular matrix (U, upper triangular matrix) corresponding to the first coefficient matrix are obtained.
[0056] S104. Convert the first coefficient matrix from double precision to single precision to obtain a second coefficient matrix.
[0057] The first coefficient matrix may be converted from double precision to single precision by any conversion method, and the present invention does not impose any specific limitation on this.
[0058] S105. According to the second coefficient matrix, respectively determine the values of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix, and construct the lower triangular matrix and the upper triangular matrix.
[0059] In a possible implementation, according to the second coefficient matrix, respectively determining the values of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix includes the following steps D1 and D2:
[0060] D1. Perform Gaussian elimination processing on the second coefficient matrix, and obtain the values of each non-zero element in the upper triangular matrix corresponding to the first coefficient matrix according to the processing result.
[0061] D2. Obtain the values of each non-zero element in the lower triangular matrix corresponding to the first coefficient matrix according to the coefficients eliminated by Gaussian elimination.
[0062] S106. Convert the terms related to the excitation of the target electromagnetic system in the double-precision finite element matrix equation into single-precision terms, and obtain the target finite element matrix equation based on the lower triangular matrix and the upper triangular matrix.
[0063] The first coefficient matrix may be converted from double precision to single precision by any conversion method, and the present invention does not impose any specific limitation on this.
[0064] S107. Determine a solution corresponding to the double-precision finite element matrix equation that can meet the double-precision solution accuracy requirement according to the lower triangular matrix, the upper triangular matrix and the target finite element matrix equation.
[0065] In a possible implementation, a solution that can meet the double-precision solution accuracy requirement corresponding to the double-precision finite element matrix equation is determined according to the lower triangular matrix, the upper triangular matrix and the target finite element matrix equation, including the following steps E1-E3:
[0066] E1. Convert the target finite element matrix equation into the first function and the second function.
[0067] The target finite element matrix equation is expressed as:
[0068] A'x=LUx=b',
[0069] Among them, A' represents the first coefficient matrix, L represents the lower triangular matrix corresponding to the first coefficient matrix, U represents the upper triangular matrix corresponding to the first coefficient matrix, b' represents the target electromagnetic system excitation converted to single precision, and x is the variable to be solved.
[0070] The first function is expressed as:
[0071] Ly=b',
[0072] Among them, y is the intermediate variable;
[0073] The second function is expressed as:
[0074] Ux=y.
[0075] E2. Use the back substitution method of the triangular linear equations to solve the first function and the second function to obtain the initial single-precision solution corresponding to the double-precision finite element matrix equation.
[0076] E3. Based on the initial single-precision solution, determine the solution corresponding to the double-precision finite element matrix equation that can meet the double-precision solution accuracy requirements.
[0077] Furthermore, in a possible implementation, determining a solution that can meet the double-precision solution accuracy requirement corresponding to the double-precision finite element matrix equation according to the initial single-precision solution includes the following steps:
[0078] 1. Expand the initial single-precision solution to double precision to obtain the first double-precision solution;
[0079] 2. Determine whether the first double-precision solution meets the double-precision solution accuracy requirement. If so, determine the first double-precision solution as the solution of the double-precision finite element matrix equation. If not, execute 3.
[0080] 3. Calculate the increment corresponding to the first double-precision solution according to the preset increment calculation formula, and determine the sum of the first double-precision solution and the increment corresponding to the first double-precision solution as the new first double-precision solution, and return to execute 2.
[0081] The incremental calculation formula is expressed as:
[0082] dx=r / A',
[0083] Wherein, dx represents the increment, r represents the residual, and r=b'-A'x.
[0084] Optionally, the method further includes: drawing near-field and far-field analysis images corresponding to the target electromagnetic system based on a solution corresponding to the double-precision finite element matrix equation that can meet the double-precision solution accuracy requirement.
[0085] The electromagnetic finite element analysis method and device based on mixed precision matrix equation solution provided by the present invention determine the double precision finite element matrix equation corresponding to the target electromagnetic system to be subjected to electromagnetic finite element analysis based on Maxwell equations; adopt a nested partitioning and sorting algorithm to reorder the initial coefficient matrix of the double precision finite element matrix equation to obtain a first coefficient matrix; perform LU symbol decomposition on the first coefficient matrix to obtain the position distribution of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix; convert the first coefficient matrix from double precision to single precision to obtain a second coefficient matrix; determine the values of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix according to the second coefficient matrix, and construct the lower triangular matrix and the upper triangular matrix; convert the terms related to the excitation of the target electromagnetic system in the double precision finite element matrix equation to single precision, and based on the lower triangular matrix and the upper triangular matrix to obtain the target finite element matrix equation; according to the lower triangular matrix, the upper triangular matrix and the target finite element matrix equation, the solution corresponding to the double-precision finite element matrix equation that can meet the double-precision solution accuracy requirements is determined. On the one hand, by converting double precision into single precision for partial solution operations, the low-precision computing capability supported by the existing processor is realized, and the difficult problem that the high-dimensional matrix equations generated by the finite element discretization of complex and electrically large electromagnetic systems cannot be stored and solved is broken through, thereby improving the speed of electromagnetic finite element analysis; on the other hand, combined with the subsequent conversion of single precision into double precision to obtain a solution that meets the double-precision solution accuracy requirements, a mixed precision solution is realized. Compared with a single double precision solution method, this mixed precision solution method can effectively reduce memory usage and solution time. Compared with a single single precision solution method, it can overcome the problem of precision loss and improve the accuracy of electromagnetic finite element analysis.
[0086] Figure 2 A schematic diagram of the structure of an electromagnetic finite element analysis device based on mixed precision solution of matrix equations provided by the present invention is shown in FIG. Figure 2 As shown, the device comprises:
[0087] A determination module 21 is used to determine, based on Maxwell's equations, a double-precision finite element matrix equation corresponding to a target electromagnetic system to be subjected to electromagnetic finite element analysis;
[0088] A processing module 22 is used to use a nested partitioning and sorting algorithm to reorder the initial coefficient matrix of the double-precision finite element matrix equation to obtain a first coefficient matrix;
[0089] The processing module 22 is further used to perform LU symbol decomposition on the first coefficient matrix to obtain the position distribution of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix;
[0090] The processing module 22 is further used to convert the first coefficient matrix from double precision to single precision to obtain a second coefficient matrix;
[0091] The processing module 22 is further used to determine the values of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix according to the second coefficient matrix, and construct the lower triangular matrix and the upper triangular matrix;
[0092] The processing module 22 is further used to convert the terms related to the excitation of the target electromagnetic system in the double-precision finite element matrix equation into single-precision, and obtain the target finite element matrix equation according to the lower triangular matrix corresponding to the first coefficient matrix and the upper triangular matrix corresponding to the first coefficient matrix;
[0093] The processing module 22 is further used to determine a solution corresponding to the double-precision finite element matrix equation that can meet the double-precision solution accuracy requirement according to the lower triangular matrix, the upper triangular matrix and the target finite element matrix equation.
[0094] Optionally, the determination module 21 is further used to draw near-field and far-field analysis images corresponding to the target electromagnetic system based on a solution corresponding to the double-precision finite element matrix equation that can meet the double-precision solution accuracy requirement.
[0095] The present invention also provides a structural schematic diagram of an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus.
[0096] Memory, used to store computer programs;
[0097] The processor is used to implement the steps provided in the above method embodiment when executing the program stored in the memory.
[0098] The communication interface is used for communication between the above electronic device and other devices.
[0099] The method provided in the embodiment of the present invention can be applied to electronic devices. Specifically, the electronic device can be: a desktop computer, a portable computer, an intelligent mobile terminal, a server, etc. This is not limited here, and any electronic device that can implement the present invention belongs to the protection scope of the present invention.
[0100] The present invention also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps provided in the above method embodiment are implemented.
[0101] As for the device / electronic device / storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the specific content and beneficial effects and other related matters can be referred to the partial description of the method embodiment.
[0102] 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 the indicated technical features. Therefore, 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.
[0103] 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 scope of protection of the present invention.
Claims
1. An electromagnetic finite element analysis method based on mixed precision solution of matrix equations, characterized in that: include: Based on Maxwell's equations, a double-precision finite element matrix equation corresponding to a target electromagnetic system to be subjected to electromagnetic finite element analysis is determined; Using a nested partitioning and sorting algorithm, the initial coefficient matrix of the double-precision finite element matrix equation is reordered to obtain a first coefficient matrix; Performing LU symbol decomposition on the first coefficient matrix to obtain position distribution of each non-zero element in a lower triangular matrix and an upper triangular matrix corresponding to the first coefficient matrix; Convert the first coefficient matrix from double precision to single precision to obtain a second coefficient matrix; According to the second coefficient matrix, respectively determine the values of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix, and construct the lower triangular matrix and the upper triangular matrix; Converting the terms related to the target electromagnetic system excitation in the double-precision finite element matrix equation into single-precision terms, and obtaining the target finite element matrix equation based on the lower triangular matrix and the upper triangular matrix; Determine, according to the lower triangular matrix, the upper triangular matrix and the target finite element matrix equation, a solution corresponding to the double-precision finite element matrix equation that can meet the double-precision solution accuracy requirement; The first coefficient matrix is expressed as: A'=PAP T , Where A' represents the first coefficient matrix, A represents the initial coefficient matrix of the double precision finite element matrix equation, P represents the column sorting matrix corresponding to the initial coefficient matrix of the double precision finite element matrix equation, and P T represents the transpose of the column-ordered matrix P; The determining, according to the lower triangular matrix, the upper triangular matrix and the target finite element matrix equation, a solution corresponding to the double-precision finite element matrix equation that can meet the double-precision solution accuracy requirement includes: The target finite element matrix equation is converted into a first function and a second function, The target finite element matrix equation is expressed as: A'x=LUx=b', Among them, A' represents the first coefficient matrix, L represents the lower triangular matrix corresponding to the first coefficient matrix, U represents the upper triangular matrix corresponding to the first coefficient matrix, b' represents the target electromagnetic system excitation converted to single precision, and x is the variable to be solved. The first function is expressed as: Ly=b', Among them, y is the intermediate variable; The second function is expressed as: Ux=y; Solve the first function and the second function using a back-substitution method of a triangular linear equation system to obtain an initial single-precision solution corresponding to the double-precision finite element matrix equation; According to the initial single-precision solution, a solution corresponding to the double-precision finite element matrix equation that can meet the double-precision solution accuracy requirement is determined.
2. The method according to claim 1, characterized in that The step of determining, according to the second coefficient matrix, the values of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix, respectively, comprises: Performing Gaussian elimination processing on the second coefficient matrix, and obtaining the value of each non-zero element in the upper triangular matrix corresponding to the first coefficient matrix according to the processing result; The values of each non-zero element in the lower triangular matrix corresponding to the first coefficient matrix are obtained according to the coefficients eliminated by Gaussian elimination processing.
3. The method according to claim 2, characterized in that The step of determining, based on the initial single-precision solution, a solution corresponding to the double-precision finite element matrix equation that can meet the double-precision solution accuracy requirement comprises: S41, expanding the initial single-precision solution to double-precision to obtain a first double-precision solution; S42, determining whether the first double-precision solution meets the double-precision solution accuracy requirement, if so, determining the first double-precision solution as the solution of the double-precision finite element matrix equation, if not, executing S43; S43, calculating the increment corresponding to the first double-precision solution according to a preset increment calculation formula, and determining the sum of the first double-precision solution and the increment corresponding to the first double-precision solution as a new first double-precision solution, and returning to execute S42, The increment calculation formula is expressed as: dx=r / A', Wherein, dx represents the increment, r represents the residual, and r=b'-A'x.
4. The method according to claim 1 or 2, characterized in that: The method further comprises: Based on the solution corresponding to the double-precision finite element matrix equation that can meet the double-precision solution accuracy requirement, the near-field and far-field analysis images corresponding to the target electromagnetic system are drawn.
5. The method according to claim 1 or 2, characterized in that: The method of determining the double-precision finite element matrix equation corresponding to the target electromagnetic system to be subjected to electromagnetic finite element analysis based on Maxwell equations includes: Modeling the target electromagnetic system to obtain a target model; Meshing the target model, and discretizing the meshing result by using a high-order basis function to obtain a discrete result; Based on Maxwell's equations and the discrete results, a double-precision finite element matrix equation corresponding to the target electromagnetic system to be subjected to electromagnetic finite element analysis is determined.
6. An electromagnetic finite element analysis device based on mixed precision solution of matrix equations, characterized in that: include: A determination module, used for determining a double-precision finite element matrix equation corresponding to a target electromagnetic system to be subjected to electromagnetic finite element analysis based on Maxwell equations; A processing module, used for reordering the initial coefficient matrix of the double-precision finite element matrix equation by using a nested partitioning and sorting algorithm to obtain a first coefficient matrix; The processing module is further used to perform LU symbol decomposition on the first coefficient matrix to obtain the position distribution of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix; The processing module is further used to convert the first coefficient matrix from double precision to single precision to obtain a second coefficient matrix; The processing module is further used to determine the values of each non-zero element in the lower triangular matrix and the upper triangular matrix corresponding to the first coefficient matrix according to the second coefficient matrix, and construct the lower triangular matrix and the upper triangular matrix; The processing module is further used to convert the terms related to the target electromagnetic system excitation in the double-precision finite element matrix equation into single-precision, and obtain the target finite element matrix equation according to the lower triangular matrix corresponding to the first coefficient matrix and the upper triangular matrix corresponding to the first coefficient matrix; The processing module is further used to determine a solution corresponding to the double-precision finite element matrix equation that can meet the double-precision solution accuracy requirement according to the lower triangular matrix, the upper triangular matrix and the target finite element matrix equation; The first coefficient matrix is expressed as: A'=PAP T , Where A' represents the first coefficient matrix, A represents the initial coefficient matrix of the double precision finite element matrix equation, P represents the column sorting matrix corresponding to the initial coefficient matrix of the double precision finite element matrix equation, and P T represents the transpose of the column-ordered matrix P; The processing module is specifically used to convert the target finite element matrix equation into a first function and a second function, The target finite element matrix equation is expressed as: A'x=LUx=b', Among them, A' represents the first coefficient matrix, L represents the lower triangular matrix corresponding to the first coefficient matrix, U represents the upper triangular matrix corresponding to the first coefficient matrix, b' represents the target electromagnetic system excitation converted to single precision, and x is the variable to be solved. The first function is expressed as: Ly=b', Among them, y is the intermediate variable, The second function is expressed as: Ux=y; Using the back-substitution method of the triangular linear equations, solving the first function and the second function to obtain an initial single-precision solution corresponding to the double-precision finite element matrix equation, According to the initial single-precision solution, a solution corresponding to the double-precision finite element matrix equation that can meet the double-precision solution accuracy requirement is determined.
7. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-5 when executing a program stored in a memory.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
9. A program product, characterized in that The program product comprises computer program instructions, and when the computer program instructions are executed, the method according to any one of claims 1 to 5 can be implemented.
Citation Information
Patent Citations
Method for optimizing structural parameters based on symbolic operation results of sparse matrix
CN107944189A
Quick electromagnetic scattering analysis method for local change of targets
CN108920741A