Skip to content

Adding vtkExplicitStructuredGrid and related filters

This MR exposes a new VTK data type vtkExplicitStructuredGrid and related filters to ParaView:

  • A new filter UnstructuredGrid To ExplicitStructuredGrid exposing vtkUnstructuredGridToExplicitStructuredGrid for converting to the new type
  • A new filter ExplicitStructuredGrid To UnstructuredGrid exposing vtkExplicitStructuredGridToUnstructuredGrid for converting from the new type
  • A new filter ImageData To ExplicitStructuredGrid exposing vtkImageDataToExplicitStructuredGrid for converting to the new type
  • A new filter ExplicitStructuredGrid Crop exposing vtkExplicitStructuredGridCrop for efficient extraction of volumes of interest
  • A new filter ExplicitStructuredGridPythonExtractor exposing vtkExplicitStructuredGridPythonExtractor for extracting i-j-k slices
  • A new source Explicit Structured Grid Generator Source exposing vtkExplicitStructuredGridGeneratorSource for generating reservoir grids
  • A few tests for these filters
 /* vtkExplicitStructuredGrid is a data object that is a concrete implementation
 * of vtkDataSet. vtkExplicitStructuredGrid represents a geometric structure
 * that is a topologically regular array of hexahedron. The topology is that of
 * a cube that has been subdivided into a regular array of smaller cubes.
 * Each cell can be addressed with i-j-k indices, however neighbor hexahedrons
 * does not necessarily share a face and hexahedron can be blanked (turned-off).
 *
 * Like unstructured grid, vtkExplicitStructuredGrid has explicit point coordinates
 * and cell to point indexing.
 * Unlike unstructured grid, vtkExplicitStructuredGrid does not keep a cell type
 * list as all cells are known to be hexahedra.
 * vtkExplicitStructuredGrid can take advantage of its layout to perform operations
 * based on the i, j, k parameters, similar to structured grid. This makes some
 * operations faster on this class, without loosing the flexibility of the
 * cell -> points mapping.
 * The most common use of this class would be in situations where you have all
 * hexahedra but the points used by the cells are not exactly defined by the
 * i, j, k parameters. One example of this is a structured grid with a half voxel
 * shift occurring in the middle of it such as with a geologic fault.
 *
 * The order and number of points is arbitrary.
 * The order and number of cells must match that specified by the dimensions
 * of the grid minus 1, because in vtk structured datasets the dimensions
 * correspond to the points.
 * The cells order increases in i fastest (from 0 <= i <= dims[0] - 2),
 * then j (0 <= j <= dims[1] - 2), then k ( 0 <= k <= dims[2] - 2) where dims[]
 * are the dimensions of the grid in the i-j-k topological directions.
 * The number of cells is (dims[0] - 1) * (dims[1] - 1) * (dims[2] - 1).
 */
Edited by Max Zeyen

Merge request reports