A high performance serial and parallel region block integration flexibility matrix method
Through the single-threaded serial and multi-threaded parallel region blocked integration of the flexibility matrix method, the problem of time-consuming integration of the integrated matrix in the finite element method is solved, and efficient flexibility matrix integration and nonlinear system of equations are realized, suitable for two The 3D model of the dimensions improves the computing efficiency of large-scale engineering.
Patent Information
- Application Number
- CN202410277127.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-12
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-03-12
AI Technical Summary
In the performance analysis of concrete materials, the calculation of integrated stiffness or flexibility matrix is large and time-consuming, especially in large-scale engineering calculations, and it is difficult to meet the efficiency requirements. Especially for interpreted languages such as MATLAB, numerical simulation efficiency is low. The dual requirements of accuracy and efficiency cannot be met.
The single-threaded serial and multithreaded parallel region blocked integrated flexibility matrix method is adopted. By dividing the solution domain into sub-regions, the flexibility matrix and Lagrange multiplyer matrix are independently integrated, and the node force boundary conditions are processed before parallel calculations, according to Directional integration matrix, construct sparse matrix storage and matrix chunking method to solve nonlinear system of equations.
It improves computing efficiency and scalable performance, supports single-threaded serial and multi-threaded parallel computing, and can automatically scale to three-dimensional models without modification, significantly shortens the integration time of flexibility matrix and improves the efficiency of large-scale engineering computing.
Smart Images

Figure CN118364215B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of technical computing, and in particular is a method for high-performance serial and parallel regional block integration flexibility matrix. Background Art
[0002] The finite element method is a numerical technique for solving approximate solutions to boundary value problems of partial differential equations. In the performance analysis process of recycled concrete materials based on damage mechanics, it is necessary to integrate the stiffness matrix or flexibility matrix according to the current state of the material, which is computationally intensive and requires high memory. At the same time, after the order of the displacement interpolation function or the stress interpolation function is determined, the numerical accuracy will be affected by the mesh size. Reducing the mesh size can ensure that the accuracy meets the engineering requirements, but a smaller mesh size means more meshes and degrees of freedom, requiring a larger data storage space and reducing the computational efficiency. With the continuous expansion of model scale and the continuous improvement of accuracy requirements, the demand for large-scale serial and parallel computing in finite element numerical analysis is increasing. Therefore, it is very necessary to develop new and efficient numerical simulation analysis algorithms to improve the efficiency of numerical simulation and reduce time consumption, especially for interpretive languages such as MATLAB, which have low efficiency in large-scale engineering calculations.
[0003] For the numerical simulation of concrete material micro-performance, meeting the required accuracy means smaller unit size and more unit numbers. Although the accuracy of the numerical results is met, the efficiency of the numerical simulation cannot be guaranteed. Especially for three-dimensional space problems, conventional algorithms will consume a lot of time to integrate the stiffness matrix and the flexibility matrix, which cannot meet the large-scale calculation requirements of the project. Summary of the invention
[0004] Purpose of the invention: In view of the above problems, the present invention provides a high-performance serial and parallel regional block integrated flexibility matrix method. The present invention includes a single-thread serial and multi-thread parallel regional block integrated flexibility matrix method.
[0005] Technical solution: A high-performance serial and parallel regional block integrated flexibility matrix method, including a single-threaded serial regional block integrated flexibility matrix algorithm and a multi-threaded parallel regional block integrated flexibility matrix algorithm;
[0006] The single-thread serial region block integrated flexibility matrix algorithm refers to dividing the solution domain into a number of independent sub-regions, each sub-region separately integrates the flexibility matrix and Lagrange multiplier matrix of the region, establishes a sparse matrix to store the flexibility matrix and Lagrange multiplier matrix, and constructs the coefficient term matrix of the nonlinear equation group;
[0007] The multi-threaded parallel region-block integrated flexibility matrix algorithm means dividing the solution domain into several independent sub-regions, performing the sign-reversal information processing of the nodal force boundary conditions required for each sub-region before parallel computing, integrating the directional flexibility matrix and the directional Lagrange multiplier matrix respectively according to the contributions of the nodes in the x and y directions in the sub-region; secondly, integrating the contributions of the nodes in the sub-region to the flexibility matrix and the multiplier matrix into the global flexibility matrix and the global Lagrange multiplier matrix respectively in the x and y directions; finally, based on the integrated global flexibility matrix and the global Lagrange multiplier matrix, establishing a sparse matrix to store the global flexibility matrix and the global Lagrange multiplier matrix, and constructing the coefficient term matrix of the non-linear equations system.
[0008] Furthermore, in both the single-threaded serial region-block integrated flexibility matrix algorithm and the multi-threaded parallel region-block integrated flexibility matrix algorithm, the region-block method is adopted to divide the solution domain, and the region-block method includes a single region-block method or a multiple region-block method;
[0009] (1) The single region-block method is specifically as follows:
[0010] Step 1.1): Assume that there is an arbitrary two-dimensional solution domain ABCD, denoted as P, and the number of discretized elements is n; before integrating the flexibility matrix, decompose the solution domain P into m sub-regions, 1 < m < n, and the sub-regions are denoted as P m , where the minimum is 1 part and the maximum is n parts;
[0011] The starting and ending ranges of the element coding for each sub-region are:
[0012]
[0013] In the formula, N i is the i-th sub-region, N i1 , N i2 are the starting element coding and the ending element coding of this sub-region, and p is the number of elements in each sub-region;
[0014] To avoid element number overflow, the algorithm sets a sub-region element number termination command, and the ending element coding of the m-th sub-region is n, that is:
[0015]
[0016] Step 1.2): On the basis of Step 1.1), introduce the physical quantity in the Z direction of space, and then the region-block method for the three-dimensional solution domain can be established;
[0017] (2) The multiple region-block method means further dividing the already divided sub-regions.
[0018] Furthermore, the sparse matrix stores data in the following manner: the flexibility matrix or multiplier matrix is stored as three columns D, R, and C, where D is the non-zero value in A, R is the row where the non-zero value is located, and C is the column where the non-zero value is located.
[0019] Furthermore, in the single-thread serial region block integrated flexibility matrix algorithm and the multi-thread parallel region block integrated flexibility matrix method, the nonlinear equations solution method is the matrix block method;
[0020] The process of solving nonlinear equations by matrix block method is as follows:
[0021] Step A: Assume that the solution domain is discretized into n units and the solution domain has a total of m degrees of freedom. Then the expression of the nonlinear equation system is:
[0022] A (m+3n)×(m+3n) X (m+3n)×1 =B (m+3n)×1 (5)
[0023] In the formula, the coefficient term A (m+3n)×(m+3n) It consists of the overall flexibility matrix and the Lagrange multiplier matrix. The matrix expression is:
[0024]
[0025] D m×m is the overall flexibility matrix, L m×3n is the Lagrange multiplier matrix;
[0026] Constant term B (m+3n)×1 Consists of displacement or force boundary conditions:
[0027] B (m+3n)×1 =[B m×1 0] T (7)
[0028] Then, formula (5) can be expressed as:
[0029]
[0030] According to mathematical theorem, when |D m×m |≠0, and M=|-L T D -1 L|≠0, then the non-homogeneous system of equations has a unique solution, which is:
[0031] X=[X1 X2] T (9)
[0032] in,
[0033] X2=(-L T D -1 L)-1 (-L T D -1 B) (10)
[0034] Then, X1 can be obtained as:
[0035] X1=D -1 (B-LX2) (11)
[0036] Therefore, the nodal displacement formula is:
[0037]
[0038] In the formula, δ x represents the displacement of the node in the x direction, δ y represents the displacement of the node in the y direction, C represents the flexibility matrix, T represents the force on the node, x represents along the x direction, and y represents along the y direction; δ α is the node displacement of α, C αxβx is the contribution of the x-coordinate of node β to the flexibility of node α in the x-direction, C αxβy is the contribution of the y-coordinate of node β to the flexibility of node α in the x-direction, C αyβx is the contribution of the x-coordinate of node β to the flexibility of node α in the y direction, C αyβy is the flexibility contribution of the y-coordinate of node β to the y-direction of node α; T βx is the nodal force component of node β in the x direction, T βy is the nodal force component of node β in the y direction.
[0039] Furthermore, in the multi-threaded parallel regional block integrated flexibility matrix algorithm, the inverse sign information processing method of the node force boundary condition is as follows:
[0040] Taking a two-dimensional element as an example, the element node surface force coordination condition 2 is:
[0041]
[0042] represents the force on the boundary V in the direction of surface A, Represents the force on boundary V in the direction of surface B. The two are equal in magnitude and opposite in direction.
[0043] (1) Assuming there are m units and each unit has n nodes, first establish the unit node surface force coordination unit node database A and the reverse sign database B:
[0044]
[0045] (2) Loop through all cells and add nodes (m1, m2, ..., m n) is stored in the unit node library A, and at the same time, it is checked whether there is the same node code in A. If so, the point is inverted:
[0046]
[0047] (3) When the unit is calculated, the corresponding value in database B is read to determine whether the jth node of the i-th unit needs to execute boundary condition 2:
[0048]
[0049] Beneficial effects:
[0050] (1) The single-thread serial and multi-thread parallel regional block integrated flexibility matrix method established by the present invention has high computational efficiency and excellent scalability, can automatically read the spatial Z-axis coordinate vector and node code, and expand the regional block method of the two-dimensional plane model to the regional block method of the three-dimensional space model.
[0051] (2) The method of integrating the flexibility matrix by single-thread serial and multi-thread parallel regional blocks established by the present invention can support multi-level blocks and further improve the integration efficiency of the flexibility matrix. The proposed method makes it possible to perform large-scale calculations on the subsequent recycled concrete model.
[0052] (3) The regional block integration flexibility matrix method proposed in the present invention has significantly different characteristics from the conventional regional decomposition method, mainly manifested in: 1) the number of units in each sub-region after block division is not limited, and the units do not need to be continuously distributed in the sub-region; 2) there is no distinction between internal nodes and external nodes, and all nodes have the same attributes; 3) the node codes of the units do not need to be arranged counterclockwise, and the node codes can be sorted arbitrarily; 4) it is suitable for both single-thread serial calculations and multi-thread parallel calculations; 5) only the flexibility matrix is integrated, and no sub-domain condensation and back substitution solution processes are performed; 6) it has excellent scalability and can be directly expanded from two dimensions to three dimensions without any modification. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 This is a schematic diagram of a regional block (two-dimensional area);
[0054] Figure 2 This is a schematic diagram of a regional block (three-dimensional area);
[0055] Figure 3 It is a schematic diagram of multiple regional divisions (two-dimensional area);
[0056] Figure 4 It is a schematic diagram of multiple regional divisions (three-dimensional area);
[0057] Figure 5It is a schematic diagram of the node displacement verification results obtained by matrix block method and least square method;
[0058] Figure 6 This is the flow chart of the single-thread serial regional block integrated flexibility matrix algorithm of the base surface force element method;
[0059] Figure 7 This is the data structure diagram of the base force element method before and after optimization;
[0060] Figure 8 This is the flow chart of the multi-threaded parallel regional block integration flexibility matrix algorithm of the base surface force element method;
[0061] Fig. 9 Calculates time for single-threaded serial region chunking;
[0062] Fig.10 This is a comparison chart of the calculation time of the ordinary algorithm of the complementary energy principle basis force element method, the single-thread serial regional block integrated flexibility matrix algorithm, and the multi-thread parallel regional block integrated flexibility matrix algorithm. DETAILED DESCRIPTION
[0063] The technical solution of the present invention is described in detail below with reference to the accompanying drawings, but the protection scope of the present invention is not limited to the embodiments.
[0064] The present invention discloses a high-performance serial and parallel region block integrated flexibility matrix method, including a single-thread serial region block integrated flexibility matrix algorithm and a multi-thread parallel region block integrated flexibility matrix algorithm, and establishes a matrix block method for solving nonlinear equations.
[0065] 1. Single-threaded serial region block integrated flexibility matrix algorithm
[0066] The single-threaded serial region block integrated flexibility matrix algorithm refers to dividing the solution domain into a number of independent sub-regions, each sub-region separately integrating the flexibility matrix and Lagrange multiplier matrix of the region, and constructing the coefficient term matrix of the nonlinear equation group based on the flexibility matrix and Lagrange multiplier matrix of each sub-region.
[0067] During the integration process of the flexibility matrix, each sub-region is independent of each other and there is no data transfer. The number of elements within each sub-region or the proportional relationship of the number of elements between regions is not restricted by any conditions, and the order of the elements is not restricted by continuity. Although the single-threaded serial region-block integration flexibility matrix algorithm divides the solution domain into several sub-regions, the flexibility matrix is still integrated in the order of block numbers during integration, without involving multi-core parallel integration, which is serial integration and lays an algorithmic foundation for establishing a multi-threaded parallel integration method for the flexibility matrix. The method of region-block integration of the flexibility matrix has excellent scalability and is applicable to both two-dimensional and three-dimensional solution domains. It supports both single-region block division and multi-level region block division of the solution domain.
[0068] 1.1. The single-threaded serial region-block integration flexibility matrix algorithm divides the solution domain using the region-block method. In the multi-threaded parallel region-block integration flexibility matrix algorithm described later, the solution domain is also divided using the region-block method.
[0069] The region-block method includes a single-region block method or a multi-region block method;
[0070] 1.1.1. The single-region block method, the specific operation steps are as follows:
[0071] (1). Assume there is an arbitrary two-dimensional solution region ABCD, labeled as P, and the number of discretized elements is n; before integrating the flexibility matrix, decompose the solution domain P into m (1 < m < n) sub-regions, and the sub-regions are labeled as P m , where the minimum is 1 part and the maximum is n parts, and the schematic diagram is as Figure 1 shown.
[0072] Although there is no limit to the number of elements within each region, in order to obtain the optimal calculation efficiency, the degrees of freedom between sub-regions should be avoided from being too different. Except for the last region, the number of elements and the number of degrees of freedom in other sub-regions should be as consistent as possible, but no mandatory requirements are made. The starting and ending ranges of the element encoding for each sub-region are:
[0073]
[0074] where N i is the i-th sub-region, N i1 , N i2 are the starting element encoding and ending element encoding of this sub-region, and p is the number of elements in each sub-region.
[0075] To avoid element number overflow, the algorithm sets a termination command for the sub-region element number. The ending element encoding of the m-th sub-region (the last one) is n, that is:
[0076]
[0077] (2) The one-time regional block method established by the present invention has excellent scalability. By introducing the physical quantity in the Z direction of space, the regional block method of the three-dimensional solution domain can be established without making any changes to the algorithm. The schematic diagram of the regional block of the three-dimensional solution domain is shown in Figure 2 shown.
[0078] 1.1.2 Multiple regional block methods:
[0079] Although the primary domain decomposition can greatly improve the computational efficiency, its efficiency will tend to stabilize when the solution domain is large. At this time, if the number of sub-regions is further increased, the integration efficiency of the flexibility matrix will be reduced. Therefore, the present invention proposes a multiple domain block method, that is, to continue to block the sub-regions that have been divided. This method is mainly aimed at the flexibility matrix integration problem of the solution domain with a large number of units and a number of degrees of freedom of millions or even higher. Taking the secondary block division and dividing each sub-region into four blocks as an example, the block division results are as follows: Figure 3 Similarly, multiple region partitioning technology is also applicable to three-dimensional spatial structures. Taking the secondary partitioning and dividing each sub-region into four blocks as an example, the partitioning results are as follows: Figure 4 shown.
[0080] According to the single-thread serial region partitioning technology established by the present invention, the discretized two-dimensional or three-dimensional solution domain can be partitioned multiple times. When the solution domain is partitioned once, the computational efficiency of the single-thread serial algorithm can be improved by about 10 times. Subsequently, the computational efficiency can be improved by about 10% again for each multiple partitioning of all sub-regions. However, after reaching a certain number of times, the computational efficiency will tend to be stable if the number of partitions is continuously increased.
[0081] 1.2 Based on the characteristics of the basis force element method, the present invention establishes a method for storing the flexibility matrix and the Lagrange multiplier matrix in a one-dimensional sparse matrix, and constructs a nonlinear equation group.
[0082] The sparse matrix stores data in the following manner: the flexibility matrix or multiplier matrix is stored as three columns D, R, and C, where D is the non-zero value in A, R is the row where the non-zero value is located, and C is the column where the non-zero value is located.
[0083] Take a 6×6 flexibility matrix A as an example:
[0084]
[0085] The flexibility matrix is stored as three columns D, R, and C, where D is the non-zero value in A, R is the row where the non-zero value is located, and C is the column where the non-zero value is located, as shown in Formula 4:
[0086]
[0087] The use of sparse matrix storage unit flexibility matrix and Lagrange multiplier matrix can greatly save storage memory. Only less memory is needed to store a large amount of data, making it possible for microcomputers to run large-scale numerical operations.
[0088] 1.3 Based on the characteristics of the basis force element method, a matrix block method for solving nonlinear equations is established.
[0089] The commonly used method for solving nonlinear equations is the least square method, which is also relatively easy to implement in MATLAB and has high efficiency and accuracy, but it is easy to report errors or have no solution for matrices that are close to singular. Therefore, the present invention establishes a method for solving equations by matrix block based on the integration rule of coefficient terms of the basis force element method.
[0090] The matrix block method for solving nonlinear equations is established based on the characteristics of the coefficient matrix of the basis element method. When the least squares method cannot be used to solve the equation, the matrix block method can be used to solve the equation. However, since the matrix block method involves multiplication or division between large matrices, the calculation speed is slower than the least squares method.
[0091] The matrix block method is applicable to the single-thread serial region block integrated flexibility matrix algorithm and the multi-thread parallel region block integrated flexibility matrix algorithm.
[0092] 1.3.1. The process of solving nonlinear equations by matrix block method:
[0093] Assuming that the solution domain is discretized into n units and the solution domain has a total of m degrees of freedom, the expression of the nonlinear equation system is:
[0094] A (m+3n)×(m+3n) X (m+3n)×1 =B (m+3n)×1 (5)
[0095] In the formula, the coefficient term A (m+3n)根(m+3n) It consists of the overall flexibility matrix and the Lagrange multiplier matrix. The matrix expression is:
[0096]
[0097] D m×m is the overall flexibility matrix, L m×3n is the Lagrange multiplier matrix;
[0098] Constant term B (m+3n)×1 Consists of displacement or force boundary conditions:
[0099] B (m+3n)×1 =[B m×1 0] T (7)
[0100] Then, formula (5) can be expressed as:
[0101]
[0102] According to mathematical theorem, when |D m×m |≠0, and M=|-L T D -1 L|≠0, then the non-homogeneous system of equations has a unique solution, which is:
[0103] X=[X1 X2] T (9)
[0104] in,
[0105] X2=(-L T D -1 L) -1 (-L T D -1 B) (10)
[0106] Then, X1 can be obtained as:
[0107] X1=D -1 (B-LX2) (11)
[0108] It should be noted that if the matrix is used to solve the equations in blocks, there is no need to consider the influence of the Lagrange multiplier when solving the node displacement, because the Lagrange multiplier has been introduced in X1 and X2 when solving the equations in the matrix.
[0109] Therefore, the nodal displacement formula is:
[0110]
[0111] In the formula, δ x represents the displacement of the node in the x direction, δ y represents the displacement of the node in the y direction, C represents the flexibility matrix, T represents the force on the node, x represents along the x direction, and y represents along the y direction; δ α is the node displacement of α, C αxβx is the contribution of the x-coordinate of node β to the flexibility of node α in the x-direction, C αxβy is the contribution of the y-coordinate of node β to the flexibility of node α in the x-direction, C αyβx is the contribution of the x-coordinate of node β to the flexibility of node α in the y direction, C αyβy is the flexibility contribution of the y-coordinate of node β to the y-direction of node α; T βx is the nodal force component of node β in the x direction, T βy is the nodal force component of node β in the y direction.
[0112] 1.3.2 The accuracy of the above matrix partitioning method is verified by:
[0113] A single-medium two-dimensional model is established, and the uniaxial displacement compression load is taken as an example to verify the numerical calculation precision and accuracy of the established matrix block solution of the equation group, and the obtained results are compared and analyzed with the theoretical solution and the calculation results of the least squares method.
[0114] Assume boundary conditions such as Figure 5 As shown in (a), the model size is 10mm×10mm, the mesh type is triangular mesh, and the mesh size is 1mm. A downward displacement load is applied to the edge mid-node position of the top triangular unit, and the displacement is 0.005mm. The model elastic modulus is 1MPa, Poisson's ratio is 0, and the tensile strength is 1MPa. The displacement of any point along the height direction is:
[0115]
[0116] The unit node of the complementary energy principle base force element method is the edge mid-node, and the theoretical solution of the edge mid-node displacement value in different height directions is:
[0117] Table 1-1 Vertical displacement solutions along the model height y direction / 10 -4 mm
[0118]
[0119] The node displacements obtained by matrix block method and least squares method are as follows Figure 5 As shown in (b) in . It can be found that the numerical results obtained by the matrix block method are completely consistent with the theoretical solution and the least squares method results, indicating that the matrix block method for solving nonlinear equations established in the present invention has high accuracy and can obtain ideal numerical results. Therefore, this method can be used when the matrix is singular and cannot be solved using the least squares method.
[0120] The single-threaded serial regional block integrated flexibility matrix algorithm proposed in the present invention has the basic idea of dividing the solution domain into several sub-regions. The sub-regions do not need any data exchange and any condition restrictions, and can independently integrate the overall flexibility matrix and Lagrange multiplier matrix of the region. In addition, the method has excellent spatial scalability. For three-dimensional problems, it can automatically read the unit and node information in the Z direction of space, and expand the regional block method for two-dimensional problems to the regional block method for three-dimensional problems. The present invention stores the coefficient term matrix and the constant term matrix through a one-dimensional sparse matrix, and based on the characteristics of the coefficient term matrix, establishes a matrix block method for solving nonlinear equations.
[0121] Through MATLAB software, a single-threaded serial regional block integrated flexibility matrix algorithm for plane and space models is compiled. The algorithm flow chart is as follows Figure 6 As shown in the figure. Although the single-threaded serial regional block algorithm can greatly improve the computational efficiency and shorten the computational time, it still takes a lot of time for big data storage and large matrix operations of complex three-dimensional space problems, and cannot meet the needs of high-speed computing. The time consumption of the single-threaded serial regional block algorithm is mainly concentrated in the calculation of the unit flexibility matrix, the Lagrange multiplier matrix, and the integration of the overall coefficient term matrix, which accounts for about 90% to 95% of the total time. Therefore, it is particularly important to further expand the regional block technology and combine it with the MATLAB parallel toolbox to study the multi-threaded parallel regional block algorithm.
[0122] 2. Multi-threaded parallel region block integrated flexibility matrix algorithm
[0123] The parallel computing of finite element static problems can be divided into two categories: one is to develop efficient parallel computing methods for solving nonlinear equations based on the problem of solving nonlinear equations; the other is to develop regional decomposition parallel computing methods based on the solution domain itself. For the first type of problem, it has been solved by the matrix block method and the least squares method for solving the equations in the above-mentioned single-threaded serial regional block integrated flexibility matrix algorithm. Therefore, for the second type of problem, starting from the solution domain itself, the data transfer structure of the single-threaded serial regional block integrated flexibility matrix algorithm is optimized, and a multi-threaded parallel regional block integrated flexibility matrix algorithm is established to further improve the algorithm execution efficiency.
[0124] 1) The multi-threaded parallel regional block integrated flexibility matrix algorithm refers to dividing the solution domain into several independent sub-regions, completing the inverse sign information processing of the node force boundary conditions required by each sub-region before parallel calculation, and integrating the directional flexibility matrix and directional Lagrange multiplier matrix according to the contribution of the nodes in the sub-region in the x and y directions respectively; secondly, integrating the contribution of the nodes in the sub-region to the flexibility matrix and the multiplier matrix according to the x and y directions into the overall flexibility matrix and the overall Lagrange multiplier matrix respectively; finally, based on the integrated overall flexibility matrix and the overall Lagrange multiplier matrix; establishing a sparse matrix to store the overall flexibility matrix and the overall Lagrange multiplier matrix, and constructing the coefficient term matrix of the nonlinear equation group.
[0125] The multi-threaded parallel region block integrated flexibility matrix algorithm proposed in the present invention gives full play to the high-efficiency performance of multi-core and multi-node computers. At the same time, according to the data structure characteristics of the complementary energy principle basal force element method, the data transmission structure is optimized, and the inverse sign information processing of the node force boundary conditions required by each sub-region is completed before parallel calculation, and the inverse sign information can be directly read in parallel. In addition, the contribution of the nodes in the sub-region to the flexibility matrix is divided into the contribution of the nodes to the flexibility matrix in the x and y directions respectively. During parallel calculation, the balanced load between multiple cores can bring the performance of the computer to the best state. Therefore, when dividing the blocks, the number of units in each sub-region should be ensured to be consistent as much as possible, but it is not a mandatory requirement.
[0126] 2) Optimize data transmission structure
[0127] After discretizing the solution domain through meshing technology, it is necessary to traverse all units, execute the node force boundary condition judgment algorithm, determine the reverse node of the unit, integrate the flexibility matrix and solve the Lagrange multiplier. In the single-threaded algorithm, the flexibility matrix and Lagrange multiplier are stored in arrays D and L respectively, and the flexibility matrix and Lagrange multiplier of each unit are integrated into the overall flexibility matrix and multiplier matrix according to the degree of freedom indication data.
[0128] In the existing surface force element method theory and related work, the sign of the specified local node code of the unit is reversed to meet the surface force coordination constraint conditions. However, this method is only applicable to regularly divided quadrilateral units or hexahedral units. For other units or unstructured grids, irregular node code arrangement may occur, resulting in erroneous sign reversal.
[0129] In view of the above situation, the present invention optimizes the data transmission structure of the complementary energy principle-based surface force element method, and proposes a surface force coordination constraint condition processing method applicable to any unit type, any number of nodes, and any mesh subdivision, that is, a method for processing the inversion information of the node force boundary condition. This method can automatically traverse all nodes of all units, and then determine one by one whether the node needs to be inverted.
[0130] Taking a two-dimensional element as an example, the method and process for automatically determining the coordination of the element boundary surface force (i.e., the method for processing the inverse sign information of the node force boundary condition) are as follows:
[0131] The coordination condition 2 of the unit node surface force is:
[0132]
[0133] (1) Assuming there are m units and each unit has n nodes, first establish the unit node surface force coordination unit node library A and the reverse sign database B:
[0134]
[0135] (2) Loop through all units and add nodes (m1, m2, ..., m n ) is stored in the unit node library A, and at the same time, it is checked whether there is the same node code in A. If so, the point is inverted:
[0136]
[0137] (3) When the unit is calculated, the corresponding value in database B is read to determine whether the jth node of the i-th unit needs to execute boundary condition 2:
[0138]
[0139] This identification method has excellent scalability. For the unit surface force coordination condition 2 of the three-dimensional unit model, it can determine whether the nodes in the surface need to be reversed without making other modifications.
[0140] Secondly, in the optimized data structure, the surface force coordination constraint processing module is executed before the flexibility matrix is integrated to reduce the time consumption in the flexibility matrix integration process. In addition, based on the basic surface force theory, the present invention integrates the directional flexibility matrix and the directional Lagrange multiplier matrix according to the contribution of the unit node in the x and y directions respectively. Finally, according to the integrated overall flexibility matrix and the overall Lagrange multiplier matrix, the coefficient term matrix of the nonlinear equation group is constructed. The single-thread serial data transmission structure before optimization and the multi-thread parallel data transmission structure after optimization are shown in FIG. Figure 7 shown.
[0141] The optimized data transmission structure of the base surface force element method adjusts the judgment process of the node surface force coordination constraint conditions to before the integration of the flexibility matrix, avoiding the influence of the surface force coordination constraint condition judgment on the efficiency. At the same time, the contribution of the node to the flexibility matrix and the multiplier matrix is integrated into the overall flexibility matrix and the overall Lagrange multiplier matrix in the x and y directions, which is equivalent to reducing the number of single cycles of the node by half, further improving the execution efficiency of the algorithm. In addition, this method has excellent scalability. By adding the unit information, node information and boundary conditions of the model in the Z direction, a multi-threaded parallel regional block algorithm for three-dimensional problems can be established. The optimized data transmission structure provides efficient algorithm support for large-scale numerical simulation analysis of recycled concrete for plane and space problems.
[0142] The multi-threaded parallel regional block integrated flexibility matrix algorithm for plane and space problems was compiled through MATLAB software. The multi-threaded parallel regional block integrated flexibility matrix calculation method for plane and space problems was established, which optimized the data transmission structure of the complementary energy principle basal force element method. Taking the two-dimensional algorithm as an example, the algorithm flow chart is as follows Figure 8 shown.
[0143] 3. Efficiency Analysis of Regional Block Algorithm
[0144] The execution efficiency of single-thread serial region partitioning and multi-thread parallel region partitioning algorithms is analyzed through a large number of numerical examples. Taking a two-dimensional model with a size of 100mm×100mm as an example, the mesh sizes are 2.0mm, 1.0mm, 0.8mm, 0.6mm, 0.5mm,
[0145] The 0.4 mm mesh model is analyzed. Taking the initial algorithm of the complementary energy principle basal force element method as the benchmark, the execution efficiency of the single-thread serial region block algorithm and the multi-thread parallel region block algorithm is compared and studied. The unit information and number of degrees of freedom of the mesh model are shown in Table 2.
[0146] Table 2 Unit information
[0147]
[0148]
[0149] (1) Efficiency of single-threaded serial region partitioning algorithm
[0150] The computational efficiency of the single-thread serial regional block algorithm proposed in this invention is affected by the number of regional blocks. In order to quantitatively analyze the influence of the number of blocks, the number of blocks is set to 1, 5, 10, 50, 100, 200, 500, 1000, and 2000, for a total of nine cases. Among them, when the number of blocks is 1, it means that the regional block algorithm is not running, which is a normal algorithm. The relationship between the single-step loading time and the number of regional blocks is as follows: Fig. 9 As shown in the figure, when the number of regional blocks is 10, the efficiency is improved by 4 to 12 times; but as the number of blocks increases, the calculation efficiency is slightly improved, but the improvement is small.
[0151] (2) Efficiency of multi-threaded parallel region partitioning algorithm
[0152] This section studies the efficiency of the multi-threaded parallel region partitioning algorithm. The number of region partitions is set to 100, and 4 threads and 8 threads are called for calculation respectively. The calculation results are shown in Table 3.
[0153] Table 3 Single-step loading calculation time / s
[0154]
[0155] As can be seen from Table 3, if a single-threaded block algorithm is used, the computational efficiency can only be improved by 4 to 12 times, while by using multi-threaded block parallel computing, the computational speed of 4 threads can be increased by 12 to 27 times, and the computational speed of 8 threads can be further increased to 15 to 63 times, and the computational efficiency is greatly improved. The above results show that the single-threaded serial region block integrated flexibility matrix algorithm and the multi-threaded parallel region block integrated flexibility matrix algorithm proposed in the present invention have high computational efficiency, making it possible for personal microcomputers to run large-scale engineering simulations.
[0156] Fig.10 The calculation time of the common algorithm of the complementary energy principle basal force element method, the single-thread serial regional block integrated flexibility matrix algorithm and the multi-thread parallel regional block integrated flexibility matrix algorithm are intuitively displayed. It can be found that for large-scale engineering calculations, when the number of degrees of freedom is less than 100,000, the calculation performance of the single-thread serial regional block and the multi-thread parallel regional block algorithm is not much different; but as the number of degrees of freedom continues to increase, the calculation efficiency of the multi-thread parallel algorithm is better than that of the single-thread serial algorithm.
[0157] (3) Analysis of the efficiency of solving nonlinear equations
[0158] The Lagrange multiplier method is used to release the constraints. By introducing new parameters (Lagrange multipliers), the constraint function is combined with the original function to make the unknown quantity equal to the number of equations. Due to the introduction of new parameters, the order of the equation increases by the sum of the number of degrees of freedom and three times the number of units. The nonlinear equations formed by sparse matrices are solved by the least squares method. The relationship between the solution time and the number of equations is shown in Table 4.
[0159] Table 4 Number of equations and time to solve equations / s
[0160]
[0161] As shown in Table 4, the least squares method combined with sparse matrices has a high efficiency in solving the equation system. For a model with an equation size of about 400,000, the solution time is about 20 seconds, making it possible for MATLAB software to run large-scale engineering numerical calculations on a microcomputer platform.
[0162] In summary, the present invention first proposes a single-thread serial regional block integration flexibility matrix algorithm, then optimizes the data transmission structure of the complementary energy principle basis force element method and establishes a multi-thread parallel regional block integration flexibility matrix algorithm. At the same time, according to the characteristics of the coefficient term matrix of the complementary energy principle basis force element method, a matrix block method for solving nonlinear equations is established.
[0163] The regional blocking method proposed in the present invention is to divide the solution domain into several independent sub-regions, and each sub-region separately integrates the flexibility matrix of the region. This method avoids the communication delay and time overhead caused by data transmission when integrating the flexibility matrix of each sub-region. In addition, when the method blocks the solution domain, it is not restricted by any conditions and can be divided at will, and the method supports one-time blocking and multi-level blocking. At the same time, the method can simultaneously support single-thread serial calculation and multi-thread parallel calculation, and also has excellent scalability. It can automatically read the unit information, node information and boundary conditions of the model in the Z-axis direction, and expand the method to a regional blocking method for three-dimensional problems.
[0164] The single-threaded serial regional blocking method can improve the efficiency by 4 to 12 times, and the multi-threaded parallel regional blocking method can improve the efficiency by 12 to 63 times, which greatly shortens the integration time of the flexibility matrix. This shows that the single-threaded serial regional blocking integrated flexibility matrix algorithm and the multi-threaded parallel regional blocking integrated flexibility matrix algorithm established by the present invention have high computational efficiency, making it possible for personal microcomputers to run large-scale engineering simulations.
[0165] At the same time, the present invention establishes a data storage structure based on sparse matrices, and establishes a method for solving large nonlinear equations by matrix partitioning and least squares method. For a nonlinear equation with about 400,000 equations, the solution speed is about 20 seconds, which has a high solution efficiency and improves the efficiency of the subsequent chapters to systematically study the microscopic mechanical properties of recycled concrete. The invention can make the multi-threaded parallel regional partitioning algorithm based on MATLAB language can greatly improve the calculation efficiency.
[0166] As described above, although the present invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the present invention itself. Various changes in form and details may be made without departing from the spirit and scope of the present invention as defined in the appended claims.
Claims
1. A method for high performance serial and parallel region block integration flexibility matrix, characterized in that: The method is used for performance analysis of recycled concrete materials based on damage mechanics, and the method includes a single-thread serial regional block integrated flexibility matrix algorithm and a multi-thread parallel regional block integrated flexibility matrix algorithm; The single-thread serial region block integrated flexibility matrix algorithm refers to dividing the solution domain into a number of independent sub-regions, each sub-region separately integrates the flexibility matrix and Lagrange multiplier matrix of the region, establishes a sparse matrix to store the flexibility matrix and Lagrange multiplier matrix, and constructs the coefficient term matrix of the nonlinear equation group; The multi-threaded parallel regional block integrated flexibility matrix algorithm refers to dividing the solution domain into a number of independent sub-regions, completing the inverse sign information processing of the node force boundary conditions required by each sub-region before parallel calculation, and integrating the directional flexibility matrix and the directional Lagrange multiplier matrix according to the contribution of the nodes in the sub-region in the x and y directions; secondly, integrating the contribution of the nodes in the sub-region to the flexibility matrix and the multiplier matrix according to the x and y directions into the overall flexibility matrix and the overall Lagrange multiplier matrix; finally, according to the integrated overall flexibility matrix and the overall Lagrange multiplier matrix, a sparse matrix is established to store the overall flexibility matrix and the overall Lagrange multiplier matrix, and the coefficient term matrix of the nonlinear equation group is constructed; In both the single-thread serial regional block integrated flexibility matrix algorithm and the multi-thread parallel regional block integrated flexibility matrix algorithm, a regional block method is used to divide the solution domain, and the regional block method includes a single regional block method or a multiple regional block method; (1) The primary region segmentation method is specifically as follows: Step 1.1): Assume that there is an arbitrary two-dimensional solution region ABCD, denoted as P, and the number of discretized elements is n; before integrating the flexibility matrix, the solution domain P is decomposed into m sub-regions, where 1 < m < n, and the sub-regions are denoted as P m , where the minimum is 1 portion and the maximum is n portions; The starting and ending ranges of each sub-region unit code are: Where N i is the ith sub-region, N i1 、N i2 is the start unit code and the end unit code of the sub-region, and p is the number of units in each sub-region; To avoid overflow of the number of units, the algorithm sets the sub-region unit number termination command, and the termination unit code of the m-th sub-region is n, that is: Step 1.2), based on step 1.1), introduce the physical quantity in the Z direction of space to establish the regional block method of the three-dimensional solution domain; (2) The multiple region partitioning method refers to continuing to partition the already partitioned sub-regions.
2. A method for high performance serial and parallel region block integration flexibility matrix according to claim 1, characterized in that: The sparse matrix stores data in the following manner: the flexibility matrix or multiplier matrix is stored as three columns D, R, and C, where D is the non-zero value in A, R is the row where the non-zero value is located, and C is the column where the non-zero value is located.
3. The method of high performance serial and parallel region block integrated flexibility matrix according to claim 1, characterized in that: In the single-thread serial region block integrated flexibility matrix algorithm and the multi-thread parallel region block integrated flexibility matrix method, the nonlinear equation group solving method is the matrix block method; The process of solving nonlinear equations by matrix block method is as follows: Step A: Assume that the solution domain is discretized into n units and the solution domain has a total of m degrees of freedom. Then the expression of the nonlinear equation system is: A (m+3n)×(m+3n) X (m+3n)×1 =B (m+3n)×1 (5) In the formula, the coefficient term A (m+3n)×(m+3n) It consists of the overall flexibility matrix and the Lagrange multiplier matrix. The matrix expression is: D m×m is the overall flexibility matrix, L m×3n is the Lagrange multiplier matrix; Constant term B (m+3n)×1 Consists of displacement or force boundary conditions: B (m+3n)×1 =[B m×1 0] T (7) Then, formula (5) can be expressed as: According to mathematical theorem, when |D m×m |≠0, and M=|-L T D -1 L|≠0, then the non-homogeneous system of equations has a unique solution, which is: X=[X1 X2] T (9) in, X2=(-L T D -1 L) -1 (-L T D -1 B) (10) Then, X1 can be obtained as: X1=D -1 (B-LX2) (11) Therefore, the nodal displacement formula is: In the formula, δ x represents the displacement of the node in the x direction, δ y represents the displacement of the node in the y direction, C represents the flexibility matrix, T represents the force on the node, x represents along the x direction, and y represents along the y direction; δ α is the node displacement of α, C αxβx is the contribution of the x-coordinate of node β to the flexibility of node α in the x-direction, C αxβy is the contribution of the y-coordinate of node β to the flexibility of node α in the x-direction, C αyβx is the contribution of the x-coordinate of node β to the flexibility of node α in the y direction, C αyβy is the flexibility contribution of the y-coordinate of node β to the y-direction of node α; T βx is the nodal force component of node β in the x direction, T βy is the nodal force component of node β in the y direction.
4. The method of high performance serial and parallel region block integrated flexibility matrix according to claim 1, characterized in that: The multi-threaded parallel regional block integrated flexibility matrix algorithm and the method for processing the inverse information of the node force boundary conditions are as follows: In a two-dimensional element, the element node force coordination condition is: represents the force on the boundary V in the direction of surface A, represents the force on the boundary V in the direction of surface B, the two are equal in magnitude and opposite in direction; (1) Assuming there are m units and each unit has n nodes, first establish the unit node surface force coordination unit node library A and the reverse sign database B: (2) Loop through all units and add nodes (m1, m2, ..., m n ) is stored in the unit node library A, and at the same time, it is checked whether there is the same node code in A. If so, the point is inverted: (3) When the unit is calculated, the corresponding value in database B is read to determine whether the jth node of the i-th unit needs to execute the boundary condition:
