The linear-edge cell types supported in VTK and ParaView are used all the time and have seen extensive use. While many people are aware of the higher-order cell types available in VTK, they certainly see much less use and testing. The newly added vtkCellTypeSource aims to improve on this by providing a simple mechanism to generate a wide variety of unstructured grid cells. Currently, it can generate linear and quadratic versions of lines, triangles, quadrilaterals, tetrahedra, hexahedra, wedges or pyramids as well as a cubic line. The design of the source is meant to encourage other unstructured grid cell types to be supported in the near future as well. The source can produce pieces of data (i.e. partitions appropriate for parallel processing pipelines) and has proper connectivity (i.e. water-tight). To ensure that the source works properly, a test (vtkFiltersSourcesCxx-TestCellTypeSource) was added to VTK that verifies that the proper number of points and cells are generated for each available cell type and that the sizes of the generated cells are correct. The test already showed incorrect functionality in the Triangulate() method for the quadratic hexahedra, quadratic pyramid and quadratic wedge.
In ParaView, this source is called the Unstructured Cell Types source and will be in the upcoming ParaView 5.4 release. While the generated data set will still have straight-edged cells even for the non-linear cells, the Calculator filter can be used to modify the data set’s geometry. In the image below I generate 16 quadratic wedges with the Unstructured Cell Types source and then use the Calculator filter with “coordsX*iHat+(coordsY+coordsX*coordsX*.2)*jHat+coordsZ*kHat” as the expression and check the Coordinate Results option. To better show the curvature of the quadratic wedges, I also set the Nonlinear Subdivision Level to 4.
Comparing this data set to what I would get if I had the Unstructured Cell Type source generate linear wedges instead is shown in the next image. Here, the blue edges are the edges of the linear wedges and the maroon edges are the edges of the quadratic wedges.
This addition to VTK and ParaView was funded by Sandia National Laboratories.
Sandia National Laboratories is a multimission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC., a wholly owned subsidiary of Honeywell International, Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525.