A GPU parallel acceleration method for subdivision volume parameter evaluation
By designing the GPU parallel acceleration method in the process of the ultimate body parameter evaluation of the volume segmentation model, the problems of high computing resource requirements and loss of accuracy are solved, efficient and accurate parameter evaluation is achieved, and more flexible topological structure is supported.
Patent Information
- Application Number
- CN202510025441.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2045-01-08
AI Technical Summary
In the process of evaluating the limit volume parameters of the volume segmentation model, the computing resource requirements are high, making it difficult to efficiently process massive segmentation units, and there are problems of accuracy loss and topological limitations.
A GPU parallel acceleration method for subdividing bulk parameter evaluation is designed. By optimizing the parallel algorithm, the multi-core architecture and floating-point computing capabilities of the GPU are fully utilized to realize parallel parameter evaluation of the bulk mesh.
It significantly improves the parameter evaluation speed of complex body segmentation models, saves memory consumption, optimizes efficiency, improves accuracy, and supports more flexible topological structures.
Smart Images

Figure CN119477662B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of subdivision volume parameter evaluation, and in particular to a GPU parallel acceleration method for subdivision volume parameter evaluation. Background Art
[0002] Computer-aided design and computer-aided engineering, as core tools for industrial product design and simulation analysis, have been widely used in the manufacturing industry. CAD generates geometric models through NURBS (non-uniform rational B-spline) curves or surfaces, while CAE performs finite element analysis through meshed discrete models. However, due to the differences in geometric representation, CAD and CAE models cannot communicate directly. Although several existing model conversion methods, such as isogeometric analysis based on B-splines or NURBS bodies, have achieved model conversion between CAD and CAE to some extent, there are still problems of information loss and insufficient model accuracy, which leads to distortion of geometric and physical information during the conversion process, seriously affecting the accuracy of simulation analysis.
[0003] In recent years, subdivision technology has gradually shown its advantages in the integrated application of CAD and CAE for complex three-dimensional models, especially the volume subdivision model, which can not only realize complex models of arbitrary topology by controlling mesh refinement, but also can be used as a discrete volume mesh for CAE analysis. Compared with traditional NURBS bodies, subdivision volume models have higher design flexibility in dealing with complex topological structures. However, the current volume subdivision model still faces key challenges. First, the number of sub-units grows exponentially during the volume subdivision process, resulting in high demand for computing resources. Existing computing equipment is difficult to efficiently process the limit volume parameter evaluation of such a large number of subdivision units. In addition, the limit volume calculation process of the volume subdivision model involves complex numerical iterations and precision requirements, especially in irregular volume structures. Existing geometric analysis methods usually convert the subdivision volume into a spline volume model to establish the control point mapping relationship between the subdivision volume and the spline volume, which will bring about key problems such as precision loss and topological limitations.
[0004] Some existing studies have attempted to introduce graphics processing units into the extreme volume parameter evaluation process of volume subdivision models, and use the multi-core architecture of GPU to achieve parallel computing to improve the computing speed. However, the current method is still limited in efficiency in the parallel computing of large-scale volume subdivisions, and cannot fully utilize the floating-point computing capabilities of GPUs. At the same time, there are problems such as unbalanced allocation of computing resources, resulting in insufficient performance improvement in processing complex three-dimensional models. How to efficiently implement the extreme volume parameter evaluation of subdivision volume models on GPUs has become a bottleneck problem that has not been effectively solved in current technologies. Summary of the invention
[0005] One purpose of the present invention is to propose a GPU parallel acceleration method for evaluating subdivision volume parameters. The present invention effectively improves the parameter evaluation speed of complex volume subdivision models by designing an optimized parallel algorithm and making full use of the multi-core architecture and floating-point computing capabilities of the GPU.
[0006] A GPU parallel acceleration method for evaluating subdivision volume parameters according to an embodiment of the present invention comprises the following steps:
[0007] S1. Store and traverse the volume mesh through a data structure containing half edges and half faces to determine the type of each volume unit;
[0008] S2, perform a CC volume subdivision under an arbitrary topology, so that if there are multiple irregular edges in the volume unit, they must converge at an irregular point, isolating the irregular vertices;
[0009] S3. For different topologies, use a data structure containing half faces and half edges to number the control mesh vertices, obtain a subdivision matrix according to the numbering sequence and CC subdivision rule, and pre-calculate the subdivision matrix feature structure;
[0010] S4. Parallel parameter evaluation is performed on different types of volume mesh elements.
[0011] Optionally, the S1 specifically includes:
[0012] S11. Given a hexahedral mesh model with an arbitrary topological structure, the mesh is stored and traversed through a data structure including half faces, opposite half edges, and radial half edges. For each volume unit in the mesh, all units adjacent to its points, edges, and faces are traversed. The units constitute a control mesh. The points in the control mesh are control vertices. When all adjacent units exist, the unit is an internal unit, otherwise it is a boundary unit.
[0013] S12, calculating the number of faces adjacent to each edge in the volume unit, the number of faces adjacent to each edge is the degree of the edge, an edge with a degree of 4 is a regular edge, a regular unit is a regular unit when all the edges constituting the unit are regular edges, a layered unit is a unit when there is only one irregular edge, an irregular unit is a unit when multiple irregular edges converge at one point, and the remaining units are the above units after local subdivision;
[0014] S13, boundary cell classification rules are the same as S12, in addition, when two faces are boundary faces, they are boundary corner cells.
[0015] Optionally, the S2 specifically includes:
[0016] S21, subdividing the volume grid once, so that the volume grid unit has only one irregular point at most and no irregular edges that do not intersect;
[0017] S22. When performing volume subdivision in an irregular volume mesh, the calculation of volume points and surface points is not affected. The new volume point is the centroid of the volume unit, the new surface point is the centroid of the surface and the average of the volume points of the two adjacent volumes, and the new edge point is calculated as follows:
[0018] ;
[0019] Among them, E is the new edge point, , are the average values of the volume points and surface points of all adjacent volumes of the edge, N is the number of adjacent surfaces of the edge, and M is the midpoint of the edge;
[0020] In any topological mesh, new vertices are calculated as follows:
[0021] ;
[0022] in, and are the points before and after segmentation, is a point that shares an edge with the original vertex. are points that share a face but not an edge, are points that share the volume but not the edges and faces, , and are the number of edges, faces and volumes adjacent to the original vertex point;
[0023] S23, connecting the vertex points with the surrounding new surface points, and connecting the new surface points with the surrounding new edge points to complete a round of subdivision.
[0024] Optionally, the S3 specifically includes:
[0025] S31, the process of traversal numbering uses a volume mesh data structure containing half faces and half edges, and the control vertex order in the regular volume unit control mesh is consistent with the tensor product calculation order, and is arranged along the u, v, and w directions respectively. In the layered volume control mesh, each layer is numbered according to the face control mesh numbering rule, and the layers are numbered in order from bottom to top;
[0026] S32, in the irregular volume unit control grid, let the irregular point be the origin, the three irregular edges be the parameter coordinate axes, numbering starts from the irregular vertex of the volume unit to be calculated, and numbering all vertices that share edges with the irregular vertex but are not in the volume unit to be calculated;
[0027] S33, processing the control vertices around the irregular edge of the volume unit to be calculated, the control vertices are divided into inner and outer layers, the inner layer vertices are points around the points on the irregular edge that share the edge with the irregular vertex, and are numbered clockwise from the positive direction of the coordinate axis. Since there are shared vertices in three directions, the marked vertices are skipped in the direction of the last mark;
[0028] S34, outer vertices and irregular surface control meshes also skip shared vertices in order;
[0029] S35. According to the body subdivision calculation and numbering rules in S2, the shape of each topological case is Segmentation matrix , where K and M are the number of control vertices before and after subdivision, respectively. Take the first K rows to get , calculate the characteristic structure and calculate the coefficients of the basis function according to the characteristic structure, the selection matrix and the subdivision matrix;
[0030] The characteristic structure of the subdivision matrix and the coefficients of the basis function are the same throughout the entire process, so they are pre-calculated and stored in a file and can be read when evaluating parameters.
[0031] Optionally, the regular cells in the volume grid cells of S4 perform parallel parameter evaluation:
[0032] For internal rule units, the parameter points Evaluation:
[0033] ;
[0034] in, is the ith control vertex, The corresponding univariate cubic uniform B-spline basis function is obtained by dividing the number i by integer or remainder calculation. Perform a tensor product to obtain u, v, and w, which are the coordinates of the parameter points between 0 and 1 in the three directions of the parameter space:
[0035] ;
[0036] ;
[0037] ;
[0038] ;
[0039] ;
[0040] Among them, t is the coordinate of the parameter point in a certain direction;
[0041] For boundary regular cells, the parameter points Evaluation:
[0042] ;
[0043] in, is the univariate cubic uniform B-spline basis function and the crease basis function The tensor product of:
[0044] ;
[0045] ;
[0046] ;
[0047] ;
[0048] When performing parallel computing, when using a GPU based on a unified computing device architecture to accelerate the regular units in parallel, the parameter points to be calculated are divided in the host function and multiple CUDA streams are added to overlap memory transfer and kernel function execution. One body unit is assigned one thread block, and one parameter point is assigned one thread block. Allocate a thread:
[0049] ;
[0050] Among them, c is the control vertex, n is the basis function of the point, the parameter point value is stored in the global memory, and the control vertex and feature structure remain unchanged in a unit.
[0051] Optionally, the layered cells in the volume grid cells of S4 perform parallel parameter evaluation:
[0052] For internal layered cells, the parameter points The corresponding basis function is evaluated as:
[0053] ;
[0054] in, is the jth control vertex of the i-th layer, K is the number of vertices of the surface control mesh when the degree of the irregular point is N. , is the basis function, is a bivariate subdivision basis function;
[0055] For boundary layered elements, the parameter points The corresponding basis function is evaluated as:
[0056] ;
[0057] in, is the basis function.
[0058] Optionally, when parallel parameter calculation is performed in the hierarchical unit, the parameter points to be calculated are divided in the host function, and multiple CUDA streams are added to overlap memory transfer and kernel function execution. The parameter point values are stored in the global memory, and the control vertices and feature structures are stored in the shared memory. Two thread blocks are allocated to a hierarchical unit for collaborative division of labor. Each thread block uses half of the feature structure in the row direction to calculate the intermediate results, and atomic operations are used to accumulate in the global memory to obtain the final result.
[0059] Optionally, the irregular cells in the volume grid cells of S4 are subjected to parallel parameter evaluation:
[0060] For internal irregular cells, the number of layers n that need to be subdivided is calculated from the coordinates of the parameter points:
[0061] ;
[0062] Each subdivision divides a body unit into eight, one of which is still an irregular body unit, three layered body units, and four regular body units. In the nth subdivision, the parameter coordinate range of each body unit is for:
[0063] ;
[0064] ;
[0065] ;
[0066] ;
[0067] ;
[0068] ;
[0069] ;
[0070] Among them, units 3, 5, and 6 are layered units, and units 0, 1, 2, and 4 are regular units;
[0071] Mapping relationship between old parameter coordinates and new parameter coordinates as follows:
[0072] ;
[0073] ;
[0074] ;
[0075] ;
[0076] ;
[0077] ;
[0078] ;
[0079] Control vertices of layer n By segmentation matrix And the feature structure is obtained:
[0080] ;
[0081] Where V is the eigenvector, is the diagonal matrix of eigenvalues, is the initial control vertex;
[0082] In summary, the parameters of irregular units The corresponding basis function is evaluated as:
[0083] ;
[0084] in, Selection matrix for converting the control grid number before subdivision to the control grid number after subdivision.
[0085] Optionally, when parallel computing is performed in the irregular unit, the parameter points to be calculated are divided in the host function, and multiple CUDA streams are added to overlap memory transfer and kernel function execution, the parameter point values are stored in the global memory, the control vertices and feature structures are stored in the shared memory, and one hierarchical unit is allocated four thread blocks for collaborative division of labor. Each thread block uses one quarter of the feature structure to calculate intermediate results, and atomic operations are used to accumulate in the global memory to obtain the final result.
[0086] The beneficial effects of the present invention are:
[0087] (1) The present invention expands the traversal, numbering, characteristic structure calculation and final parameter evaluation calculation from two dimensions to three dimensions, and processes the additional irregular parts in the body. Compared with the recursive subdivision method, it saves memory consumption and optimizes efficiency. At the same time, it has higher accuracy and supports more flexible topology, thus improving the integrated process from modeling to simulation.
[0088] (2) The present invention makes full use of the multi-core architecture and floating-point computing power of the GPU to accelerate the process of evaluating the subdivided volume parameters in parallel. Compared with the traditional CPU serial execution method, the parallelism and efficiency of the parameter evaluation process are improved by splitting the parameter points for asynchronous transmission and calculation, allocating thread tasks and memory according to different types of units, and using tensor cores to accelerate matrix operations, thereby optimizing the problems of high computational density and high computational cost of the parameter evaluation process. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0090] Figure 1 A flowchart of a GPU parallel acceleration method for evaluating subdivision volume parameters proposed by the present invention;
[0091] Figure 2 A specific flow chart of the parallel process of parameter calculation in a GPU parallel acceleration method for evaluating subdivision volume parameters proposed by the present invention;
[0092] Figure 3 A schematic diagram of isolating irregular parts of a volume subdivision in a GPU parallel acceleration method for evaluating subdivision volume parameters proposed by the present invention.
[0093] Figure 4 This is an example diagram of irregularly controlled grid vertex numbering in a GPU parallel acceleration method for subdivision volume parameter evaluation proposed by the present invention.
[0094] Figure 5 A schematic diagram of various unit types after subdividing an irregular unit with three irregular edges in a GPU parallel acceleration method for evaluating subdivided volume parameters proposed by the present invention. DETAILED DESCRIPTION
[0095] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0096] refer to Figure 1-Figure 5 , a GPU parallel acceleration method for evaluating subdivision volume parameters, comprising the following steps:
[0097] S1. Store and traverse the volume mesh through a data structure containing half edges and half faces to determine the type of each volume unit;
[0098] S2, perform a CC volume subdivision under an arbitrary topology, so that if there are multiple irregular edges in the volume unit, they must converge at an irregular point, isolating the irregular vertices;
[0099] S3. For different topologies, use a data structure containing half faces and half edges to number the control mesh vertices, obtain a subdivision matrix according to the numbering sequence and CC subdivision rule, and pre-calculate the subdivision matrix feature structure;
[0100] S4. Parallel parameter evaluation is performed on different types of volume mesh elements.
[0101] In this implementation, S1 specifically includes:
[0102] S11. Given a hexahedral mesh model with an arbitrary topological structure, the mesh is stored and traversed through a data structure including half faces, opposite half edges, and radial half edges. For each volume unit in the mesh, all units adjacent to its points, edges, and faces are traversed. The units constitute a control mesh. The points in the control mesh are control vertices. When all adjacent units exist, the unit is an internal unit, otherwise it is a boundary unit.
[0103] S12, calculating the number of faces adjacent to each edge in the volume unit, the number of faces adjacent to each edge is the degree of the edge, an edge with a degree of 4 is a regular edge, a regular unit is a regular unit when all the edges constituting the unit are regular edges, a layered unit is a unit when there is only one irregular edge, an irregular unit is a unit when multiple irregular edges converge at one point, and the remaining units are the above units after local subdivision;
[0104] S13, boundary cell classification rules are the same as S12, in addition, when two faces are boundary faces, they are boundary corner cells.
[0105] In this implementation, S2 specifically includes:
[0106] S21, subdividing the volume grid once, so that the volume grid unit has only one irregular point at most and no irregular edges that do not intersect;
[0107] S22. When performing volume subdivision in an irregular volume mesh, the calculation of volume points and surface points is not affected. The new volume point is the centroid of the volume unit, the new surface point is the centroid of the surface and the average of the volume points of the two adjacent volumes, and the new edge point is calculated as follows:
[0108] ;
[0109] Among them, E is the new edge point, , are the average values of the volume points and surface points of all adjacent volumes of the edge, N is the number of adjacent surfaces of the edge, and M is the midpoint of the edge;
[0110] In any topological mesh, new vertices are calculated as follows:
[0111] ;
[0112] in, and are the points before and after segmentation, is a point that shares an edge with the original vertex. are points that share a face but not an edge, are points that share the volume but not the edges and faces, , and are the number of edges, faces and volumes adjacent to the original vertex point;
[0113] S23, connecting the vertex points with the surrounding new surface points, and connecting the new surface points with the surrounding new edge points to complete a round of subdivision.
[0114] In this implementation, S3 specifically includes:
[0115] S31, the process of traversal numbering uses a volume mesh data structure containing half faces and half edges, and the control vertex order in the regular volume unit control mesh is consistent with the tensor product calculation order, and is arranged along the u, v, and w directions respectively. In the layered volume control mesh, each layer is numbered according to the face control mesh numbering rule, and the layers are numbered in order from bottom to top;
[0116] S32, in the irregular volume unit control grid, let the irregular point be the origin, the three irregular edges be the parameter coordinate axes, numbering starts from the irregular vertex of the volume unit to be calculated, and numbering all vertices that share edges with the irregular vertex but are not in the volume unit to be calculated;
[0117] S33, processing the control vertices around the irregular edge of the volume unit to be calculated, the control vertices are divided into inner and outer layers, the inner layer vertices are points around the points on the irregular edge that share the edge with the irregular vertex, and are numbered clockwise from the positive direction of the coordinate axis. Since there are shared vertices in three directions, the marked vertices are skipped in the direction of the last mark;
[0118] S34, outer vertices and irregular surface control meshes also skip shared vertices in order;
[0119] S35. According to the body subdivision calculation and numbering rules in S2, the shape of each topological case is Segmentation matrix , where K and M are the number of control vertices before and after subdivision, respectively. Take the first K rows to get , calculate the characteristic structure and calculate the coefficients of the basis function according to the characteristic structure, the selection matrix and the subdivision matrix;
[0120] The characteristic structure of the subdivision matrix and the coefficients of the basis function are the same throughout the entire process, so they are pre-calculated and stored in a file and can be read when evaluating parameters.
[0121] In this implementation, the regular cells in the volume grid cells of S4 perform parallel parameter evaluation:
[0122] For internal rule units, the parameter points Evaluation:
[0123] ;
[0124] in, is the ith control vertex, The corresponding univariate cubic uniform B-spline basis function is obtained by dividing the number i by integer or remainder calculation. Perform a tensor product to obtain u, v, and w, which are the coordinates of the parameter points between 0 and 1 in the three directions of the parameter space:
[0125] ;
[0126] ;
[0127] ;
[0128] ;
[0129] ;
[0130] Among them, t is the coordinate of the parameter point in a certain direction;
[0131] For boundary regular cells, the parameter points Evaluation:
[0132] ;
[0133] in, is the univariate cubic uniform B-spline basis function and the crease basis function The tensor product of:
[0134] ;
[0135] ;
[0136] ;
[0137] ;
[0138] When performing parallel computing, when using a GPU based on a unified computing device architecture to accelerate the regular units in parallel, the parameter points to be calculated are divided in the host function and multiple CUDA streams are added to overlap memory transfer and kernel function execution. One body unit is assigned one thread block, and one parameter point is assigned one thread block. Allocate a thread:
[0139] ;
[0140] Among them, c is the control vertex, n is the basis function of the point, the parameter point value is stored in the global memory, and the control vertex and feature structure remain unchanged in a unit.
[0141] In this implementation, the layered units in the volume grid unit of S4 perform parallel parameter evaluation:
[0142] For internal layered cells, the parameter points The corresponding basis function is evaluated as:
[0143] ;
[0144] in, is the jth control vertex of the i-th layer, K is the number of vertices of the surface control mesh when the degree of the irregular point is N. , is the basis function, is a bivariate subdivision basis function;
[0145] For boundary layered elements, the parameter points The corresponding basis function is evaluated as:
[0146] ;
[0147] in, is the basis function.
[0148] In this implementation, when parallel parameter calculation is performed in the hierarchical unit, the parameter points to be calculated are divided in the host function, and multiple CUDA streams are added to overlap memory transfer and kernel function execution. The parameter point values are stored in the global memory, and the control vertices and feature structures are stored in the shared memory. Two thread blocks are allocated to a hierarchical unit for collaborative division of labor. Each thread block uses half of the feature structure in the row direction to calculate the intermediate results, and atomic operations are used to accumulate in the global memory to obtain the final result.
[0149] In this implementation, the irregular cells in the volume grid cells of S4 perform parallel parameter evaluation:
[0150] For internal irregular cells, the number of layers n that need to be subdivided is calculated from the coordinates of the parameter points:
[0151] ;
[0152] Each subdivision divides a body unit into eight, one of which is still an irregular body unit, three layered body units, and four regular body units. In the nth subdivision, the parameter coordinate range of each body unit is for:
[0153] ;
[0154] ;
[0155] ;
[0156] ;
[0157] ;
[0158] ;
[0159] ;
[0160] Among them, units 3, 5, and 6 are layered units, and units 0, 1, 2, and 4 are regular units;
[0161] Mapping relationship between old parameter coordinates and new parameter coordinates as follows:
[0162] ;
[0163] ;
[0164] ;
[0165] ;
[0166] ;
[0167] ;
[0168] ;
[0169] Control vertices of layer n By segmentation matrix And the feature structure is obtained:
[0170] ;
[0171] Where V is the eigenvector, is the diagonal matrix of eigenvalues, is the initial control vertex;
[0172] In summary, the parameters of irregular units The corresponding basis function is evaluated as:
[0173] ;
[0174] in, Selection matrix for converting the control grid number before subdivision to the control grid number after subdivision.
[0175] In this embodiment, when parallel computing is performed in irregular units, the parameter points to be calculated are divided in the host function, and multiple CUDA streams are added to overlap memory transfer and kernel function execution. The parameter point values are stored in the global memory, and the control vertices and feature structures are stored in the shared memory. Four thread blocks are allocated to a hierarchical unit for collaborative division of labor. Each thread block uses a quarter of the feature structure to calculate the intermediate results, and atomic operations are used to accumulate in the global memory to obtain the final result.
[0176] The present invention expands the traversal, numbering, characteristic structure calculation and final parameter evaluation calculation from two dimensions to three dimensions, and processes additional irregular parts in the body. Compared with the recursive subdivision method, it saves memory consumption and optimizes efficiency. At the same time, it has higher accuracy and supports more flexible topology, thus improving the integrated process from modeling to simulation.
[0177] The present invention makes full use of the multi-core architecture and floating-point computing power of the GPU to accelerate the process of evaluating the subdivision parameters in parallel. Compared with the traditional CPU serial execution method, the parallelism and efficiency of the parameter evaluation process are improved by splitting the parameter points for asynchronous transmission and calculation, allocating thread tasks and memory according to different types of units, and using tensor cores to speed up matrix operations, thereby optimizing the problems of high calculation density and high calculation cost of the parameter evaluation process.
[0178] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A GPU parallel acceleration method for evaluating subdivision volume parameters, characterized in that: The steps include: S1. Store and traverse the volume mesh through a data structure containing half edges and half faces to determine the type of each volume unit; S2, perform a CC volume subdivision under arbitrary topology, so that if there are multiple irregular edges in the volume unit, they must converge at an irregular point, isolating the irregular vertices; S3. For different topologies, use a data structure containing half faces and half edges to number the control mesh vertices, obtain a subdivision matrix according to the numbering sequence and CC subdivision rule, and pre-calculate the subdivision matrix feature structure; S4, performing parallel parameter evaluation on different types of volume grid cells; The regular cells in the volume grid cells of S4 perform parallel parameter evaluation: For internal rule units, the parameter points Evaluation: ; in, is the ith control vertex, The corresponding univariate cubic uniform B-spline basis function is obtained by dividing the number i by integer or remainder calculation. Perform a tensor product to obtain u, v, and w, which are the coordinates of the parameter points between 0 and 1 in the three directions of the parameter space: ; ; ; ; ; Among them, t is the coordinate of the parameter point in a certain direction; For boundary regular cells, the parameter points Evaluation: ; in, is the univariate cubic uniform B-spline basis function and the crease basis function The tensor product of: ; ; ; ; When performing parallel computing, when using a GPU based on a unified computing device architecture to accelerate the regular units in parallel, the parameter points to be calculated are divided in the host function and multiple CUDA streams are added to overlap memory transfer and kernel function execution. One body unit is assigned one thread block, and one parameter point is assigned one thread block. Allocate a thread: ; Among them, c is the control vertex, n is the basis function of the point, the parameter point value is stored in the global memory, and the control vertex and feature structure remain unchanged in a unit.
2. The GPU parallel acceleration method for evaluating subdivision volume parameters according to claim 1, characterized in that: The S1 specifically includes: S11. Given a hexahedral mesh model with an arbitrary topological structure, the mesh is stored and traversed through a data structure including half faces, opposite half edges, and radial half edges. For each volume unit in the mesh, all units adjacent to its points, edges, and faces are traversed. The units constitute a control mesh. The points in the control mesh are control vertices. When all adjacent units exist, the unit is an internal unit, otherwise it is a boundary unit. S12, calculating the number of faces adjacent to each edge in the volume unit, the number of faces adjacent to each edge is the degree of the edge, an edge with a degree of 4 is a regular edge, a regular unit is a regular unit when all the edges constituting the unit are regular edges, a layered unit is a unit when there is only one irregular edge, an irregular unit is a unit when multiple irregular edges converge at one point, and the remaining units are the above units after local subdivision; S13, boundary unit classification rules are the same as S12, in addition, when two faces are boundary faces, they are boundary corner cells.
3. The GPU parallel acceleration method for evaluating subdivision volume parameters according to claim 1, characterized in that: The S2 specifically includes: S21, subdividing the volume grid once, so that the volume grid unit has only one irregular point at most and no irregular edges that do not intersect; S22. When performing volume subdivision in an irregular volume mesh, the calculation of volume points and surface points is not affected. The new volume point is the centroid of the volume unit, the new surface point is the centroid of the surface and the average of the volume points of the two adjacent volumes, and the new edge point is calculated as follows: ; Among them, E is the new edge point, , are the average values of the volume points and surface points of all adjacent volumes of the edge, N is the number of adjacent surfaces of the edge, and M is the midpoint of the edge; In any topological mesh, new vertices are calculated as follows: ; in, and are the points before and after segmentation, is a point that shares an edge with the original vertex. are points that share a face but not an edge, are points that share the volume but not the edges and faces, , and are the number of edges, faces and volumes adjacent to the original vertex point; S23, connecting the vertex points with the surrounding new surface points, and connecting the new surface points with the surrounding new edge points to complete a round of subdivision.
4. The GPU parallel acceleration method for evaluating subdivision volume parameters according to claim 1, characterized in that: The S3 specifically includes: S31, the process of traversal numbering uses a volume mesh data structure containing half faces and half edges, and the control vertex order in the regular volume unit control mesh is consistent with the tensor product calculation order, and is arranged along the u, v, and w directions respectively. In the layered volume control mesh, each layer is numbered according to the face control mesh numbering rule, and the layers are numbered in order from bottom to top; S32, in the irregular volume unit control grid, let the irregular point be the origin, the three irregular edges be the parameter coordinate axes, numbering starts from the irregular vertex of the volume unit to be calculated, and numbering all vertices that share edges with the irregular vertex but are not in the volume unit to be calculated; S33, processing the control vertices around the irregular edge of the volume unit to be calculated, the control vertices are divided into inner and outer layers, the inner layer vertices are points around the points on the irregular edge that share the edge with the irregular vertex, and are numbered clockwise from the positive direction of the coordinate axis. Since there are shared vertices in three directions, the marked vertices are skipped in the direction of the last mark; S34, outer vertices and irregular surface control meshes also skip shared vertices in order; S35. According to the body subdivision calculation and numbering rules in S2, the shape of each topological case is Segmentation matrix , where K and M are the number of control vertices before and after subdivision, respectively. Take the first K rows to get , calculate the characteristic structure and calculate the coefficients of the basis function according to the characteristic structure, the selection matrix and the subdivision matrix; The characteristic structure of the subdivision matrix and the coefficients of the basis function are the same throughout the entire process, so they are pre-calculated and stored in a file and can be read when evaluating parameters.
5. The GPU parallel acceleration method for evaluating subdivision volume parameters according to claim 1, characterized in that: The S4 volume grid cells perform parallel parameter evaluation in the layered cells: For internal layered cells, the parameter points The corresponding basis function is evaluated as: ; in, is the jth control vertex of the i-th layer, K is the number of vertices of the surface control mesh when the degree of the irregular point is N. , is the basis function, is a bivariate subdivision basis function; For boundary layered elements, the parameter points The corresponding basis function is evaluated as: ; in, is the basis function.
6. The GPU parallel acceleration method for evaluating subdivision volume parameters according to claim 5, characterized in that: When parallel parameter calculation is performed in the hierarchical unit, the parameter points to be calculated are divided in the host function, and multiple CUDA streams are added to overlap memory transmission and kernel function execution. The parameter point values are stored in the global memory, and the control vertices and feature structures are stored in the shared memory. One hierarchical unit is allocated two thread blocks for collaborative division of labor. Each thread block uses half of the feature structure in the row direction to calculate the intermediate results, and uses atomic operations to accumulate in the global memory to obtain the final result.
7. The GPU parallel acceleration method for evaluating subdivision volume parameters according to claim 1, characterized in that: The S4 volume grid cells perform parallel parameter evaluation for irregular cells: For internal irregular cells, the number of layers n that need to be subdivided is calculated from the coordinates of the parameter points: ; Each subdivision divides a body unit into eight, one of which is still an irregular body unit, three layered body units, and four regular body units. In the nth subdivision, the parameter coordinate range of each body unit is for: ; ; ; ; ; ; ; Among them, units 3, 5, and 6 are layered units, and units 0, 1, 2, and 4 are regular units; Mapping relationship between old parameter coordinates and new parameter coordinates as follows: ; ; ; ; ; ; ; Control vertices of layer n By segmentation matrix And the feature structure is obtained: ; Where V is the eigenvector, is the diagonal matrix of eigenvalues, is the initial control vertex; In summary, the parameters of irregular units The corresponding basis function is evaluated as: ; in, Selection matrix for converting the control grid number before subdivision to the control grid number after subdivision.
8. The GPU parallel acceleration method for evaluating subdivision volume parameters according to claim 7, characterized in that: When parallel computing is performed in the irregular unit, the parameter points to be calculated are divided in the host function, and multiple CUDA streams are added to overlap memory transmission and kernel function execution. The parameter point values are stored in the global memory, and the control vertices and feature structures are stored in the shared memory. One hierarchical unit is allocated four thread blocks for collaborative division of labor. Each thread block uses one quarter of the feature structure to calculate intermediate results, and atomic operations are used to accumulate in the global memory to obtain the final result.
Citation Information
Patent Citations
Molecule surface mesh generation method based on subdivision method
CN102663822A
AMF universal file generating method of heterogeneous entity parameter model
CN107767452A