Aircraft simulation method and device based on parallel block sparse matrix incomplete LU decomposition, equipment and medium

By constructing a block sparse matrix for parallel processing and utilizing GPU thread bundles for parallel block-inside and outside updates, the efficiency bottleneck of incomplete LU decomposition in large-scale parallel computing is solved, improving the computational efficiency and parallel scalability of aircraft simulation.

CN121051876BActive Publication Date: 2026-02-17CALCULATION AERODYNAMICS INST CHINA AERODYNAMICS RES & DEV CENT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511587725.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-03
Publication Date
2026-02-17
Estimated Expiration
2045-11-03

AI Technical Summary

Technical Problem

Existing incomplete LU decomposition methods suffer from efficiency bottlenecks in large-scale parallel computing environments, especially in complex unstructured meshes. Data dependencies and irregular matrix sparse structures limit the parallel performance of traditional ILU decomposition methods, resulting in low computational efficiency and poor parallel scalability, which restricts the efficiency of large-scale engineering simulations.

Method used

The method based on incomplete LU decomposition of parallel block sparse matrix is ​​proposed. By constructing a block sparse matrix, the dependency pairs of non-zero sub-blocks are determined, and parallel processing is performed using GPU thread bundles, including intra-block and inter-block update operations. This fully utilizes the parallel computing resources of the GPU to improve computational efficiency and parallel scalability.

Benefits of technology

It improves the computational efficiency of incomplete LU decomposition in multi-physics parameter coupled simulation, enhances the efficiency of large-scale aircraft simulation, and makes full use of the parallel computing resources of GPU.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121051876B_ABST
    Figure CN121051876B_ABST
Patent Text Reader

Abstract

The application discloses an aircraft simulation method and device based on parallel block sparse matrix incomplete LU decomposition, equipment and medium, relates to simulation technical field, including: based on each grid point in aircraft grid topology relation and simulation physical parameter constructs and contains several zero sub-block and non-zero sub-block block sparse matrix, and determines several non-zero sub-block corresponding dependent pair and stores by using preset data structure from it;Wherein the dependent pair includes a pair of matched non-zero sub-block;Several non-zero sub-block is respectively distributed to several GPU thread bundles and is handled in parallel, to utilize GPU thread bundle in corresponding non-zero sub-block dependent pair after completing update, based on the dependent pair of completing update, the corresponding non-zero sub-block is updated;After several non-zero sub-block all complete update, based on the several non-zero sub-block of completing update, the block sparse matrix is updated, and the incomplete LU decomposition result is determined according to the updated block sparse matrix to carry out aircraft simulation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of simulation technology, in particular to an aircraft simulation method and device based on parallel block sparse matrix incomplete LU decomposition, equipment and medium. BACKGROUND

[0002] In recent years, with the increasing demand for computing efficiency in scientific computing and engineering simulation, sparse matrix operation has become a key bottleneck restricting large-scale engineering simulation. As an algebraic preconditioning technique that preserves the sparsity of the matrix, incomplete LU factorization (ILU) has become a standard preconditioning scheme for solving Navier-Stokes equations in computational fluid dynamics (CFD), finite element calculations in structural analysis, and solving Maxwell equations in electromagnetic simulation, etc. In particular, in a large-scale parallel computing environment, the performance of the ILU preconditioner often directly determines the computing efficiency of the entire simulation process, which makes its optimization an important breakthrough to improve the efficiency of large-scale engineering simulation.

[0003] Incomplete LU decomposition (ILU) is an approximate decomposition method that preserves the sparsity of the matrix, which decomposes the matrix A into the product of lower triangular matrix L and upper triangular matrix U (A≈LU), but only preserves the non-zero pattern of the original matrix compared to complete LU decomposition. Block-ILU is a block structure extension of ILU, designed specifically for block sparse matrices commonly found in multi-physical field simulation, coupled systems, and partial differential equation discretization, where interacting variables form locally dense submatrices in the global sparse matrix.

[0004] However, the current incomplete LU decomposition (ILU) and its block structure version (Block-ILU) still face significant efficiency bottlenecks in practical applications, especially in complex unstructured grids. Data dependency and irregular matrix sparsity restrict the parallel performance of traditional ILU decomposition methods, which is manifested in the following aspects: traditional ILU decomposition has strict forward and backward dependencies, resulting in inherent serial characteristics of the algorithm, making it difficult to achieve effective parallel acceleration; although the existing Block-ILU implementation improves data locality through block structure, it still lacks efficient parallel strategies for block sparse matrix decomposition. This makes traditional ILU decomposition methods perform poorly in terms of computational efficiency and parallel scalability in multi-variable coupled problems, which severely restricts the efficiency of large-scale engineering simulation. SUMMARY

[0005] Therefore, the application aims to provide an aircraft simulation method and device based on parallel block sparse matrix incomplete LU decomposition, a simulation equipment and medium, which can fully utilize the parallel computing resources of GPU, improve the calculation efficiency and parallel scalability of incomplete LU decomposition in multi-physical parameter coupling simulation, and further improve the efficiency of large-scale aircraft simulation.

[0006] In a first aspect, the application provides an aircraft simulation method based on parallel block sparse matrix incomplete LU decomposition, applied to a GPU, comprising:

[0007] Constructing a block sparse matrix based on the topological relationship of each grid point in an aircraft grid and the simulation physical parameters of the grid points; the block sparse matrix includes a plurality of zero sub-blocks and a plurality of non-zero sub-blocks;

[0008] Based on the positions of the plurality of non-zero sub-blocks in the block sparse matrix, determining the dependent pairs corresponding to the plurality of non-zero sub-blocks respectively, and storing the dependent pairs corresponding to the plurality of non-zero sub-blocks respectively by using a preset data structure; wherein a dependent pair includes a pair of matched non-zero sub-blocks;

[0009] Distributing the plurality of non-zero sub-blocks to a plurality of GPU thread bundles for parallel processing, so as to update the corresponding non-zero sub-blocks based on the completed dependent pairs after the corresponding dependent pairs of the non-zero sub-blocks are updated by the GPU thread bundles;

[0010] After the plurality of non-zero sub-blocks are all updated, updating the block sparse matrix based on the plurality of non-zero sub-blocks that have been updated, and determining an incomplete LU decomposition result according to the updated block sparse matrix, so as to use the incomplete LU decomposition result for aircraft simulation.

[0011] Optionally, the number of sub-blocks in each row and each column of the block sparse matrix is the same as the number of grid points, and the number of rows and columns inside the sub-blocks in the block sparse matrix is the same as the number of types of simulation physical parameters;

[0012] The sub-block at the target position in the block sparse matrix is a non-zero sub-block, and the sub-blocks at the remaining positions are zero sub-blocks; the target position is a position in the block sparse matrix corresponding to any two grid points in the grid points that meet a preset position condition;

[0013] The sub-block at the target position in the block sparse matrix is a matrix constructed based on the coupling relationship of the simulation physical parameters of the any two grid points.

[0014] Optionally, the preset position condition includes that the any two grid points are located in the same grid unit in the aircraft grid.

[0015] Optionally, the determining the dependency pair corresponding to each of the plurality of non-zero sub-blocks based on the positions of the plurality of non-zero sub-blocks in the block-sparse matrix comprises:

[0016] determining, from the block-sparse matrix, a first non-zero sub-block located left to and in the same row as each of the plurality of non-zero sub-blocks;

[0017] determining, from the block-sparse matrix, a second non-zero sub-block located above and in the same column as each of the plurality of non-zero sub-blocks;

[0018] matching, from the second non-zero sub-block, a target non-zero sub-block corresponding to each of the non-zero sub-blocks in the first non-zero sub-block, wherein the column number of each of the non-zero sub-blocks in the first non-zero sub-block is the same as the row number of the matched target non-zero sub-block;

[0019] determining the dependency pair corresponding to each of the plurality of non-zero sub-blocks based on each of the non-zero sub-blocks in the first non-zero sub-block and the matched target non-zero sub-block.

[0020] Optionally, the distributing the plurality of non-zero sub-blocks to a plurality of GPU thread bundles for parallel processing, and updating the corresponding non-zero sub-block based on the completed dependency pair after the GPU thread bundle completes updating of the corresponding dependency pair, comprises:

[0021] distributing the plurality of non-zero sub-blocks to a plurality of GPU thread bundles for parallel processing;

[0022] if the GPU thread bundle determines that the corresponding non-zero sub-block does not have a corresponding dependency pair, performing an intra-block update operation on the corresponding non-zero sub-block by the GPU thread bundle, so that each thread in the GPU thread bundle updates each element in the corresponding non-zero sub-block according to a predetermined intra-block element update order corresponding to the corresponding non-zero sub-block, and marks the corresponding non-zero sub-block as being in a completed update state after each element in the corresponding non-zero sub-block is updated;

[0023] If the GPU thread bundle determines that the corresponding dependent pair exists for the corresponding non-zero sub-block, the GPU thread bundle performs an inter-block update operation on the corresponding non-zero sub-block to perform a matrix multiplication operation on the dependent pair that has completed the update after the corresponding dependent pair of the corresponding non-zero sub-block completes the update, to obtain a target matrix, and each thread in the GPU thread bundle updates each element in the corresponding non-zero sub-block in parallel according to the target matrix, to perform the intra-block update operation on the corresponding non-zero sub-block that has completed the inter-block update by the GPU thread bundle after each element in the corresponding non-zero sub-block completes the inter-block update, and marks the corresponding non-zero sub-block as being in a state of completing the update after each element in the corresponding non-zero sub-block completes the intra-block update.

[0024] Optionally, the preset intra-block element update sequence includes a first intra-block element update sequence corresponding to a non-zero sub-block below a diagonal line in the block sparse matrix, a second intra-block element update sequence corresponding to a non-zero sub-block above the diagonal line in the block sparse matrix, and a third intra-block element update sequence corresponding to a non-zero sub-block on the diagonal line in the block sparse matrix.

[0025] The first intra-block element update sequence includes sequentially updating each column element in a non-zero sub-block in parallel in a column-first order.

[0026] The second intra-block element update sequence includes sequentially updating each row element in a non-zero sub-block in parallel in a row-first order.

[0027] The third intra-block element update sequence includes sequentially updating each diagonal element in a non-zero sub-block and an element in the same row and column as the diagonal element in parallel in a diagonal line order.

[0028] Optionally, the determining the incomplete LU decomposition result according to the updated block sparse matrix includes:

[0029] determining a lower triangular matrix based on a sub-block below a diagonal line in the updated block sparse matrix;

[0030] determining an upper triangular matrix based on the diagonal line and a sub-block above the diagonal line in the updated block sparse matrix;

[0031] determining an incomplete LU decomposition result according to the lower triangular matrix and the upper triangular matrix.

[0032] In a second aspect, the present application provides a flight simulator based on parallel block sparse matrix incomplete LU decomposition, applied to a GPU, including:

[0033] A matrix construction module is used to construct a block sparse matrix based on the topological relationship of each grid point in the aircraft mesh and the simulation physical parameters of each grid point; the block sparse matrix includes several zero sub-blocks and several non-zero sub-blocks.

[0034] The dependency pair determination module is used to determine the dependency pairs corresponding to the non-zero sub-blocks based on their positions in the block sparse matrix, and to store the dependency pairs corresponding to the non-zero sub-blocks using a preset data structure; wherein, a dependency pair includes a pair of matching non-zero sub-blocks.

[0035] The non-zero sub-block update module is used to allocate the plurality of non-zero sub-blocks to a plurality of GPU thread bundles for parallel processing, so that after the dependency pairs corresponding to the corresponding non-zero sub-blocks are updated, the GPU thread bundles update the corresponding non-zero sub-blocks based on the updated dependency pairs.

[0036] The aircraft simulation module is used to update the block sparse matrix based on the updated non-zero sub-blocks after all the non-zero sub-blocks have been updated, and to determine the incomplete LU decomposition result based on the updated block sparse matrix, so as to use the incomplete LU decomposition result to perform aircraft simulation.

[0037] Thirdly, this application provides an electronic device, comprising:

[0038] Memory, used to store computer programs;

[0039] A processor is used to execute the computer program to implement the aforementioned aircraft simulation method based on incomplete LU decomposition of parallel block sparse matrices.

[0040] Fourthly, this application provides a computer-readable storage medium for storing a computer program that, when executed by a processor, implements the aforementioned aircraft simulation method based on incomplete LU decomposition of parallel block sparse matrices.

[0041] In the application, the GPU constructs a block sparse matrix based on the topological relationship of each grid point in the aircraft grid and the simulation physical parameters of the grid points; the block sparse matrix includes a plurality of zero subblocks and a plurality of nonzero subblocks; based on the positions of the plurality of nonzero subblocks in the block sparse matrix, the dependent pairs corresponding to the plurality of nonzero subblocks are determined respectively, and the dependent pairs corresponding to the plurality of nonzero subblocks are stored by using a preset data structure; wherein the dependent pair includes a pair of matched nonzero subblocks; the plurality of nonzero subblocks are respectively distributed to a plurality of GPU thread bundles for parallel processing, so that after the dependent pairs corresponding to the corresponding nonzero subblocks are updated by using the GPU thread bundles, the corresponding nonzero subblocks are updated based on the dependent pairs that have been updated; after the plurality of nonzero subblocks are all updated, the block sparse matrix is updated based on the plurality of nonzero subblocks that have been updated, and the incomplete LU decomposition result is determined according to the updated block sparse matrix, so that the incomplete LU decomposition result is used for aircraft simulation.

[0042] As can be seen, based on the topological relationship of each grid point in the aircraft grid and the simulation physical parameters of the grid points, the block sparse matrix including a plurality of zero subblocks and a plurality of nonzero subblocks is constructed, and after the dependent pairs corresponding to the plurality of nonzero subblocks are determined from the block sparse matrix, the dependent pairs corresponding to the plurality of nonzero subblocks are stored by using an explicit data structure, so that in the subsequent parallel processing process, the dependent pairs corresponding to the nonzero subblocks can be efficiently obtained from the explicit data structure, and the efficiency of parallel processing is improved; further, the plurality of nonzero subblocks are respectively distributed to a plurality of GPU thread bundles for parallel processing, that is, one nonzero subblock corresponds to one GPU thread bundle, so that after the dependent pairs corresponding to the corresponding nonzero subblocks are updated by using the GPU thread bundles, each element in the corresponding nonzero subblock is updated in parallel by the internal threads based on the dependent pairs that have been updated, and this parallel processing strategy can fully adapt to the architecture characteristics of the GPU, fully utilize the parallel computing resources of the GPU, improve the calculation efficiency and parallel scalability of the incomplete LU decomposition on the multi-physical parameter coupling simulation, and further improve the efficiency of large-scale aircraft simulation. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and those skilled in the art can obtain other drawings according to the provided drawings without creative labor.

[0044] Figure 1 A flow chart of an aircraft simulation method based on parallel block sparse matrix incomplete LU decomposition is disclosed in the present application.

[0045] Figure 2 A block-sparse matrix diagram disclosed by the present application;

[0046] Fig. 3(a) is a flow diagram of updating non-zero sub-blocks in a specific block-sparse matrix disclosed by the present application;

[0047] Fig. 3(b) is a flow diagram of updating non-zero sub-blocks in another specific block-sparse matrix disclosed by the present application;

[0048] Fig. 3(c) is a flow diagram of updating non-zero sub-blocks in yet another specific block-sparse matrix disclosed by the present application;

[0049] Figure 4 A comparison diagram of execution time of incomplete LU decomposition of a block-sparse matrix disclosed by the present application on a GPU;

[0050] Figure 5 A comparison diagram of execution time of incomplete LU decomposition of another block-sparse matrix disclosed by the present application on a GPU;

[0051] Figure 6 A comparison diagram of simulation execution time of different aircraft grids on different implementations disclosed by the present application;

[0052] Figure 7 A structure diagram of an aircraft simulation device based on parallel block-sparse matrix incomplete LU decomposition disclosed by the present application;

[0053] Figure 8 A structure diagram of an electronic device disclosed by the present application. DETAILED DESCRIPTION

[0054] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0055] At present, the incomplete LU decomposition (ILU) and its block structure version (Block-ILU) still face significant efficiency bottlenecks in practical applications, especially in complex unstructured grids. The data dependency and irregular matrix sparse structure limit the parallel performance of the traditional ILU decomposition method, which makes the traditional ILU decomposition method have low computational efficiency and poor parallel scalability on multivariate coupled problems. This defect seriously restricts the efficiency of large-scale engineering simulation. Therefore, the application provides an aircraft simulation method based on parallel block sparse matrix incomplete LU decomposition, which can fully utilize the parallel computing resources of GPU, improve the computational efficiency and parallel scalability of incomplete LU decomposition on multi-physical parameter coupled simulation, and further improve the efficiency of large-scale aircraft simulation.

[0056] Referring to Figure 1 As shown in the drawings, the embodiment of the application discloses an aircraft simulation method based on parallel block sparse matrix incomplete LU decomposition, which is applied to GPU, and the specific scheme is described as follows.

[0057] Step S11, constructing a block sparse matrix based on the topological relationship of each grid point in the aircraft grid and the simulation physical parameters of the grid points; the block sparse matrix includes a plurality of zero sub-blocks and a plurality of non-zero sub-blocks.

[0058] The embodiment of the application constructs a block sparse matrix containing a plurality of zero sub-blocks and a plurality of non-zero sub-blocks based on the topological relationship of each grid point in the aircraft grid and the simulation physical parameters of each grid point. Among them, the number of sub-blocks in each row and each column of the block sparse matrix is the same as the number of grid points in the aircraft grid, and the number of rows and columns in the sub-blocks in the block sparse matrix is the same as the number of simulation physical parameters. For example, if the number of grid points in the aircraft grid is M, and the number of simulation physical parameters is N, the block sparse matrix includes MxM sub-blocks, and each sub-block is an NxN matrix.

[0059] It should be noted that the zero sub-block refers to a two-dimensional matrix with all zero elements, and the non-zero sub-block refers to a two-dimensional matrix with non-zero elements.

[0060] It should be further noted that the simulation physical parameters of each grid point include but are not limited to the air density, pressure, temperature, humidity, momentum in different directions (such as momentum in three directions of northeast coordinate system), turbulent kinetic energy, turbulent dissipation rate, etc.

[0061] For the non-zero sub-blocks and zero sub-blocks in the block sparse matrix, the sub-blocks at the target positions in the block sparse matrix are non-zero sub-blocks, and the sub-blocks at the remaining positions are zero sub-blocks; wherein, the target positions are positions in the block sparse matrix corresponding to any two grid points in the grid points satisfying the preset position condition, and the sub-blocks at the target positions in the block sparse matrix are matrices constructed based on the coupling relationship of the simulation physical parameters of the any two grid points.

[0062] It should be noted that the preset position condition includes that any two grid points are located in the same grid cell in the aircraft grid. For example, if the grid point 0 and the grid point 1 are located in the same grid cell in the aircraft grid, then the sub-blocks at the positions corresponding to the grid point 0 and the grid point 1 in the block sparse matrix are non-zero sub-blocks, and specifically are matrices constructed based on the coupling relationship of the simulation physical parameters of the grid point 0 and the grid point 1; if the grid point 0 and the grid point 5 are located in different grid cells in the aircraft grid, then the sub-blocks at the positions corresponding to the grid point 0 and the grid point 5 in the block sparse matrix are zero sub-blocks.

[0063] It should also be noted that the sub-blocks on the diagonal line in the block sparse matrix are also non-zero sub-blocks, which represent matrices constructed based on the coupling relationship of the simulation physical parameters of the same grid point. Of course, the same grid point also belongs to a special case of being located in the same grid cell in the aircraft grid.

[0064] In step S12, based on the positions of the non-zero sub-blocks in the block sparse matrix, the dependent pairs corresponding to the non-zero sub-blocks are determined respectively, and the dependent pairs corresponding to the non-zero sub-blocks are stored by using a preset data structure; wherein, the dependent pair includes a pair of matched non-zero sub-blocks.

[0065] In the embodiment of the application, after the block sparse matrix is constructed, based on the positions of the non-zero sub-blocks in the block sparse matrix, the dependent pairs corresponding to the non-zero sub-blocks are determined respectively, wherein the dependent pair includes a pair of matched non-zero sub-blocks. Among them, for the non-zero sub-blocks in the block sparse matrix, there may be no corresponding dependent pair, or there may be a corresponding dependent pair, and on this basis, there may be one corresponding dependent pair, or there may be multiple corresponding dependent pairs.

[0066] In order to facilitate efficient acquisition of the dependent pairs corresponding to the non-zero sub-blocks in the subsequent parallel processing process, the embodiment of the application also needs to store the dependent pairs corresponding to the non-zero sub-blocks by using a preset data structure.

[0067] Specifically, determining the dependency pairs corresponding to several non-zero sub-blocks includes: determining, from the block sparse matrix, a first non-zero sub-block located to the left of each non-zero sub-block and in the same row as each non-zero sub-block; determining, from the block sparse matrix, a second non-zero sub-block located above each non-zero sub-block and in the same column as each non-zero sub-block; matching, from the second non-zero sub-block, target non-zero sub-blocks corresponding to each non-zero sub-block in the first non-zero sub-block; wherein, the column number of each non-zero sub-block in the first non-zero sub-block is the same as the row number of the matched target non-zero sub-block; and determining the dependency pairs corresponding to each non-zero sub-block based on each non-zero sub-block in the first non-zero sub-block and their respective matched target non-zero sub-blocks.

[0068] by Figure 2 For example, a block sparse matrix consists of 5×5 sub-blocks, and each sub-block is a 5×5 matrix. Figure 2 The yellow sub-block ( , , , ) represents a non-zero sub-block above the diagonal in a block sparse matrix, with green sub-blocks ( , , , ) represents the non-zero sub-block below the diagonal in the block sparse matrix, and the blue sub-block ( , , , , ) represents a non-zero sub-block on the diagonal in the block sparse matrix. In this embodiment of the invention, block identifiers need to be configured for all non-zero sub-blocks in the block sparse matrix. Specifically, block identifiers are configured for all non-zero sub-blocks in the block sparse matrix in the order from left to right and from top to bottom, namely 0, 1, 2, ..., 12.

[0069] For dependency pairs corresponding to non-zero sub-blocks, use non-zero sub-blocks Taking an example, we can determine the non-zero sub-blocks from the block sparse matrix. Left side and non-zero sub-block The first non-zero sub-block of the same row ( , Determine non-zero sub-blocks from the block sparse matrix. Above and non-zero sub-block The second non-zero sub-block in the same column ( , , Matching from the second non-zero sub-block with the target non-zero sub-blocks corresponding to each non-zero sub-block in the first non-zero sub-block, at this time the first non-zero sub-block... With the second non-zero sub-block Matching, in the first non-zero sub-block and the second non-zero sub-block in the second non-zero sub-block Similarly, a number of non-zero sub-blocks in the block sparse matrix can be determined to correspond to a dependent pair respectively. The non-zero sub-block corresponds to one dependent pair , the non-zero sub-block corresponds to one dependent pair and , the non-zero sub-block corresponds to one dependent pair and , the non-zero sub-block corresponds to two dependent pairs and , and , and other non-zero sub-blocks do not have corresponding dependent pairs.

[0070] Based on this, when a preset data structure is used to store the dependent pairs corresponding to a number of non-zero sub-blocks, the dep_ptr array can be used to store the cumulative number of dependent pairs corresponding to a number of non-zero sub-blocks, and the dep_ptr array is specifically [0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 3, 5, 5], wherein the dep_ptr array includes 13 values in total, that is, each non-zero sub-block corresponds to a value, and the value refers to the cumulative number of dependent pairs corresponding to the current non-zero sub-block and other non-zero sub-blocks with a block identifier less than the current non-zero sub-block; and the up_pos array can be used to store the block identifier of the non-zero sub-block located above each non-zero sub-block in the dependent pair corresponding to each non-zero sub-block, and specifically can be [1, 2, 1, 2, 7], and the left_pos array can be used to store the block identifier of the non-zero sub-block located to the left of each non-zero sub-block in the dependent pair corresponding to each non-zero sub-block, and specifically can be [5, 5, 9, 9, 10].

[0071] In step S13, the number of non-zero sub-blocks are respectively allocated to a number of GPU thread bundles for parallel processing, so that after the dependent pair corresponding to the corresponding non-zero sub-block is updated by the GPU thread bundle, the corresponding non-zero sub-block is updated based on the updated dependent pair.

[0072] In the embodiment of the application, a number of non-zero sub-blocks are respectively allocated to a number of GPU thread bundles for parallel processing, so that one non-zero sub-block corresponds to one GPU thread bundle, and each element in the corresponding non-zero sub-block is updated by each thread in the GPU thread bundle based on the updated dependent pair after the dependent pair corresponding to the corresponding non-zero sub-block is updated by the GPU thread bundle.

[0073] Specifically, a plurality of non-zero sub-blocks are respectively allocated to a plurality of GPU thread bundles for parallel processing. In one case, if the GPU thread bundle determines that the corresponding non-zero sub-block does not have a corresponding dependent pair, the GPU thread bundle performs an intra-block update operation on the corresponding non-zero sub-block, so that each thread in the GPU thread bundle updates each element in the corresponding non-zero sub-block in parallel according to a preset intra-block element update order corresponding to the corresponding non-zero sub-block, and after each element in the corresponding non-zero sub-block completes the intra-block update, the corresponding non-zero sub-block is marked as an update completion state.

[0074] In another case, if the GPU thread bundle determines that the corresponding non-zero sub-block has a corresponding dependent pair, the GPU thread bundle performs an inter-block update operation on the corresponding non-zero sub-block, so that after the corresponding dependent pair of the corresponding non-zero sub-block completes the update, the GPU thread bundle performs a matrix multiplication operation on the dependent pair that completes the update to obtain a target matrix, and each thread in the GPU thread bundle updates each element in the corresponding non-zero sub-block in parallel according to the target matrix, so that after each element in the corresponding non-zero sub-block completes the inter-block update, the GPU thread bundle performs an intra-block update operation on the corresponding non-zero sub-block that completes the inter-block update, and after each element in the corresponding non-zero sub-block completes the intra-block update, the corresponding non-zero sub-block is marked as an update completion state.

[0075] According to one example, in the process of performing the intra-block update operation on the corresponding non-zero sub-block by the GPU thread bundle, first, whether the corresponding non-zero sub-block has a corresponding dependent non-zero sub-block is determined according to the positional relationship of the corresponding non-zero sub-block relative to the diagonal line of the block sparse matrix. If not, each thread in the GPU thread bundle updates each element in the corresponding non-zero sub-block in parallel according to the preset intra-block element update order corresponding to the corresponding non-zero sub-block, and after each element in the corresponding non-zero sub-block completes the intra-block update, the corresponding non-zero sub-block is marked as an update completion state. If so, the corresponding dependent non-zero sub-block of the corresponding non-zero sub-block is detected by using a busy waiting mechanism, so that when the corresponding dependent non-zero sub-block of the corresponding non-zero sub-block is detected to be marked as an update completion state, each thread in the GPU thread bundle updates each element in the corresponding non-zero sub-block in parallel according to the corresponding dependent non-zero sub-block and the preset intra-block element update order, and after each element in the corresponding non-zero sub-block completes the intra-block update, the corresponding non-zero sub-block is marked as an update completion state.

[0076] It should be noted that if the corresponding non-zero sub-block is located on the diagonal line of the block sparse matrix, it is determined that the corresponding non-zero sub-block does not exist a corresponding dependent non-zero sub-block. If the corresponding non-zero sub-block is located below the diagonal line of the block sparse matrix, it is determined that the corresponding non-zero sub-block exists a corresponding dependent non-zero sub-block, and is a non-zero sub-block in the non-zero sub-block on the diagonal line of the block sparse matrix which is in the same column as the corresponding non-zero sub-block. If the corresponding non-zero sub-block is located above the diagonal line of the block sparse matrix, it is determined that the corresponding non-zero sub-block exists a corresponding dependent non-zero sub-block, and is a non-zero sub-block in the non-zero sub-block on the diagonal line of the block sparse matrix which is in the same row as the corresponding non-zero sub-block. For example, Figure 2 the non-zero sub-block does not exist a corresponding dependent non-zero sub-block; the non-zero sub-block exists a corresponding dependent non-zero sub-block, and is the non-zero sub-block ; the non-zero sub-block exists a corresponding dependent non-zero sub-block, and is the non-zero sub-block .

[0077] And the preset intra-block element update order includes a first intra-block element update order corresponding to the non-zero sub-block below the diagonal line of the block sparse matrix, a second intra-block element update order corresponding to the non-zero sub-block above the diagonal line of the block sparse matrix, and a third intra-block element update order corresponding to the non-zero sub-block on the diagonal line of the block sparse matrix. Wherein, the first intra-block element update order includes sequentially updating each column element in the non-zero sub-block in parallel according to column priority order; the second intra-block element update order includes sequentially updating each row element in the non-zero sub-block in parallel according to row priority order; and the third intra-block element update order includes sequentially updating each diagonal element in the non-zero sub-block and the element in the same row and column as the diagonal element in parallel according to diagonal line order.

[0078] According to one of the examples, in the process of performing the inter-block update operation on the corresponding non-zero sub-block by the GPU thread bundle, the GPU thread bundle detects the two matching non-zero sub-blocks in the corresponding dependent pair of the corresponding non-zero sub-block by using the busy waiting mechanism, so as to perform the matrix multiplication operation on the two matching non-zero sub-blocks in the dependent pair which complete the update after detecting that the two matching non-zero sub-blocks in the corresponding dependent pair of the corresponding non-zero sub-block are marked as the update completion state, to obtain a target matrix, and each thread in the GPU thread bundle updates each element in the corresponding non-zero sub-block in parallel according to the target matrix, so as to perform the intra-block update operation on the corresponding non-zero sub-block which completes the inter-block update by the GPU thread bundle after each element in the corresponding non-zero sub-block completes the inter-block update, and mark the corresponding non-zero sub-block as the update completion state after each element in the corresponding non-zero sub-block completes the intra-block update.

[0079] It should be noted that when the GPU thread bundle updates the corresponding non-zero sub-block, each thread in the GPU thread bundle is responsible for updating an element in the corresponding non-zero sub-block based on the Single Instruction Multiple Threads (SIMT) architecture characteristics, thereby improving the parallel update efficiency.

[0080] Specifically, when each thread in the GPU thread bundle updates each element in the corresponding non-zero sub-block in parallel according to the target matrix, each thread in the GPU thread bundle updates each element in the corresponding non-zero sub-block in parallel by performing a subtraction operation on the element in the corresponding non-zero sub-block responsible for the thread and the element in the target matrix at the same position.

[0081] For example, thread 0 in the GPU thread bundle updates the element in the first row and the first column of the corresponding non-zero sub-block by performing a subtraction operation on the element in the first row and the first column of the corresponding non-zero sub-block responsible for the thread and the element in the first row and the first column of the target matrix.

[0082] Further, the embodiment of the present application introduces shared memory and global memory, wherein the global memory is used to store the complete block sparse matrix, and the shared memory is used to store the intermediate calculation results of the non-zero sub-block during the update process.

[0083] Specifically, a plurality of non-zero sub-blocks in the block sparse matrix are respectively allocated to a plurality of GPU thread bundles for parallel processing, at which time the GPU thread bundle obtains the corresponding non-zero sub-block from the global memory, and allocates each element in the corresponding non-zero sub-block to each thread in the GPU thread bundle, so that one element in the corresponding non-zero sub-block corresponds to one thread. If the GPU thread bundle determines that the corresponding non-zero sub-block has a corresponding dependency pair, the GPU thread bundle performs an inter-block update operation on the corresponding non-zero sub-block, writes the corresponding non-zero sub-block after the inter-block update to the shared memory, then performs an intra-block update operation on the corresponding non-zero sub-block after the inter-block update, and writes the corresponding non-zero sub-block after the intra-block update back to the global memory to update the block sparse matrix. If the GPU thread bundle determines that the corresponding non-zero sub-block does not have a corresponding dependency pair, the GPU thread bundle performs an intra-block update operation on the corresponding non-zero sub-block, and writes the corresponding non-zero sub-block after the intra-block update back to the global memory to update the block sparse matrix.

[0084] It should be noted that after writing the corresponding non-zero sub-blocks updated within the completed block back to global memory, the GPU (Graphics Processing Unit)'s _threadfence() memory barrier instruction is called to ensure the visibility of global memory operations. Finally, the completion flag of the corresponding non-zero sub-block is set to 1 to mark the corresponding non-zero sub-block as completed, thereby atomically declaring that the non-zero sub-block has been updated and releasing the waiting state of those that depend on or are dependent on the non-zero sub-block, thus ensuring the consistency of data between blocks and the correct transmission of dependencies between non-zero sub-blocks.

[0085] The block sparse matrix in Figures 3(a), 3(b), and 3(c) is used as an example for illustration. The block identifiers of the 13 non-zero sub-blocks in the block sparse matrix are 0, 1, 2, ..., 12, in order from left to right and top to bottom. The 13 non-zero sub-blocks in the block sparse matrix are distributed to 13 GPU thread bundles (thread bundle 0 to thread bundle 12) for parallel processing. At this time, the GPU thread bundle retrieves the corresponding non-zero sub-blocks from global memory and processes the 5×5 elements (…) of the corresponding non-zero sub-blocks. , , … These are assigned to the internal threads (thread 0 to thread 24).

[0086] As shown in Figure 3(a), for non-zero sub-blocks Using GPU thread bundle 6 to utilize the busy-wait mechanism for non-zero sub-blocks The two matching non-zero sub-blocks in the corresponding dependency pair ( and ) to perform detection, so that non-zero sub-blocks are detected The completion marker [5] and After all completion flags [1] are 1, the non-zero sub-blocks that have been updated are updated. and Matrix multiplication is performed to obtain the target matrix, and then each thread (thread 0 to thread 24) in GPU thread bundle 6 performs non-zero sub-blocks based on the target matrix. The elements in ( , , … Updates are performed in parallel to update non-zero sub-blocks. After each element in the block completes the inter-block update, the non-zero sub-blocks that have completed the inter-block update will be updated. Write to shared memory. Then, use GPU thread bundle 6 to update the non-zero sub-blocks that have undergone inter-block updates. Perform an intra-block update operation, first based on non-zero sub-blocks. Determine the non-zero sub-blocks based on their position relative to the diagonal of the block sparse matrix. If no corresponding non-zero dependent sub-block exists, then the threads in GPU thread bundle 6 directly determine the non-zero sub-block. The corresponding update order of elements within the third block, for non-zero sub-blocks. Each element in the block is updated in parallel, and in non-zero sub-blocks After each element in the block completes its intra-block update, the non-zero sub-block that has completed its intra-block update will be updated. Write back to global memory to update the block sparse matrix and remove non-zero sub-blocks. The completion flag [6] is set to 1.

[0087] As shown in Figure 3(b), for non-zero sub-blocks Using GPU thread bundle 7 to utilize the busy-wait mechanism for non-zero sub-blocks The two matching non-zero sub-blocks in the corresponding dependency pair ( and ) to perform detection, so that non-zero sub-blocks are detected The completion marker [5] and After all completion flags [2] are 1, the non-zero sub-blocks that have been updated are updated. and Matrix multiplication is performed to obtain the target matrix, and then each thread (thread 0 to thread 24) in GPU thread bundle 7 performs non-zero sub-blocks based on the target matrix. The elements in ( , , … Updates are performed in parallel to update non-zero sub-blocks. After each element in the block completes the inter-block update, the non-zero sub-blocks that have completed the inter-block update will be updated. Write to shared memory. Then, use GPU thread bundle 7 to update the non-zero sub-blocks that have completed inter-block updates. Perform an intra-block update operation, first based on non-zero sub-blocks. Determine the non-zero sub-blocks based on their position relative to the diagonal of the block sparse matrix. There exists a corresponding non-zero dependent sub-block, and it is a non-zero sub-block. At this point, the busy-wait mechanism is used to process non-zero sub-blocks. Perform detection to detect non-zero sub-blocks When the completion flag [6] is 1, each thread in the GPU thread bundle 7 determines the non-zero sub-blocks. And the update order of elements within the second block, for non-zero sub-blocks. Each element in the block is updated in parallel, and in non-zero sub-blocks After each element in the block completes its intra-block update, the non-zero sub-block that has completed its intra-block update will be updated. write back to global memory to update the block sparse matrix and write the non-zero sub-block with the completion flag [7] as 1.

[0088] As shown in FIG. 3(c), for the non-zero sub-block , the GPU thread bundle 11 detects the matching two non-zero sub-blocks (A and B ) in the two dependent pairs, to update the non-zero sub-blocks A and B respectively, to obtain two target matrices, and then each thread (thread 0~thread 24) in the GPU thread bundle 11 updates each element (A , , , , , , , , ) in the non-zero sub-block A in parallel according to the two target matrices, and writes the non-zero sub-block A updated inter-block to shared memory after each element in the non-zero sub-block A is updated inter-block. Then the GPU thread bundle 11 performs intra-block update operation on the non-zero sub-block A updated inter-block, to determine whether the non-zero sub-block A has a corresponding dependent non-zero sub-block according to the positional relationship of the non-zero sub-block A relative to the diagonal line of the block sparse matrix, and whether the dependent non-zero sub-block is the non-zero sub-block B , and if so, the non-zero sub-block A is detected using the busy waiting mechanism, and if the completion flag [8] of the non-zero sub-block A is 1, each thread in the GPU thread bundle 11 updates each element in the non-zero sub-block A in parallel according to the non-zero sub-block A and the first intra-block element update order, and writes the non-zero sub-block A updated intra-block to global memory to update the block sparse matrix and write the non-zero sub-block with the completion flag [8] as 1. ​​​​a completion flag of the update of the non-zero sub-block is set to 1.

[0089] After the update of the non-zero sub-blocks is completed, the block sparse matrix is updated based on the non-zero sub-blocks whose update is completed, and an incomplete LU decomposition result is determined according to the updated block sparse matrix, so that the incomplete LU decomposition result is used for aircraft simulation.

[0090] In the embodiment of the application, after the update of the non-zero sub-blocks is completed, the block sparse matrix is updated based on the non-zero sub-blocks whose update is completed to obtain an updated block sparse matrix, then a lower triangular matrix is determined based on the sub-blocks below the diagonal line in the updated block sparse matrix, an upper triangular matrix is determined based on the diagonal line and the sub-blocks above the diagonal line in the updated block sparse matrix, and finally, an incomplete LU decomposition result is determined according to the lower triangular matrix and the upper triangular matrix, and the incomplete LU decomposition result is used for large-scale aircraft simulation, thereby improving the efficiency of large-scale aircraft simulation.

[0091] In order to verify the aircraft simulation efficiency of the method, as shown in Figure 4 and Figure 5 The embodiment of the application provides the execution time of incomplete LU decomposition of a plurality of block sparse matrices on different types of GPUs (including RTX4090 GPU and A100 GPU) based on the cuSPARSE (including cuSPARSE_BSR (Block Sparse Row) and cuSPARSE_CSR (Compressed Sparse Row)) official mathematical library of NVIDIA GPU, the high-performance linear algebra library MAGMA specially designed for GPU accelerated calculation, and the method as a benchmark. It can be found that in most cases, the execution time of the method is shorter, and the aircraft simulation efficiency of the method is also higher.

[0092] As shown in Figure 6 Five sets of aircraft grids are taken as examples, and the incomplete LU decomposition is configured as a preconditioner on the CFD software SU2 platform to realize aircraft simulation, and the simulation execution time on different aircraft grids is provided by providing original serial implementation, cuSPARSE mathematical library method implementation, and the method implementation, so as to compare the processing performance of the three implementations. It can be found that the execution time of the method is significantly lower than that of the other two, and the processing performance of the method is significantly better than that of the other two.

[0093] It can be seen that, based on the topological relationship of each grid point in the aircraft grid and the simulation physical parameters of each grid point, the block sparse matrix including a plurality of zero subblocks and a plurality of nonzero subblocks is constructed, and after determining the dependency pairs corresponding to the plurality of nonzero subblocks from the block sparse matrix, the dependency pairs corresponding to the plurality of nonzero subblocks are stored by using an explicit data structure, so that the dependency pairs corresponding to the nonzero subblocks can be efficiently obtained from the explicit data structure in the subsequent parallel processing process, and the efficiency of parallel processing is improved. Further, the plurality of nonzero subblocks are respectively distributed to a plurality of GPU thread bundles for parallel processing, that is, one nonzero subblock corresponds to one GPU thread bundle, so that after the dependency pairs corresponding to the corresponding nonzero subblock are updated by the GPU thread bundle, each element in the corresponding nonzero subblock is updated in parallel by each thread based on the updated dependency pairs. This parallel processing strategy can fully adapt to the architecture characteristics of the GPU, fully utilize the parallel computing resources of the GPU, improve the calculation efficiency and parallel scalability of the incomplete LU decomposition on the multi-physical parameter coupling simulation, and further improve the efficiency of large-scale aircraft simulation.

[0094] Referring to Figure 7 As shown in the figure, the embodiment of the application discloses an aircraft simulation device based on parallel block sparse matrix incomplete LU decomposition, which is applied to a GPU, and the specific scheme is described as follows.

[0095] The matrix construction module 11 is configured to construct a block sparse matrix based on the topological relationship of each grid point in the aircraft grid and the simulation physical parameters of the grid points.

[0096] The dependency pair determination module 12 is configured to determine the dependency pairs corresponding to the plurality of nonzero subblocks respectively based on the positions of the plurality of nonzero subblocks in the block sparse matrix, and store the dependency pairs corresponding to the plurality of nonzero subblocks respectively by using a preset data structure; wherein the dependency pair includes a pair of matched nonzero subblocks.

[0097] The nonzero subblock updating module 13 is configured to distribute the plurality of nonzero subblocks to a plurality of GPU thread bundles for parallel processing, so as to update the corresponding nonzero subblock based on the updated dependency pairs after the dependency pairs corresponding to the corresponding nonzero subblock are updated by the GPU thread bundle.

[0098] The aircraft simulation module 14 is configured to update the block sparse matrix based on the plurality of nonzero subblocks after the plurality of nonzero subblocks are updated, and determine the incomplete LU decomposition result according to the updated block sparse matrix, so as to perform aircraft simulation by using the incomplete LU decomposition result.

[0099] Therefore, based on the topological relationship of each grid point in the aircraft grid and the simulation physical parameters of each grid point, the block sparse matrix containing a plurality of zero subblocks and a plurality of nonzero subblocks is constructed, and after determining the dependency pairs corresponding to the plurality of nonzero subblocks from the block sparse matrix, the dependency pairs corresponding to the plurality of nonzero subblocks are stored by using an explicit data structure, so that the dependency pairs corresponding to the nonzero subblocks can be efficiently obtained from the explicit data structure in the subsequent parallel processing process, and the efficiency of parallel processing is improved. Further, the plurality of nonzero subblocks are respectively distributed to a plurality of GPU thread bundles for parallel processing, that is, one nonzero subblock corresponds to one GPU thread bundle, so that after the dependency pairs corresponding to the corresponding nonzero subblock are updated, each element in the corresponding nonzero subblock is updated in parallel by each thread based on the updated dependency pairs, and this parallel processing strategy can fully adapt to the architecture characteristics of the GPU, fully utilize the parallel computing resources of the GPU, improve the calculation efficiency and parallel scalability of the incomplete LU decomposition on the multi-physical parameter coupling simulation, and further improve the efficiency of large-scale aircraft simulation.

[0100] In some embodiments, the dependency pair determination module 12 comprises:

[0101] A first nonzero subblock determination unit is configured to determine, from the block sparse matrix, a first nonzero subblock located on the left side of each nonzero subblock and in the same row as the each nonzero subblock.

[0102] A second nonzero subblock determination unit is configured to determine, from the block sparse matrix, a second nonzero subblock located above the each nonzero subblock and in the same column as the each nonzero subblock.

[0103] A target nonzero subblock determination unit is configured to match, from the second nonzero subblocks, a target nonzero subblock corresponding to each nonzero subblock in the first nonzero subblocks, respectively; wherein the column number of each nonzero subblock in the first nonzero subblocks is the same as the row number of the matched target nonzero subblock.

[0104] A dependency pair determination unit is configured to determine, based on each nonzero subblock in the first nonzero subblocks and the respective matched target nonzero subblocks, a dependency pair corresponding to the each nonzero subblock.

[0105] In some embodiments, the nonzero subblock update module 13 comprises:

[0106] A nonzero subblock distribution unit is configured to distribute the plurality of nonzero subblocks to a plurality of GPU thread bundles for parallel processing, respectively.

[0107] The first parallel updating unit is configured to, if the GPU thread bundle determines that the corresponding dependency pair does not exist in the corresponding non-zero sub-block, perform an intra-block updating operation on the corresponding non-zero sub-block by the GPU thread bundle, to update each element in the corresponding non-zero sub-block in parallel by each thread in the GPU thread bundle according to a preset intra-block element updating sequence corresponding to the corresponding non-zero sub-block, and mark the corresponding non-zero sub-block as an updating completion state after each element in the corresponding non-zero sub-block completes the intra-block updating.

[0108] The second parallel updating unit is configured to, if the GPU thread bundle determines that the corresponding dependency pair exists in the corresponding non-zero sub-block, perform an inter-block updating operation on the corresponding non-zero sub-block by the GPU thread bundle, to perform a matrix multiplication operation on the dependency pair that completes the updating to obtain a target matrix after the corresponding dependency pair corresponding to the corresponding non-zero sub-block completes the updating, and update each element in the corresponding non-zero sub-block in parallel by each thread in the GPU thread bundle according to the target matrix, to perform the intra-block updating operation on the corresponding non-zero sub-block that completes the inter-block updating by the GPU thread bundle after each element in the corresponding non-zero sub-block completes the inter-block updating, and mark the corresponding non-zero sub-block as the updating completion state after each element in the corresponding non-zero sub-block completes the intra-block updating.

[0109] In some embodiments, the aircraft simulation module 14 includes:

[0110] The lower triangular matrix determining unit is configured to determine a lower triangular matrix based on the sub-blocks below the diagonal line in the updated block sparse matrix.

[0111] The upper triangular matrix determining unit is configured to determine an upper triangular matrix based on the sub-blocks above the diagonal line in the updated block sparse matrix.

[0112] The incomplete LU decomposition result determining unit is configured to determine an incomplete LU decomposition result according to the lower triangular matrix and the upper triangular matrix.

[0113] Further, the embodiments of the present application also disclose an electronic device, Figure 8 The electronic device 20 shown in FIG. 1 is a structure diagram according to an exemplary embodiment, and the content in the figure cannot be considered as any limitation on the use range of the present application.

[0114] Figure 8A structural schematic diagram of an electronic device 20 is provided in the embodiments of the present application. The electronic device 20 can specifically include at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25 and a communication bus 26. The memory 22 is configured to store a computer program, and the processor 21 is configured to load and execute the computer program to implement the related steps in the aircraft simulation method based on parallel block sparse matrix incomplete LU decomposition disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the embodiments of the present application can be specifically an electronic computer.

[0115] In the embodiments of the present application, the power supply 23 is configured to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 is capable of creating a data transmission channel between the electronic device 20 and external devices, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input / output interface 25 is configured to obtain external input data or output data to the outside, and the specific interface type can be selected according to the specific application needs, which is not specifically limited herein.

[0116] In addition, the memory 22 as a carrier for resource storage can be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage mode can be temporary storage or permanent storage.

[0117] The operating system 221 is configured to manage and control each hardware device on the electronic device 20 and the computer program 222, and can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program capable of completing the aircraft simulation method based on parallel block sparse matrix incomplete LU decomposition executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 can further include a computer program capable of completing other specific work.

[0118] Further, the present application further discloses a computer readable storage medium for storing a computer program; wherein the computer program is executed by a processor to implement the aircraft simulation method based on parallel block sparse matrix incomplete LU decomposition disclosed in the foregoing embodiments. The specific steps of the method can refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

[0119] The various embodiments described in the specification are progressive in nature, and each embodiment highlights the differences from other embodiments. The same or similar parts among the various embodiments can be mutually referred to. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method.

[0120] Those skilled in the art will further appreciate that the individual steps of the examples described in connection with the embodiments disclosed herein can be embodied in electronic hardware, computer software, or combinations of both. The various examples have been described in relation to the described embodiments, as a means of generalizing the interchangeability of hardware and software. Whether employing hardware or software, the described functionality is implemented as desired by the particular application and design constraints. Skilled artisans appreciate that the replacement of one part by a different part, the addition of new parts, or the omission of existing parts, can be made without departing from the scope of the present application.

[0121] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in random access memory (RAM), flash memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0122] Finally, it needs to be pointed out that, in this document, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or sequence between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0123] The above describes the technical solutions provided by the present application in detail, and the principles and implementation manners of the present application are described by using specific examples. The above description of the embodiments is only for helping to understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range can be changed, and the above description of the specification should not be understood as limiting the present application.

Claims

1. A method for aircraft simulation based on parallel block sparse matrix incomplete LU decomposition, characterized in that, The application is applied to a GPU, comprising: constructing a block sparse matrix based on topological relations of each grid point in an aircraft grid and simulation physical parameters of the each grid point; the block sparse matrix comprises a plurality of zero sub-blocks and a plurality of nonzero sub-blocks; determining dependent pairs corresponding to the plurality of nonzero sub-blocks respectively based on positions of the plurality of nonzero sub-blocks in the block sparse matrix, and storing the dependent pairs corresponding to the plurality of nonzero sub-blocks respectively by using a preset data structure; wherein a dependent pair comprises a pair of matched nonzero sub-blocks; allocating the plurality of nonzero sub-blocks to a plurality of GPU thread bundles respectively for parallel processing, so as to update the corresponding nonzero sub-block based on the dependent pair corresponding to the corresponding nonzero sub-block after the dependent pair completes updating by using the GPU thread bundle; updating the block sparse matrix based on the plurality of nonzero sub-blocks after the plurality of nonzero sub-blocks complete updating, and determining an incomplete LU decomposition result based on the block sparse matrix after updating, so as to use the incomplete LU decomposition result for aircraft simulation; wherein the allocating the plurality of nonzero sub-blocks to a plurality of GPU thread bundles respectively for parallel processing, so as to update the corresponding nonzero sub-block based on the dependent pair corresponding to the corresponding nonzero sub-block after the dependent pair completes updating by using the GPU thread bundle, comprises: allocating the plurality of nonzero sub-blocks to a plurality of GPU thread bundles respectively for parallel processing; if the GPU thread bundle determines that the corresponding nonzero sub-block does not exist the dependent pair corresponding to the corresponding nonzero sub-block, then performing an intra-block update operation on the corresponding nonzero sub-block by using the GPU thread bundle, so as to update each element in the corresponding nonzero sub-block in parallel by each thread in the GPU thread bundle according to a preset intra-block element update order corresponding to the corresponding nonzero sub-block, and marking the corresponding nonzero sub-block as a completed update state after each element in the corresponding nonzero sub-block completes the intra-block update; if the GPU thread bundle determines that the corresponding nonzero sub-block exists the dependent pair corresponding to the corresponding nonzero sub-block, then performing an inter-block update operation on the corresponding nonzero sub-block by using the GPU thread bundle, so as to perform a matrix multiplication operation on the dependent pair after the dependent pair completes updating, so as to obtain a target matrix, and update each element in the corresponding nonzero sub-block in parallel by each thread in the GPU thread bundle according to the target matrix, so as to perform the intra-block update operation on the corresponding nonzero sub-block after each element in the corresponding nonzero sub-block completes the inter-block update by using the GPU thread bundle, and marking the corresponding nonzero sub-block as a completed update state after each element in the corresponding nonzero sub-block completes the intra-block update.

2. The parallel block sparse matrix incomplete LU decomposition based aircraft simulation method of claim 1, wherein, The number of sub-blocks in each row and each column in the block sparse matrix is the same as the number of grid points, and the number of rows and columns inside the sub-block in the block sparse matrix is the same as the number of types of simulation physical parameters; the sub-block at a target position in the block sparse matrix is a nonzero sub-block, and the sub-blocks at other positions are zero sub-blocks. The target position is a position in the block sparse matrix corresponding to any two grid points in the grid points satisfying a preset position condition; The sub-block at the target position in the block sparse matrix is a matrix constructed based on a coupling relationship of the simulation physical parameters of the any two grid points.

3. The parallel block sparse matrix incomplete LU decomposition based aircraft simulation method of claim 2, wherein, The preset position condition includes that the any two grid points are located in a same grid cell in the aircraft grid.

4. The parallel block sparse matrix incomplete LU decomposition based vehicle simulation method of claim 1, wherein, The determining of the dependent pair corresponding to each non-zero sub-block based on the positions of the non-zero sub-blocks in the block sparse matrix includes: determining, from the block sparse matrix, a first non-zero sub-block located on the left of each non-zero sub-block and in the same row as the each non-zero sub-block; determining, from the block sparse matrix, a second non-zero sub-block located above the each non-zero sub-block and in the same column as the each non-zero sub-block; matching, from the second non-zero sub-block, a target non-zero sub-block corresponding to each non-zero sub-block in the first non-zero sub-block, wherein the column number of each non-zero sub-block in the first non-zero sub-block is the same as the row number of the matched target non-zero sub-block; determining the dependent pair corresponding to the each non-zero sub-block based on each non-zero sub-block in the first non-zero sub-block and the target non-zero sub-block matched thereto.

5. The parallel block sparse matrix incomplete LU decomposition based vehicle simulation method of claim 1, wherein, The preset intra-block element update sequence includes a first intra-block element update sequence corresponding to non-zero sub-blocks below a diagonal line in the block sparse matrix, a second intra-block element update sequence corresponding to non-zero sub-blocks above the diagonal line in the block sparse matrix, and a third intra-block element update sequence corresponding to non-zero sub-blocks on the diagonal line in the block sparse matrix; The first intra-block element update sequence includes sequentially updating, in parallel, each column element in a non-zero sub-block in a column-first order; The second intra-block element update sequence includes sequentially updating, in parallel, each row element in a non-zero sub-block in a row-first order; The third intra-block element update sequence includes sequentially updating, in parallel, each diagonal element in a non-zero sub-block and elements in the same row and column as the diagonal element in a diagonal line order.

6. The parallel block sparse matrix incomplete LU decomposition based aircraft simulation method according to any one of claims 1 to 5, characterized in that, The determining of the incomplete LU decomposition result according to the updated block sparse matrix includes: determining a lower triangular matrix based on sub-blocks below the diagonal line in the updated block sparse matrix; determining an upper triangular matrix based on the diagonal line and sub-blocks above the diagonal line in the updated block sparse matrix; determining the incomplete LU decomposition result according to the lower triangular matrix and the upper triangular matrix.

7. An aircraft simulation apparatus based on parallel block sparse matrix incomplete LU decomposition, characterized by, The application applied to a GPU includes: a matrix construction module configured to construct a block sparse matrix based on a topological relationship of each grid point in an aircraft grid and simulation physical parameters of the each grid point; the block sparse matrix includes a plurality of zero sub-blocks and a plurality of non-zero sub-blocks; a dependent pair determination module configured to determine dependent pairs corresponding to the plurality of non-zero sub-blocks based on positions of the non-zero sub-blocks in the block sparse matrix, and store the dependent pairs corresponding to the plurality of non-zero sub-blocks in a preset data structure; wherein a dependent pair includes a pair of matched non-zero sub-blocks. a non-zero sub-block updating module, configured to allocate the non-zero sub-blocks to GPU thread bundles respectively for parallel processing, and to update the corresponding non-zero sub-block based on the completed dependent pairs after the dependent pairs corresponding to the non-zero sub-block are completed; an aircraft simulation module, configured to update the block sparse matrix based on the completed non-zero sub-blocks after the non-zero sub-blocks are all completed, and to determine an incomplete LU decomposition result based on the updated block sparse matrix, and to perform aircraft simulation based on the incomplete LU decomposition result. The non-zero sub-block updating module is specifically configured to allocate the non-zero sub-blocks to GPU thread bundles respectively for parallel processing, and to perform an intra-block update operation on the corresponding non-zero sub-block by the GPU thread bundle if the GPU thread bundle determines that the corresponding non-zero sub-block has no dependent pair, to update each element in the corresponding non-zero sub-block in parallel by each thread in the GPU thread bundle according to a preset intra-block element update order corresponding to the corresponding non-zero sub-block, and to mark the corresponding non-zero sub-block as completed after each element in the corresponding non-zero sub-block is completed, and to perform an inter-block update operation on the corresponding non-zero sub-block by the GPU thread bundle if the GPU thread bundle determines that the corresponding non-zero sub-block has a dependent pair, to perform matrix multiplication on the completed dependent pairs after the dependent pairs corresponding to the corresponding non-zero sub-block are completed, to obtain a target matrix, to update each element in the corresponding non-zero sub-block in parallel by each thread in the GPU thread bundle according to the target matrix, to perform the intra-block update operation on the corresponding non-zero sub-block by the GPU thread bundle after each element in the corresponding non-zero sub-block is completed, and to mark the corresponding non-zero sub-block as completed after each element in the corresponding non-zero sub-block is completed.

8. An electronic device, comprising: The memory is configured to store a computer program. The processor is configured to execute the computer program to implement the aircraft simulation method based on parallel block sparse matrix incomplete LU decomposition. The computer program is configured to be executed by the processor to implement the aircraft simulation method based on parallel block sparse matrix incomplete LU decomposition.

9. A computer-readable storage medium, characterized in that, ​

Citation Information

Patent Citations

  • Axis-invariant-based multi-axis robot inverse kinematics modeling and solving method

    CN108942942A

  • Direct sparse solution method for rapidly simulating electromagnetic characteristics of missile-target intersection target

    CN114239239A