Skip to content

Add vtkCellGrid (subclass of vtkDataObject) to VTK.

David Thompson requested to merge dcthomp/vtk:cell-grid into master

This commit adds a new subclass of vtkDataObject that exposes cells in a more flexible way that vtkDataSet. In support of this new data object, there are other related classes added:

  • vtkCellMetadata – a base class for cells of any type that are defined by arrays from a vtkCellGrid.
  • vtkCellAttribute – specifies a function defined over the domain of a vtkCellGrid which may use zero or more arrays held by the grid.
  • vtkCellGridQuery – a base class for queries/operations on cells held in a vtkCellGrid.
  • vtkCellGridBoundsQuery – A query to compute extents of all cells of all types in a vtkCellGrid. A responder for discontinuous Galerkin cells is provided.
  • vtkCellGridSidesQuery – A query to compute external sides (i.e., external faces of volumetric cells; external edges of surface cells) of cells in a vtkCellGrid. A responder for discontinuous Galerkin cells is provided.
  • vtkOpenGLCellGridRenderRequest – A query to render external faces of a vtkCellGrid to an OpenGL renderer. A responder for discontinuous Galerkin hexahedra is provided.

Also in this commit:

  • Add a facility for constexpr string hashing (vtkStringToken). This is used by vtkCellGrid and associated classes when looking up collections of arrays. Given that the "name" of array collections can be hashed at compile time and kept in STL containers with fast key comparisons, it is better than holding strings for the same purpose.
  • Add vtkTypename.h that provides compile-time introspection of the name of a VTK class. Since vtkObject::GetClassName() is a virtual method, this facility is useful for fetching the name of a class given its type at compile time (see vtk::TypeName<T>()).
  • Add a templated functor in Common/Core/vtkInheritance.h to enumerate class inheritance at compile time (by traversing type-aliases that vtkTypeMacro() defines).
Edited by David Thompson

Merge request reports