vtkCellArray: Support offsets/connectivity as vtkDataArray | vtkUnstructuredGrid: Support CellTypes as vtkDataArray

I think that Polyhedral cells: storing faces as vtkCellArray which first discussed this change, should answer all your questions.

But a high level answer is this:

The vtkCellArray Faces includes:

  1. Connectivity: which defines the point ids of each global face in the mesh (like before duplicates are allowed, so that ieach polyhedron has correct face point orientation)
  2. Offsets: which define the offsets for each face in the connectivity so that we can get them with O(1) and also know how many points each face has rather than storing before the actual point ids.

The vtkCellArray FaceLocations includes:

  1. Connectivity: the global face ids of each cell (polyhedron)
  2. Offests: which define the offests to the global face ids of each cell. If the offset of one cell is the same as its next one, it means that it basically had 0 explicitly defined faces, which should be the case for all non-polyhedral cells.