Index construction and volume rendering method and system for adaptive mesh refinement data
Patent Information
- Application Number
- CN202611212733.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-10-30
AI Technical Summary
再加上硬件BVH的构建与存储,内存峰值极易超出普通消费级GPU的容量,严重限制大规模AMR数据交互式可视化的适用范围
本发明通过将AMR细胞重组为浅层局部规则网格,结合顶点中心场重构与位图紧凑编码,在无需硬件BVH的情况下实现高效、低内存的交互式绘制。够大幅降低AMR体绘制内存占用、同时保持高效空间查询与高质量渲染。
Smart Images

Figure CN123015804A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of scientific computing visualization technology, and in particular relates to a method and system for index construction and volume rendering of adaptive grid-refined data. Background Technology
[0002] Adaptive Mesh Refinement (AMR) is a core technique in large-scale numerical simulations. It concentrates computational resources and reduces storage overhead by using fine meshes in regions of rapid physical quantity changes and coarse meshes in regions of gradual change. This type of data is widely used in computational fluid dynamics, astrophysics, climate simulation, and other fields. Typical frameworks include block-structured AMR and octree-based AMR. To analyze and diagnose the refined simulation results, users typically need to directly plot the AMR data to obtain the overall structure of the three-dimensional field.
[0003] Direct volume rendering requires rapidly locating and interpolating cells containing a given point at any sampling location. Existing high-performance AMR volume rendering methods often reorganize irregular AMR meshes into GPU-friendly primitives and leverage hardware-accelerated bounding volume hierarchies to achieve ray traversal and spatial skipping. A typical approach, such as ExaBrick, clusters cells of the same refinement level into regular mesh "bricks," and then constructs a bounding volume hierarchy (BVH) on top of these bricks. Another approach, ExaStitch, constructs an explicit dual mesh, using regular mesh patches and unstructured stitched units to represent transition regions.
[0004] While the methods described above achieve good rendering quality, they generally suffer from significant GPU memory overhead. To ensure C0 continuity at cross-level interfaces, ExaBrick uses overlapping bricks combined with special basis functions, while ExaStitch generates a large number of explicit stitching units. These additional structures cause the geometric data volume to expand by 50% to 75%. Coupled with the construction and storage of hardware BVH, the peak memory usage can easily exceed the capacity of ordinary consumer-grade GPUs, severely limiting the applicability of large-scale AMR data interactive visualization.
[0005] In addition, existing BVH-based methods are highly dependent on specific hardware accelerators, have high traversal depth and tree structure complexity, and are difficult to run in memory-constrained or non-OptiX environments. Summary of the Invention
[0006] To address at least one of the technical problems mentioned above, this invention provides an index construction and volume rendering method and system for adaptive mesh refinement data, which can significantly reduce the memory usage of AMR volume rendering while maintaining efficient spatial querying and high-quality rendering.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: The first aspect of the present invention provides a method for index construction and volume rendering of adaptive mesh refinement data, comprising the following steps: Obtain the AMR simulation data to be plotted; The AMR simulation data to be drawn is preprocessed to reconstruct the cell center field into the vertex center field, and the C0 continuity of the scalar field is ensured by two-element interpolation at the coarse-fine interface. Based on the reconstructed vertex center field, AMR cells are mapped to a unified integer coordinate space; A shallow brick tree is constructed based on AMR cells mapped to a unified integer coordinate space; each internal node of the brick tree corresponds to a local regular grid, and the child nodes of the same parent node have equal spatial range. The brick tree is encoded in a GPU-friendly, compact manner, using bitmaps instead of explicit node indices and cell IDs, and storing bricks and scalar values in GPU memory as linear arrays; On the GPU, time-dependent cell localization is performed in the brick tree using integer arithmetic, and direct volume rendering is performed with spatial skipping and free path sampling of mixed granularity segments.
[0008] Furthermore, the acquired AMR simulation data to be plotted is stored in the form of cell centers, represented as a cell set. Each of the cells At least the central location of the cell Space Enclosing Box Detailed levels Cell size and cell center scalar values Information on the cell's location within its AMR block, tree node, or hierarchical structure.
[0009] Furthermore, the cell center field is reconstructed into a vertex center field, specifically including: For each AMR cell, the corresponding corner coordinates are generated based on its spatial bounding box and refinement level, and a vertex mapping table is established using the corner coordinates as the key. Traverse adjacent cell pairs; if two adjacent cells have different refinement levels, mark their common boundary as a coarse-fine interface. On the coarse-fine interface, if a vertex appears in both the corner point set of the coarse-level cell and the fine-level cell, it is called a shared vertex; if a vertex appears only on the boundary of the fine-level cell but is located inside the edge or face of the coarse-level cell, it is called a dangling vertex. For a shared vertex, a local dual unit centered on the shared vertex is constructed, and the scalar value of the center of the neighboring cell is interpolated to obtain the scalar value of the shared vertex. For a suspended vertex, the scalar value of the suspended vertex is obtained by interpolation of the scalar values of adjacent shared vertices based on its geometric position on the thick-thin interface. Write the scalar values of ordinary vertices, shared vertices, and dangling vertices into the vertex center field.
[0010] Furthermore, the mapping of AMR cells to a unified integer coordinate space based on the reconstructed vertex center field includes: Traverse all AMR cells to determine the global spatial extent. and ; The finest cell width in three dimensions is statistically analyzed. ,by As the basic unit of quantization in integer coordinate space, the quantization length of each dimension is calculated. This aligns the integer space boundary to powers of 2, mapping any floating-point position x to integer coordinates. ,in, Let x be the component coordinate of the floating-point coordinate in dimension d. Let d be the minimum coordinates in the global space. The bounding box side length is a global integer.
[0011] Furthermore, the construction of a shallow brick tree based on AMR cells mapped to a unified integer coordinate space includes: Initialize the root node to create a root node covering the entire integer space range of AMR cells; For the current node, if it does not contain any cells, it is marked as an empty leaf; if it contains only one AMR cell, it is marked as a normal cell leaf; if it contains multiple cells, it is marked as a brick node, and the partitioning continues. During partitioning, the refinement level of all cells is counted, and the integer side length of the coarsest level cell in the node is taken as the local partitioning granularity. Enumerate candidate partition schemes. For a candidate partition scheme P, calculate the number of local branches k for each candidate scheme by combining the partition dimension, local partition granularity, and the number of sub-intervals on that dimension. For candidate schemes, calculate the heuristic CVH of the cell variance of the generated k child nodes; The scheme is selected based on CVH, the number of child nodes k, the number of bricks, and the continuity of the region; According to the selected partitioning scheme, the current brick is evenly divided into a set number of subspaces of equal size. The cells are assigned to the corresponding child nodes according to the integer coordinates of the cells. The above process is recursively executed for each child node until all nodes are leaf nodes. After the construction is completed, the brick tree node set B is output.
[0012] Furthermore, the GPU-friendly compact encoding of the brick tree and vertex center field specifically includes: Number the bricks using a breadth-first search method, and store at least one sub-brick lookup bitmap for each brick. And empty leaf mask bitmap , In this topological encoding, one bit corresponds to one child node, which is used to distinguish whether the child node is a child tile or not a child tile. In this context, one bit corresponds to one child node, used to mark whether the child node is an empty leaf node; Each brick also stores the offset of the first sub-brick, the value offset, the value range, and the bounding box metadata; the scalar value array is stored linearly in vertex order, and the indices of other vertices are obtained in real time through integer operations on the regular grid; sub-brick lookup is completed in constant time through hardware-supported rank operations.
[0013] Furthermore, the step of performing time-dependent cell localization in the brick tree on the GPU using integer arithmetic and executing direct volume rendering with spatial skipping and free path sampling of mixed granularity segments includes: Current light position Mapping integer coordinates Starting from the root brick, according to Calculate the child node index of the current layer based on the relationship between the current brick's integer bounding box and the partition granularity; When a non-empty cell is located, the vertex values of its eight corner points are taken according to the cell's position in the local regular grid of the parent brick, and trilinear interpolation is performed based on the relative position of the sampling point in the cell to obtain the scalar value. A sampling strategy that combines brick-like and cellular segments was employed to determine the type of mixed particle size, and the segment exit distance for different particle size types was calculated. ; Calculate the principal maxima for different particle sizes, and combine the principal maxima with a set threshold to determine whether to propel the light beam to the desired depth. ; When the cumulative opacity of the light reaches a preset threshold or exceeds the distance, the processing of that light is terminated; otherwise, the positioning, interpolation, and sampling process is repeated from the new position t until the drawing is completed.
[0014] A second aspect of the present invention provides an indexing and volume rendering system for adaptive mesh refinement data, comprising: The simulation data acquisition module is used to acquire the AMR simulation data to be plotted. The data reconstruction module is used to preprocess the AMR simulation data to be drawn, reconstruct the cell center field into the vertex center field, and ensure the C0 continuity of the scalar field through two-element interpolation at the coarse-fine interface. The coordinate mapping module is used to map AMR cells to a unified integer coordinate space based on the reconstructed vertex center field; The brick tree construction module is used to construct shallow brick trees based on AMR cells mapped to a unified integer coordinate space; each internal node of the brick tree corresponds to a local regular grid, and the child nodes of the same parent node have equal spatial ranges. The compact coding module is used for GPU-friendly compact coding of brick trees, which uses bitmaps instead of explicit node indices and cell IDs, and stores bricks and scalar values in GPU memory as linear arrays; The rendering module is used for time-dependent cell localization in the brick tree on the GPU using integer arithmetic and to perform direct volume rendering with spatial skipping and free path sampling of mixed granularity segments.
[0015] A third aspect of the present invention provides a computer-readable storage medium.
[0016] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the index construction and volume rendering method for adaptive mesh refinement data as described above.
[0017] A fourth aspect of the present invention provides a computer device.
[0018] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the index construction and volume rendering method for adaptive mesh refinement data as described above.
[0019] Compared with the prior art, the beneficial effects of the present invention are: This invention achieves efficient, low-memory interactive rendering without the need for hardware BVH by reorganizing AMR cells into a shallow, locally regular mesh and combining vertex center field reconstruction with bitmap compact encoding. This significantly reduces the memory footprint of AMR volume rendering while maintaining efficient spatial lookup and high-quality rendering.
[0020] This invention achieves C0 continuity across levels of the interface by reconstructing the vertex center field and using dual-element interpolation, without the need for overlapping bricks or explicit splicing geometry, thus avoiding the additional memory overhead introduced by traditional methods for continuous reconstruction.
[0021] The brick tree adopts a shallow local regular grid hierarchy structure instead of a deep BVH, which fundamentally reduces the storage and traversal overhead of the spatial index. The cell variance heuristic ensures that the number of bricks after partitioning is small and the cells at the same level have good aggregation, which is conducive to spatial domain skipping and compact memory placement.
[0022] Bitmap-based compact encoding eliminates explicit cell IDs and node pointers, theoretically reducing the memory overhead of AMR meshes by about 80%, allowing datasets of hundreds of millions of cells to be fully loaded into video memory on consumer-grade GPUs.
[0023] The entire volume renderer is implemented entirely on CUDA, without relying on hardware ray tracing such as OptiX, reducing dependence on specific hardware while maintaining rendering performance and visual fidelity comparable to existing methods.
[0024] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0025] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0026] Figure 1 This is a flowchart of the index construction and volume drawing method for adaptive mesh refinement data provided in this embodiment of the invention; Figure 2 This is a rendering effect of the NASA Exajet dataset and a comparison of the access depth of the brick tree and BVH provided in the embodiments of the present invention. Figure 3 This is a schematic diagram of vertex center field reconstruction provided in an embodiment of the present invention; wherein, (a) is a traditional method that only uses coarse-level values and loses details; (b) is a method that calculates interface values by interpolating the dual units of shared vertices, and then obtains the suspended vertex values by interpolating the shared vertices, thus preserving fine-level information; Figure 4 This is an example of the brick tree construction process provided in this embodiment of the invention and a comparison diagram with ExaBrick; wherein, (a) is the input AMR mesh and its partitioning process; (b) is the final brick tree; (c) is a comparison of the two partitioning schemes; and (d) is the traditional ExaBrick partitioning result; Figure 5 This is a memory layout diagram of compact brick-tree encoding provided in an embodiment of the present invention, wherein (a) is an example brick B2; (b) is the corresponding brick-tree structure and bitmap; and (c) is the brick array and value array in linear memory. Detailed Implementation
[0027] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0028] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0029] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0030] Example 1 like Figure 1 As shown, this embodiment provides a method for index construction and volume rendering of adaptive mesh refinement data, including the following steps: S1: Obtain the AMR simulation data to be plotted; In this embodiment, AMR data refers to adaptive mesh refinement data output by numerical simulation software when solving physical problems. This data is generated by automatically adjusting the mesh resolution based on the degree of change in local physical quantities, error estimation results, or preset refinement criteria. This type of data is the simulation result objectively generated by the simulation solver based on governing equations, boundary conditions, initial conditions, time progression, and mesh refinement strategies. In AMR data, regions with drastic changes in physical quantities or requiring high-precision analysis use fine meshes, while regions with relatively gradual changes use coarse meshes. Each AMR cell typically includes its spatial location or bounding box, refinement level, cell size, cell center scalar value, and its relationship with adjacent cells or its block structure. Depending on the data organization method, AMR data can be block-structured AMR data or tree-structured AMR data.
[0031] Taking aircraft external flow field simulation as an example, the simulation software can automatically deploy higher resolution meshes in areas such as the wing leading edge, fuselage surface, engine wake, near shock waves, or regions with obvious vortex structures, while using coarser meshes in areas far from the aircraft where the flow field changes gently. After the simulation, the output scalar fields such as pressure, density, velocity modulus, temperature, or vorticity constitute the AMR dataset. During post-processing, users need to observe the wake structure, shock wave location, high-gradient flow field regions, and cross-scale flow characteristics through direct volume rendering.
[0032] The acquired AMR simulation data to be plotted is stored in the form of cell centers, represented as a cell set. Each of the cells At least the central location of the cell Space Enclosing Box Detailed levels Cell size and cell center scalar values Information on the cell's location within its AMR block, tree node, or hierarchical structure; For AMR data in different formats, they can first be uniformly converted into the cell set format described above. For example, for block-structured AMR data, each AMR block is traversed and its leaf cells are extracted; for tree-structured AMR data, the leaf nodes of the tree structure are traversed and leaf cells are extracted. After this step, subsequent algorithms do not depend on the original file format, but only on the unified cell set C. Figure 2 The NASA Exajet dataset shown is a typical application scenario for large-scale AMR simulation data. It contains a multi-level adaptive grid structure and can be used to illustrate the application of the method in this embodiment in complex simulation results such as aircraft external flow fields.
[0033] S2: Preprocess the AMR simulation data to be drawn, reconstruct the cell center field into the vertex center field, and ensure the C0 continuity of the scalar field at the coarse-fine interface through two-element interpolation; Raw AMR data is typically a scalar field at the cell center. Since adjacent cells may have different refinement levels, T-shaped connections exist at the boundaries between coarse and fine meshes. If interpolation is performed directly within coarse and fine cells, different interpolation units may yield different scalar values at the same geometric location, leading to discontinuities at cross-level interfaces.
[0034] To address this issue, this embodiment reconstructs the cell center field into a vertex center field during the preprocessing stage. For example... Figure 3 As shown, the present invention reconstructs the cell center field into the vertex center field during the preprocessing stage. Figure 3 (a) shows the traditional coarse-level assignment method, which directly uses coarse-level vertex values at the coarse-fine interface. Although it can avoid interface breakage in form, it loses the local details carried by the fine-level mesh. Figure 3 (b) illustrates the vertex center field reconstruction method used in this invention, which first calculates the shared vertex values at the coarse-fine interface, and then obtains the dangling vertex values by interpolation of the shared vertices, thus taking into account both coarse-level and fine-level information. Specifically, it includes the following steps: For each AMR cell, corresponding corner coordinates are generated based on its spatial bounding box and refinement level, and a vertex mapping table is established using the corner geometric coordinates as keys. Vertices with the same geometric position are mapped to the same vertex record, or assigned the same scalar value when different local mesh copies exist.
[0035] Traversing adjacent cell pairs, if two adjacent cells have different refinement levels, their common boundary is marked as a coarse-fine interface. Generally speaking, the refinement level difference between adjacent cells in typical AMR data does not exceed 1, which satisfies the 2:1 subdivision condition in common AMR data.
[0036] like Figure 3 As shown in the interface vertices in (b), on the coarse-fine interface, if a vertex appears in both the set of corner points of the coarse-level cell and the fine-level cell, it is called a shared vertex; if a vertex appears only on the boundary of the fine-level cell and is located inside the edge or face of the coarse-level cell, it is called a suspended vertex.
[0037] For a shared vertex, construct a local dual unit centered on that shared vertex. This dual unit can correspond to... Figure 2 (b) shows the dashed dual structure connecting the coarse and fine-level neighborhoods. Based on the relative positions of the shared vertices in the dual units, linear, bilinear, or trilinear interpolation is performed on the scalar values of the neighborhood cell centers to obtain the scalar values of the shared vertices. Since this scalar value utilizes both coarse and fine-level neighborhood information, it can preserve fine-level information rather than simply using coarse-level values to cover the interface vertices.
[0038] For a dangling vertex, the value is obtained by interpolation of the scalar values of adjacent shared vertices based on its geometric position on the interface. If the dangling vertex is located on the edge of the interface, one-dimensional linear interpolation is used; if the dangling vertex is located inside the interface, bilinear interpolation is used.
[0039] The scalar values of ordinary vertices, shared vertices, and dangling vertices are written into the vertex center field V. During subsequent rendering, the scalar values inside any cell are obtained by trilinear interpolation of the values of its corner vertices.
[0040] This stage takes the aforementioned AMR cell set as input, identifies ordinary vertices, cross-level interface shared vertices, and dangling vertices, calculates scalar values for these vertices, and outputs the vertex center scalar field. Each vertex This includes spatial coordinates, scalar values, and relationships with neighboring cells. This vertex center field serves as the basis for subsequent trilinear interpolation, range calculations, and GPU sampling.
[0041] Through the above steps, coarse-level cells and fine-level cells use the same interface vertex values on the shared boundary, or use dangling vertex values derived from the same set of shared vertex values. Therefore, when the sampling point is located at the coarse-fine interface, the scalar values calculated from the coarse-side elements and the fine-side elements are consistent, thus ensuring the C0 continuity at the cross-level interface.
[0042] S3: Combine the vertex center field to map the AMR cell to a unified integer coordinate space.
[0043] This stage takes the AMR cell set and vertex center field as input, first quantizes the floating-point spatial positions into integer coordinates, and then reorganizes the AMR cells into a shallow k-ary tree structure through a top-down partitioning strategy, outputting a set of brick tree nodes. Each internal node is called a brick, representing a local regular grid; each leaf node represents a regular AMR cell or an empty leaf.
[0044] To avoid floating-point errors affecting brick tree construction and runtime spatial positioning, this step is Figure 4 The preliminary steps of the brick-tree partitioning process shown are also Figure 5 The compact encoding shown is based on restoring spatial positions through integer operations.
[0045] Mapping AMR cells to uniform integer coordinates, quantizing the entire domain with the finest cell width, and aligning the boundaries to powers of 2 involves the following steps: Traverse all AMR cells to determine the global spatial extent: , ,in, and Represents the minimum and maximum coordinates in global space. The minimum coordinates of the x-axis, y-axis, and z-axis. The maximum coordinates of the x-axis, y-axis, and z-axis; The finest cell width in three dimensions is statistically analyzed. ,in, The finest cell width serves as the basic unit of quantization in integer coordinate space. The quantization length is calculated for each dimension: Take the maximum coordinate. And set the global integer bounding box side length to: , To round up, where, , This represents the maximum and minimum coordinates in the global space along dimension d. These are the maximum coordinates of the corresponding x-axis, y-axis, and z-axis; This aligns the integer space boundaries to powers of 2, facilitating subsequent hierarchical partitioning and integer arithmetic.
[0046] For any floating-point position x, map it to integer coordinates. : ,in, The component coordinates of the floating-point coordinate x in dimension d.
[0047] For AMR data with a fixed refinement ratio of 2:1, the integer side length of the finest cell is 1, the integer side length of the next coarser cell is 2, the integer side length of the next coarser cell is 4, and so on. This step outputs global integer coordinate metadata and the integer coordinates of each cell. The metadata includes... , The output will be defined as m, and the integer cell size corresponding to each refinement level. Figure 4 The brick tree construction shown Figure 5 The direct input to the GPU compact encoding is shown.
[0048] S4: Construct a shallow brick tree based on AMR cells mapped to a unified integer coordinate space; After completing the integer coordinate mapping, this invention organizes AMR cells into a shallow k-ary brick tree. Each internal node in the brick tree is called a brick, and each brick corresponds to a local regular grid. All child nodes under the same parent brick have the same spatial extent, so the child node index can be calculated in constant time using integer arithmetic.
[0049] like Figure 4 As shown, the brick tree construction process includes stepwise spatial partitioning of the input AMR mesh, the final brick tree structure, heuristic comparison of different partitioning schemes, and comparison with the traditional ExaBrick partitioning results. Among these, Figure 4 (a) illustrates the process of the input AMR mesh being progressively divided starting from the root region; Figure 4 (b) shows the final brick tree structure obtained by this partitioning process; Figure 4(c) shows the differences in CVH value and number of bricks for different axial partitioning schemes; Figure 4 (d) shows the meshing results of the same AMR grid using the traditional ExaBrick method. Figure 4 As can be seen, the brick tree construction of this invention is not a simple clustering of cells at the same level, but rather a shallower and more compact local regular grid hierarchy structure formed through heuristic partitioning. During brick tree construction, starting from the root node, the partitioning granularity is recursively determined based on the scale of the coarsest level cells locally. Among all effective axial partitioning schemes, the scheme that minimizes the variance at the child node cell level is selected. If multiple schemes have the same variance, the scheme that produces fewer child nodes is selected. This process is repeated until a node contains only a single cell or is empty, resulting in a shallow k-ary tree.
[0050] Specifically, it includes the following sub-steps: S401: Initialize the root node; Specifically, the initialization of the root node involves creating a root node that covers the entire integer space of AMR cells, and adding all cells to the cell set corresponding to the root node. This root node corresponds to... Figure 4 (a) initially covers the entire area of the input grid.
[0051] S402: Determine the termination condition; For the current node η, if it does not contain any cells, mark it as an empty leaf; if it contains only one AMR cell, mark it as a normal cell leaf; if it contains multiple cells, mark it as a brick node and continue the partitioning process.
[0052] S403: Determine the local partitioning granularity; For a brick node η, the refinement level of all its cells is counted, and the integer side length of the coarsest-level cell within the node is taken as the local partition granularity g. Using the coarsest-level cell scale for partitioning ensures that child nodes under the same parent node have regular and equal spatial ranges after partitioning.
[0053] S404: Enumerate candidate partitioning schemes; In the three-dimensional case, candidate partitioning schemes include partitioning along seven non-empty axes: x, y, z, xy, xz, yz, and xyz. In the two-dimensional case, candidate partitioning schemes include partitioning along three axes: x, y, and xy. Figure 4 (c) The effect of different combinations of dividing axes on the CVH value and the number of bricks is shown in a two-dimensional case.
[0054] S405: Calculate the number of local branches k for each candidate solution; For a candidate partition scheme P, if partitioning along dimension d, then the number of subintervals along that dimension is... Divide the integer length of the current node along this dimension by the partition granularity g; if not partitioned along this dimension, then The number of local branches in this candidate solution is: ,in, These represent the number of sub-partitions generated by the current partitioning scheme in the three dimensions of x, y, and z.
[0055] Therefore, in this embodiment, k is the number of local dynamic branches determined by the spatial size of the current brick, the local coarsest cell scale, and the selected dividing axis.
[0056] S406: Heuristic CVH for calculating cell variance; For a candidate partitioning scheme P, it generates k child nodes. , ,..., .set up The set of refinement levels for cells within the i-th child node is defined as follows: ,in, child node Variance of inner cell refinement level. The smaller the CVH, the more consistent the cell level within each sub-node after partitioning, and the lower the probability of further partitioning.
[0057] S407: Select a partitioning scheme; Among all candidate partitioning schemes, the scheme with the smallest CVH is selected first; if multiple schemes have the same CVH, the scheme with fewer child nodes k is selected. Figure 4 (c) shows two typical cases of this selection criterion: when different schemes have different CVH, the scheme with the lower CVH is selected; when multiple schemes have the same CVH, the scheme that generates fewer bricks and has a more continuous area is selected.
[0058] S408: Generate child nodes and process them recursively; According to the selected partitioning scheme, the current brick is evenly divided into several subspaces of equal size. Cells within the current node are assigned to their corresponding child nodes based on their integer coordinates, and the termination judgment and partitioning process described above is recursively executed for each child node. After recursion, the following is formed: Figure 4 (b) shows the brick-tree structure.
[0059] S409: Outputs a brick tree structure; After construction, the output is a set of brick tree nodes, B. Each brick records its integer bounding box, partitioning axis scheme, number of child nodes in each of the three dimensions, local partitioning granularity, child node type, and the range of vertex values corresponding to it. Figure 4 Compared to the traditional ExaBrick partitioning shown in (d), the present invention reduces the need for additional index structures and improves the efficiency of local space queries by using shallow brick trees.
[0060] In this invention, "shallow layer" does not refer to a fixed maximum number of layers in the brick tree. Rather, it means that the brick tree depth is primarily determined by the number of refinement levels in the input AMR data, the complexity of local cross-level boundaries, and the partitioning strategy, and should be designed to minimize increases with the total number of AMR cells or the number of derived drawing primitives. For AMR data with R effective refinement levels, the number of brick layers the brick tree needs to access from the root brick to a normal cell leaf or empty leaf is typically related to R and the local mixed-level regions, representing a small constant-level access depth. In other words, if the AMR data has a small number of refinement levels and strong cross-level boundary locality, the brick tree access depth can be kept at a low level; if the AMR data contains more refinement levels or has more complex cross-level nested regions, the brick tree depth can be increased accordingly. Figure 2 The right side of the middle section shows the brick tree access depth distribution in a specific embodiment. Figure 2The middle section shows the access depth distribution of the traditional BVH method. This comparison is used to illustrate that the present invention can form shallower access paths on specific datasets, but it does not mean that the access depth of the present invention must be fixed as the value shown in the figure.
[0061] S5: GPU-friendly compact encoding of brick trees and vertex center fields, using bitmaps instead of explicit node indices and cell IDs, and storing topological information and scalar values in a linearized memory layout; This stage takes the set of brick tree nodes B and the vertex center field V as input and outputs a linearized GPU data structure, including a brick array, a sub-brick lookup bitmap, an empty leaf mask bitmap, a bitmap prefix array, a vertex value array, and a scalar value range for each brick.
[0062] After the brick tree is constructed, this invention performs GPU-friendly compact coding on the brick tree. The goal of this step is to eliminate explicit node pointers and ordinary leaf cell IDs, and to store topology information and scalar values in GPU memory in a linearized form.
[0063] The specific methods of compact coding include: Bricks are numbered in breadth-first order, and each brick stores two bitmaps—a sub-brick lookup bitmap and an empty leaf mask bitmap—replacing the original cell index and node index. The brick also stores the offset, value offset, value range, and bounding box metadata of the first sub-brick. The scalar value array is stored linearly in vertex order, and the indices of other vertices are obtained on the fly through integer operations on the regular grid. Sub-brick lookup is completed in constant time through hardware-supported rank operations.
[0064] like Figure 5 As shown, GPU compact encoding organizes the brick tree topology and vertex value data into a linear array. Figure 5 (a) shows a brick and its child node relationships in Figure 4; Figure 5 (b) shows the original entry structure corresponding to the brick, where child nodes may be child bricks, ordinary leaf cells, or empty leaves; Figure 5 (c) illustrates a compact memory layout, i.e., bitmap lookup via sub-bricks. Empty leaf mask bitmap Fields such as brick offset, scalar value offset, and value range replace explicit pointers and ordinary leaf cell IDs.
[0065] Each brick must include at least the following fields: : The minimum coordinates of the integer bounding box of the brick; : Integer bounding box dimensions for bricks; plan; Number of child nodes in three dimensions , , ; : The offset of the first child brick of this brick in the global brick array; The starting offset of the vertex value corresponding to this brick in the global vertex value array; The minimum and maximum values of the scalar values within this brick; : Find bitmap for sub-bricks; Empty leaf mask bitmap; Specifically, the steps include the following: S501: Linearly number all child nodes of the current brick in a fixed order; In this embodiment, preferably, the following row main sequence numbering is used: , where i, j, and k represent the local numbers of the child nodes in the x, y, and z directions, respectively.
[0066] S502: Each brick stores two bitmaps—a sub-brick lookup bitmap and an empty leaf mask bitmap, replacing the original cell index and node index; in, Find the bitmap for each child tile, where one bit corresponds to one child node. If... If the child node is a child brick, then the traversal needs to continue; if This indicates that the child node is not a child brick, meaning it is a regular cell leaf or an empty leaf. This bitmap corresponds to... Figure 5 (c) is the topological coding part used to distinguish between sub-bricks and non-sub-bricks.
[0067] in, This is an empty leaf mask bitmap, where one bit corresponds to one child node. If... If the child node is empty, it indicates that the child node is an empty leaf; if If , it means that the child node is not empty. At that time, the child node is a child brick. It can be set to 0 or ignored during querying. This bitmap corresponds to the empty leaf marker portion used for spatial skipping in Figure 4(c).
[0068] and All data is stored as 64-bit unsigned integers. For a child node index, its word number is: The character offset is: .
[0069] To support constant-time sub-brick positioning, When accessing a child tile by creating a prefix counting array `prefix`, first calculate the prefix counts preceding the current child node. Number of digits that are 1 in the middle: ,in, This indicates a mask that retains all bits preceding the current bit, and popcount indicates the set count operation supported by the hardware.
[0070] The index of the brick in the global brick array is: ;
[0071] For ordinary cell leaves, explicit AMR cell IDs are no longer stored. Their spatial location is determined by the parent brick bounding box. The child node index is recovered through integer arithmetic; its eight corner values are determined by... It is obtained by calculating the vertex indices of the local regular mesh.
[0072] Vertex value array The bricks are stored linearly according to the order of their corresponding local regular grids. For any vertex within a local regular grid, its global access address is determined by... This is obtained by adding local vertex linear indices. This linearized vertex value array corresponds to the Values storage area at the bottom of Figure 4(c).
[0073] This compact coding method will Figure 5 (b) The explicit indexes of a large number of ordinary leaf cells are replaced with Figure 5 (c) regular grid integer operations and bitmap queries, and utilize , Two bitmaps represent the topological state, thus significantly reducing the storage overhead of the AMR spatial index.
[0074] S6: Perform time-dependent cell localization in the brick tree on the GPU using integer arithmetic and execute direct volume rendering with spatial skipping and free path sampling of mixed granularity segments; During the rendering phase, the aforementioned brick array, bitmap array, prefix array, vertex value array, and scalar value range array are transferred to GPU memory. The GPU renderer can be a sampling integration program built based on the concept of ray casting, including direct volume rendering programs based on Ray Casting, Ray Marching, or Woodcock Tracing. Different renderers can use deterministic step sampling, random free path sampling, or a combination of both to complete ray integration. In this embodiment, a renderer based on Woodcock Tracing is implemented using CUDA encoding.
[0075] like Figure 2As shown on the left, in one embodiment, the method of the present invention can be used to perform path-tracing volume scattering mapping on large-scale AMR data such as NASA Exajet; as Figure 2 As shown in the middle and right sections, there is a significant difference in access depth between the traditional BVH method and the brick-tree method of this invention. This comparison illustrates that the present invention can reduce the traversal overhead in the spatial localization process through a shallow brick-tree. Simultaneously, the access dependency on bricks, empty leaves, and ordinary cell leaves during the rendering process is also reduced. Figure 5 The GPU compact coding structure is shown.
[0076] The spatial skipping mechanism during the drawing process is as follows: If the current sampling segment is a complete brick segment, the free path sampling within the segment is determined based on the principal maximum value derived from the pre-stored value range of the brick; if the current segment is an empty leaf or the principal maximum value is zero, it directly jumps to the segment exit, achieving efficient skipping of empty regions. The CUDA renderer performs the following processing on each line of sight: S601: Light initialization; Generate rays based on camera parameters and calculate the entry distance between the rays and the AMR global bounding box. and distance away If the ray does not intersect the global bounding box, no sampling is performed.
[0077] S602: Integer coordinate transformation of sampling points; For the current position of the light Based on the integer coordinate mapping method of S3, Convert to integer coordinates .
[0078] S603: Brick tree positioning; Starting from the root brick, according to Calculate the child node index (index) of the current layer based on the relationship between the current brick's integer bounding box and the partition granularity. Then according to Figure 5 (c) shows the bitmap and prefix counting method. The sub-brick index is obtained through the rank operation, and then the next level is entered; if... and If the current sampling position is located in an empty leaf; and If the current sampling location is located in a normal cell leaf or a sampleable local segment, then the current sampling location is located in a normal cell leaf or a sampleable local segment.
[0079] S603: Trilinear interpolation; When a non-empty cell is located, the vertex values of its eight corner points are read based on the cell's position in the local regular grid of the parent brick. Then, trilinear interpolation is performed based on the relative position of the sampling point within the cell to obtain the scalar value. This is used for calculating the cumulative (or integral, blended) color of the corresponding pixel. Since the vertex values have already been calculated according to... Figure 3 The method shown completes the continuous reconstruction of C0, thus the interpolation result remains continuous at the coarse-fine interface.
[0080] S604: Determination of mixed particle size range; This embodiment employs a sampling strategy that combines brick segments and cell segments. If the current brick does not contain sub-bricks, the current valid sampling segment can be extended to the boundary of the brick to form a whole brick segment; if the current brick contains sub-bricks and the sampling point falls within a normal leaf, the current valid sampling segment is restricted to the cell boundary of that leaf to form a cell segment; if the current sampling point falls within an empty leaf, or the principal maximum value corresponding to the current segment is zero, a skipped segment is formed.
[0081] S605: Exit Distance calculate; For whole brick sections, The distance from the current ray position to the nearest positive intersection point of the brick boundary; for cell segments, The distance from the current position of the light rays to the nearest positive intersection point of the cell boundary; for empty leaf segments, It represents the distance from the current position of the light ray to the nearest positive intersection point of the empty leaf boundary.
[0082] S606: Principal maximum calculation; For whole brick sections, based on the pre-stored bricks Calculate the conservative principal maximum with the current transfer function. For a cell segment, calculate based on the scalar value range of the cell's eight vertices and the current transfer function. .like This directly propels the light to This allows skipping empty regions. S607: Woodcock free path sampling; like In the current segment Internal basis Sampling candidate free path. If the candidate sample is not in... If the previous value is accepted, then t will be updated to... If a candidate sample is accepted, scalar values and optical properties are calculated at the candidate location, and color and opacity are accumulated.
[0083] S608: Accumulation and Termination. When the accumulated opacity of the light reaches a preset threshold, or t exceeds... If the light processing fails, terminate the light processing. Otherwise, continue repeating the positioning, interpolation, and sampling process from the new t position.
[0084] S609: Transfer function update. When the user modifies the transfer function, it is not necessary to rebuild the brick tree structure shown in Figure 4, nor is it necessary to regenerate the compact encoding shown in Figure 5. It is only necessary to recalculate the corresponding principal maximum value or lookup table based on the value_range of each brick to continue drawing.
[0085] The key parameters of this invention can be set as follows: AMR refinement ratio: preferably 2:1, but can also be extended to a fixed ratio of 4:1 for AMR data.
[0086] Adjacent level difference: Preferably, the refinement level difference between adjacent cells does not exceed 1, so as to achieve cross-level interface C0 continuity through shared vertices and dangling vertex interpolation.
[0087] Integer quantization unit: The finest cell width s_d is preferred, so that the integer side length of the finest cell is 1.
[0088] Global integer bounding box side length: preferably a power of 2, m=2^ceil(〖log〗_2 q_max).
[0089] Brick partitioning granularity: Take the integer side length g of the coarsest level cell in the current brick, which is adaptively determined by the data.
[0090] Bitmap word width: preferably 64 bits, to enable the use of GPU or CPU hardware popcount instructions; 32-bit word width can also be used as an alternative implementation.
[0091] Scalar value type: 32-bit floating-point numbers are preferred; in visualization tasks that allow for approximation, 16-bit floating-point numbers or quantized integers can also be used for further compression.
[0092] Scalar value range: Each brick stores at least one minimum scalar value and one maximum scalar value for calculation of the principal maximum after the transfer function changes and for space skipping.
[0093] Test Case 1: Cross-Level Boundary Complexity Test AMR datasets with different cross-level boundary complexities were selected, and the total number of cells, the number of cross-level boundary cells, and the boundary ratio were statistically analyzed. Boundary cells were defined as cells adjacent to cells at different refinement levels, excluding outer domain boundaries.
[0094] Test data may include: molecular cloud simulation AMR data; different time steps of deep-water impact simulation AMR data; and Exajet AMR data of aircraft external flow fields.
[0095] Test metrics include number of bricks, maximum access depth, average access depth, memory usage, and drawing time.
[0096] The expected results are: data with a high proportion of cross-level boundaries will produce more mixed-level bricks, but the brick tree access depth will remain within a small constant range; there will be no visible discontinuity artifacts at the cross-level interface.
[0097] Test Case 2: GPU Memory Usage Test The proposed method, the ExaBricks-based method, and the ExaStitch-based method were tested under the same GPU environment. The test data included hundreds of millions of AMR cells.
[0098] The testing steps are as follows: 1. Record the GPU memory baseline before program startup; 2. Construct the vertex center field, brick tree, and GPU compact encoding of this invention; 3. Load the encoding results onto the GPU; 4. Perform direct volume drawing; 5. Record stable drawing memory and peak drawing memory; 6. Repeat the test multiple times for each dataset and take the average value.
[0099] The expected result is that the method of the present invention does not construct a hardware BVH, does not store explicit splicing units, and uses bitmaps to replace ordinary leaf cell IDs and node pointers, thus its memory usage is lower than that of the BVH method.
[0100] Test Case 3: Rendering Performance and Image Quality Test Perform direct volume rendering on the same AMR data under the same camera parameters, transfer function, lighting parameters, image resolution, and sampling settings.
[0101] Test metrics include: time to render per frame; frames per second; image error metrics, such as Nvidia FLIP; presence of coarse-fine boundary cracks; and response time after the transfer function is modified.
[0102] The expected results are: the method of the present invention can reduce video memory usage while maintaining rendering speed and visual fidelity comparable to existing AMR GPU volume rendering methods; when the transfer function changes, there is no need to rebuild the brick tree, only to update the principal maximum related data to continue rendering.
[0103] Test Case 4: Exajet Application Testing of Aircraft External Flow Field Input the aircraft external flow field AMR data. This data contains multi-level adaptive meshes, with refined meshes near the fuselage, wings, engine wake, or high gradient regions of the flow field, while the interior regions of the aircraft are empty regions.
[0104] The testing steps are as follows: Extract leaf cells, refinement level, and scalar values from the raw AMR data; perform vertex center field reconstruction; construct a shallow brick tree; generate M_c, M_e, prefix, BrickArray, and ValueArray; perform path-tracing volume scattering or direct volume rendering in the CUDA renderer; and calculate memory usage, frame time, and access depth.
[0105] The expected results are as follows: the method of this invention can process hundreds of millions of AMR cell data on consumer-grade GPUs; the brick tree access depth is significantly smaller than the traditional BVH access depth; there are no obvious cracks at the coarse-fine level boundaries on the aircraft surface, near the wings, and in the wake region, and the volume rendering results can reflect the overall flow field structure.
[0106] Example 2 This embodiment provides an indexing and volume rendering system for adaptive mesh refinement data, including: The simulation data acquisition module is used to acquire the AMR simulation data to be plotted. The data reconstruction module is used to preprocess the AMR simulation data to be drawn, reconstruct the cell center field into the vertex center field, and ensure the C0 continuity of the scalar field through two-element interpolation at the coarse-fine interface. The coordinate mapping module is used to map AMR cells to a unified integer coordinate space based on the reconstructed vertex center field; The brick tree construction module is used to construct shallow brick trees based on AMR cells mapped to a unified integer coordinate space; each internal node of the brick tree corresponds to a local regular grid, and the child nodes of the same parent node have equal spatial ranges. The compact coding module is used for GPU-friendly compact coding of brick trees, which uses bitmaps instead of explicit node indices and cell IDs, and stores bricks and scalar values in GPU memory as linear arrays; The rendering module is used for time-dependent cell localization in the brick tree on the GPU using integer arithmetic and to perform direct volume rendering with spatial skipping and free path sampling of mixed granularity segments.
[0107] It should be noted that the specific implementation of the index construction and volume rendering system for adaptive mesh refinement data in this embodiment of the invention is similar to the specific implementation of the index construction and volume rendering method for adaptive mesh refinement data in this embodiment of the invention. For details, please refer to the description in the method section. To reduce redundancy, it will not be repeated here.
[0108] Example 3 This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the index construction and volume rendering method for adaptive mesh refinement data as described above.
[0109] Example 4 This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the index construction and volume rendering method for adaptive mesh refinement data as described above.
[0110] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0111] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0112] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0113] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0114] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0115] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for index construction and volume rendering of adaptive mesh refinement data, characterized in that, Includes the following steps: Obtain the AMR simulation data to be plotted; The AMR simulation data to be drawn is preprocessed to reconstruct the cell center field into the vertex center field, and the C0 continuity of the scalar field is ensured by two-element interpolation at the coarse-fine interface. Based on the reconstructed vertex center field, AMR cells are mapped to a unified integer coordinate space; A shallow brick tree is constructed based on AMR cells mapped to a unified integer coordinate space; each internal node of the brick tree corresponds to a local regular grid, and the child nodes of the same parent node have equal spatial range. The brick tree is encoded in a GPU-friendly, compact manner, using bitmaps instead of explicit node indices and cell IDs, and storing bricks and scalar values in GPU memory as linear arrays; On the GPU, time-dependent cell localization is performed in the brick tree using integer arithmetic, and direct volume rendering is performed with spatial skipping and free path sampling of mixed granularity segments.
2. The index construction and volume rendering method for adaptive mesh refinement data as described in claim 1, characterized in that, The acquired AMR simulation data to be plotted is stored in the form of cell centers, represented as a cell set. Each cell At least the central location of the cell Space Enclosing Box Detailed levels Cell size and cell center scalar values Information on the cell's location within its AMR block, tree node, or hierarchical structure.
3. The index construction and volume rendering method for adaptive mesh refinement data as described in claim 1, characterized in that, Reconstructing the cell center field into a vertex center field specifically includes: For each AMR cell, the corresponding corner coordinates are generated based on its spatial bounding box and refinement level, and a vertex mapping table is established using the corner coordinates as the key. Traverse adjacent cell pairs; if two adjacent cells have different refinement levels, mark their common boundary as a coarse-fine interface. On the coarse-fine interface, if a vertex appears in both the corner point set of the coarse-level cell and the fine-level cell, it is called a shared vertex; if a vertex appears only on the boundary of the fine-level cell but is located inside the edge or face of the coarse-level cell, it is called a dangling vertex. For a shared vertex, a local dual unit centered on the shared vertex is constructed, and the scalar value of the center of the neighboring cell is interpolated to obtain the scalar value of the shared vertex. For a suspended vertex, the scalar value of the suspended vertex is obtained by interpolation of the scalar values of adjacent shared vertices based on its geometric position on the thick-thin interface. Write the scalar values of ordinary vertices, shared vertices, and dangling vertices into the vertex center field.
4. The index construction and volume rendering method for adaptive mesh refinement data as described in claim 1, characterized in that, The process of mapping AMR cells to a unified integer coordinate space based on the reconstructed vertex center field includes: Traverse all AMR cells to determine the global spatial extent. and ; The finest cell width in three dimensions is statistically analyzed. ,by As the basic unit of quantization in integer coordinate space, the quantization length of each dimension is calculated. This aligns the integer space boundary to powers of 2, mapping any floating-point position x to integer coordinates. ,in, Let x be the component coordinate of the floating-point coordinate in dimension d. Let d be the minimum coordinates in the global space. The bounding box side length is a global integer.
5. The index construction and volume rendering method for adaptive mesh refinement data as described in claim 1, characterized in that, The construction of a shallow brick tree based on AMR cells mapped to a unified integer coordinate space includes: Initialize the root node to create a root node covering the entire integer space range of AMR cells; For the current node, if it does not contain any cells, it is marked as an empty leaf; if it contains only one AMR cell, it is marked as a normal cell leaf; if it contains multiple cells, it is marked as a brick node, and the partitioning continues. During partitioning, the refinement level of all cells is counted, and the integer side length of the coarsest level cell in the node is taken as the local partitioning granularity. Enumerate candidate partition schemes. For a candidate partition scheme P, calculate the number of local branches k for each candidate scheme by combining the partition dimension, local partition granularity, and the number of sub-intervals on that dimension. For candidate schemes, calculate the heuristic CVH of the cell variance of the generated k child nodes; The scheme is selected based on CVH, the number of child nodes k, the number of bricks, and the continuity of the region; According to the selected partitioning scheme, the current brick is evenly divided into a set number of subspaces of equal size. The cells are assigned to the corresponding child nodes according to the integer coordinates of the cells. The above process is recursively executed for each child node until all nodes are leaf nodes. After the construction is completed, the brick tree node set B is output.
6. The index construction and volume rendering method for adaptive mesh refinement data as described in claim 1, characterized in that, The GPU-friendly compact encoding of the brick tree and vertex center field specifically includes: Number the bricks using a breadth-first search method, and store at least one sub-brick lookup bitmap for each brick. And empty leaf mask bitmap , In this topological encoding, one bit corresponds to one child node, which is used to distinguish whether the child node is a child tile or not a child tile. In this context, one bit corresponds to one child node, used to mark whether the child node is an empty leaf node; Each brick also stores the offset of the first sub-brick, the value offset, the value range, and the bounding box metadata; the scalar value array is stored linearly in vertex order, and the indices of other vertices are obtained in real time through integer operations on the regular grid; sub-brick lookup is completed in constant time through hardware-supported rank operations.
7. The index construction and volume rendering method for adaptive mesh refinement data as described in claim 1, characterized in that, The method of performing time-dependent cell localization in a brick tree on the GPU using integer arithmetic and executing direct volume rendering with mixed granularity segments spatial skipping and free path sampling includes: Current light position Mapping integer coordinates Starting from the root brick, according to Calculate the child node index of the current layer based on the relationship between the current brick's integer bounding box and the partition granularity; When a non-empty cell is located, the vertex values of its eight corner points are taken according to the cell's position in the local regular grid of the parent brick, and trilinear interpolation is performed based on the relative position of the sampling point in the cell to obtain the scalar value. A sampling strategy that combines brick-like and cellular segments was employed to determine the type of mixed particle size, and the segment exit distance for different particle size types was calculated. ; Calculate the principal maxima for different particle sizes, and combine the principal maxima with a set threshold to determine whether to propel the light beam to the desired depth. ; When the cumulative opacity of the light reaches a preset threshold or exceeds the distance away, the processing of that light is terminated; otherwise, the positioning, interpolation, and sampling process is repeated from the new t position until the drawing is completed.
8. An indexing and volume rendering system for adaptive mesh refinement data, characterized in that, include: The simulation data acquisition module is used to acquire the AMR simulation data to be plotted. The data reconstruction module is used to preprocess the AMR simulation data to be drawn, reconstruct the cell center field into the vertex center field, and ensure the C0 continuity of the scalar field through two-element interpolation at the coarse-fine interface. The coordinate mapping module is used to map AMR cells to a unified integer coordinate space based on the reconstructed vertex center field; The brick tree construction module is used to construct shallow brick trees based on AMR cells mapped to a unified integer coordinate space; each internal node of the brick tree corresponds to a local regular grid, and the child nodes of the same parent node have equal spatial ranges. The compact coding module is used for GPU-friendly compact coding of brick trees, which uses bitmaps instead of explicit node indices and cell IDs, and stores bricks and scalar values in GPU memory as linear arrays; The rendering module is used for time-dependent cell localization in the brick tree on the GPU using integer arithmetic and to perform direct volume rendering with spatial skipping and free path sampling of mixed granularity segments.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the index construction and volume rendering method for adaptive mesh refinement data as described in any one of claims 1-7.
10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the index construction and volume rendering method for adaptive mesh refinement data as described in any one of claims 1-7.