This is the fourth part of a series of blog articles about vtkHyperTreeGrid usage and implementation in VTK. The first part, an introduction about HTG, can be found here, the second part, HTG data construction, can be found here, the third part, HTG: Using Masks, can be found here.

In this part, we will focus on different specific filters that can be applied on HTG.

We have chosen the following filters:

  • vtkHyperTreeGridDepthLimiter, that accelerates exploration by limiting depth.
  • vtkHyperTreeGridEvaluateCoarse, that controls the initialization of values of coarse cells.
  • vtkHyperTreeGridThreshold, that select cells by scalar value within given range.

vtkHyperTreeGridDepthLimiter Filter

This filter extracts all levels down to a specified depth from a HyperTreeGrid dataset. If the required depth is greater or equal to the maximum level of the input grid, then the output is identical. The output remains a HTG.

The Depth parameter describes the maximum level of the input grid.

By default, the filter just creates a new mask on the input mesh. The memory cost is then one bit per cell (coarse and fine).

However, it is still possible to produce a new hyper tree grid mesh output by positioning the JustCreateNewMask parameter with a memory cost that is generally much higher.

The values with coarse cells are then revealed in rendering. It is therefore essential that these values have a meaning that can be given by the source / reader or modified by the vtkHyperTreeGridEvaluateCoarse filter (usualy applied before vtkHyperTreeGridDepthLimiter).

vtkHyperTreeGridEvaluateCoarse Filter

Use this filter to change the value of the parent cell from an operation applied to the values of the child cells. The output remains a hyper tree grid.

The Operator parameter is used to set the operator to be applied which is set by default to OPERATOR_DON_T_CHANGE. The other predefined operators are :

  • OPERATOR_DON_T_CHANGE_FAST: Operator does not change coarse value (default), just shallow copy
  • OPERATOR_DON_T_CHANGE: Operator does not change coarse value but iterates over all cells, just shallow copy
  • OPERATOR_MIN: The littlest value of the unmasked child cells, this helps to highlight the cold spots.
  • OPERATOR_MAX: The biggest value of the unmasked child cells, this helps to highlight hot spots.
  • OPERATOR_SUM: The sum of the values of the unmasked child cells, interesting for summable value fields. If the cell is masked, the value is set to 0..
  • OPERATOR_AVERAGE: The average of the values of the child cells. If the cell is masked a value is put at “default value” (default value = 0 if not set by SetDefault).
  • OPERATOR_UNMASKED_AVERAGE: The average of the values of the unmasked child cells
  • OPERATOR_ELDER_CHILD: Operator puts the value of the first child (elder child)
  • OPERATOR_SPLATTING_AVERAGE: The splatting average of the values of the child cells. If the cell is masked a value is put at “default value” (default value = 0 if not set by SetDefault). The calculation of the average should normally be done by dividing by the number of children (GetNumberOfChildren) which is worth f^d where f, refinement factor and d, number of spatial dimension. In the calculation of the mean for splatting, the division involves f^(d-1). In 3D, if a mesh is refined into 8 child cells each having a value set to 0.5, all these children produce 4 splats of value 1. In fact, the value of the expected splat at the coarse cell (parent) is 1. But a standard average will give 0.5 (value / f^d). This is why the calculation of the average for splatting is different (value / f^(d-1)).

The memory cost is that of copying the active value field.

It is necessary to be aware that the filters exploit the value of the coarse cell to achieve accelerations which can alter the result.

vtkHyperTreeGridThreshold Filter

Use this filter to extract cells from a HTG where selected scalar values are within a given range.

This filter extracts cells from a hyper tree grid that satisfies the following threshold: a cell is considered to be within range if its value for the active scalar is within a specified range (inclusive) by LowerThreshold and UpperThreshold parameters. The output remains a hyper tree grid.

By default, the filter just creates a new mask on the input mesh. The memory cost is then one bit per cell (coarse and fine).

However, it is still possible to produce a new HTG mesh output by positioning the JustCreateNewMask parameter with a memory cost that is generally much higher.

Highly Efficient Controlled Hierarchical Data Reduction techniques

In order to optimize the execution time of your exploration, after making sure you have
the right values to the coarse cells (vtkHyperTreeGridEvaluateCoarse), we advise you to
start your exploration using the filter to limit the depth (vtkHyperTreeGridDepthLimiter)
before applying your filter of interest (by example, vtkHyperTreeGridThreshold).

The result of a threshold limiting water splashes from a simulated asteroid fall [YA31], a saved 3D simulation time of 300 million cells, to which a depth limitation filter varying from 0 to 3 (here from left to right) is applied upstream. Up to level 2, the result is obtained quickly while at level 6 it takes a rendering time x200 higher! In addition, beyond level 3 (rendering time x4), the result of the rendering varies very little. Here, the value assigned to the coarse cell is the OPERATOR_UNMASKED_AVERAGE at the time of database creation.

[YA31] PATCHETT J. M., ROSS G.: Deep water impact ensemble data set. URL: https://sciviscontest2018.org/wp-content/uploads/sites/19/2017/09/DeepWaterImpactEnsembleDataSet_Revision1.pdf

Apart from providing a crude result quickly, another advantage of this progressive approach is to control memory consumption. The hyper tree grid representation is so compact that the slightest extraction into another (usually unstructured grid) representation can use the memory exponentially.

Feedback was described at SciVis 2018 and EUROVIS 2019.

Interactive Visualization and Analysis of High Resolution HPC Simulation Data on a Laptop With VTK, Jérôme Dubois, Guénolé Harel, Jacques-Bernard Lekien, SciVis 2018: 127-141 and poster

Highly Efficient Controlled Hierarchical Data Reduction techniques for Interactive Visualization of Massive Simulation Data, Jérôme Dubois and Jacques-Bernard Lekien, EUROVIS (Short papers) 2019: 37-41 https://diglib.eg.org/bitstream/handle/10.2312/evs20191167/037-041.pdf

CEA, DAM, DIF, F-91297 Arpajon, France

Leave a Reply

X