diff --git a/Common/DataModel/vtkBiQuadraticQuadraticHexahedron.cxx b/Common/DataModel/vtkBiQuadraticQuadraticHexahedron.cxx
index 99160e5b1d3962ccc86a903b5fba66b332846515..734fc0096eff2431d0b1783efcb7899d7be351cc 100644
--- a/Common/DataModel/vtkBiQuadraticQuadraticHexahedron.cxx
+++ b/Common/DataModel/vtkBiQuadraticQuadraticHexahedron.cxx
@@ -87,7 +87,7 @@ static int LinearHexs[8][8] = {
   { 26, 21, 18, 23, 25, 13, 6, 14 },
 };
 
-static int HexFaces[6][9] = {
+static constexpr vtkIdType HexFaces[6][9] = {
   { 0, 4, 7, 3, 16, 15, 19, 11, 20 }, // BiQuadQuad
   { 1, 2, 6, 5, 9, 18, 13, 17, 21 },  // BiQuadQuad
   { 0, 1, 5, 4, 8, 17, 12, 16, 22 },  // BiQuadQuad
@@ -96,7 +96,7 @@ static int HexFaces[6][9] = {
   { 4, 5, 6, 7, 12, 13, 14, 15, 0 },  // QuadQuad
 };
 
-static int HexEdges[12][3] = {
+static constexpr vtkIdType HexEdges[12][3] = {
   { 0, 1, 8 },
   { 1, 2, 9 },
   { 3, 2, 10 },
@@ -114,12 +114,12 @@ static int HexEdges[12][3] = {
 static double MidPoints[3][3] = { { 0.5, 0.5, 0.0 }, { 0.5, 0.5, 1.0 }, { 0.5, 0.5, 0.5 } };
 
 //----------------------------------------------------------------------------
-int* vtkBiQuadraticQuadraticHexahedron::GetEdgeArray(int edgeId)
+const vtkIdType* vtkBiQuadraticQuadraticHexahedron::GetEdgeArray(int edgeId)
 {
   return HexEdges[edgeId];
 }
 //----------------------------------------------------------------------------
-int* vtkBiQuadraticQuadraticHexahedron::GetFaceArray(int faceId)
+const vtkIdType* vtkBiQuadraticQuadraticHexahedron::GetFaceArray(int faceId)
 {
   return HexFaces[faceId];
 }
diff --git a/Common/DataModel/vtkBiQuadraticQuadraticHexahedron.h b/Common/DataModel/vtkBiQuadraticQuadraticHexahedron.h
index ec9a5f7214eadc6027b0c6bb7fd5dff025ae4fc7..f21d38b4f4915c0e4a2e76c3ab1fa7fc868ac3e3 100644
--- a/Common/DataModel/vtkBiQuadraticQuadraticHexahedron.h
+++ b/Common/DataModel/vtkBiQuadraticQuadraticHexahedron.h
@@ -152,8 +152,8 @@ public:
    * Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
    * Ids are related to the cell, not to the dataset.
    */
-  static int* GetEdgeArray(int edgeId);
-  static int* GetFaceArray(int faceId);
+  static const vtkIdType* GetEdgeArray(int edgeId);
+  static const vtkIdType* GetFaceArray(int faceId);
   //@}
 
   /**
diff --git a/Common/DataModel/vtkBiQuadraticQuadraticWedge.cxx b/Common/DataModel/vtkBiQuadraticQuadraticWedge.cxx
index aa24b53b803cb9e4a45371b766e72192f9f6e582..eecf542bc4117df830a18f0e37f6d6219bfe3f66 100644
--- a/Common/DataModel/vtkBiQuadraticQuadraticWedge.cxx
+++ b/Common/DataModel/vtkBiQuadraticQuadraticWedge.cxx
@@ -77,7 +77,7 @@ static int LinearWedges[8][6] = {
 };
 
 // We use 2 quadratic triangles and 3 quadratic-linear quads
-static int WedgeFaces[5][9] = {
+static constexpr vtkIdType WedgeFaces[5][9] = {
   { 0, 1, 2, 6, 7, 8, 0, 0, 0 },     // first quad triangle
   { 3, 5, 4, 11, 10, 9, 0, 0, 0 },   // second quad triangle
   { 0, 3, 4, 1, 12, 9, 13, 6, 15 },  // 1. biquad quad
@@ -86,7 +86,7 @@ static int WedgeFaces[5][9] = {
 };
 
 // We have 9 quadratic edges
-static int WedgeEdges[9][3] = {
+static constexpr vtkIdType WedgeEdges[9][3] = {
   { 0, 1, 6 },
   { 1, 2, 7 },
   { 2, 0, 8 },
@@ -98,12 +98,12 @@ static int WedgeEdges[9][3] = {
   { 2, 5, 14 },
 };
 //----------------------------------------------------------------------------
-int* vtkBiQuadraticQuadraticWedge::GetEdgeArray(int edgeId)
+const vtkIdType* vtkBiQuadraticQuadraticWedge::GetEdgeArray(int edgeId)
 {
   return WedgeEdges[edgeId];
 }
 //----------------------------------------------------------------------------
-int* vtkBiQuadraticQuadraticWedge::GetFaceArray(int faceId)
+const vtkIdType* vtkBiQuadraticQuadraticWedge::GetFaceArray(int faceId)
 {
   return WedgeFaces[faceId];
 }
diff --git a/Common/DataModel/vtkBiQuadraticQuadraticWedge.h b/Common/DataModel/vtkBiQuadraticQuadraticWedge.h
index 0a5e30a01ed655589820581e696699bf13054f06..0bc8a0afd3724a359f024058f21c8ade216927d8 100644
--- a/Common/DataModel/vtkBiQuadraticQuadraticWedge.h
+++ b/Common/DataModel/vtkBiQuadraticQuadraticWedge.h
@@ -130,8 +130,8 @@ public:
    * Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
    * Ids are related to the cell, not to the dataset.
    */
-  static int* GetEdgeArray(int edgeId);
-  static int* GetFaceArray(int faceId);
+  static const vtkIdType* GetEdgeArray(int edgeId);
+  static const vtkIdType* GetFaceArray(int faceId);
   //@}
 
   /**
diff --git a/Common/DataModel/vtkCell3D.cxx b/Common/DataModel/vtkCell3D.cxx
index d339e03fd2fd248588c84711b77c7424d6776876..77b3745cf9ed4578137ac784274796a86d15fbba 100644
--- a/Common/DataModel/vtkCell3D.cxx
+++ b/Common/DataModel/vtkCell3D.cxx
@@ -54,7 +54,8 @@ void vtkCell3D::Contour(double value, vtkDataArray* cellScalars,
 {
   int numPts = this->GetNumberOfPoints();
   int numEdges = this->GetNumberOfEdges();
-  int *tets, v1, v2;
+  const vtkIdType* tets;
+  int v1, v2;
   int i, j;
   int type;
   vtkIdType id, ptId;
@@ -219,7 +220,8 @@ void vtkCell3D::Clip(double value, vtkDataArray* cellScalars, vtkIncrementalPoin
   vtkCell3D* cell3D = static_cast<vtkCell3D*>(this); // has to be in this method
   int numPts = this->GetNumberOfPoints();
   int numEdges = this->GetNumberOfEdges();
-  int *verts, v1, v2;
+  const vtkIdType* verts;
+  int v1, v2;
   int i, j;
   int type;
   vtkIdType id, ptId;
diff --git a/Common/DataModel/vtkCell3D.h b/Common/DataModel/vtkCell3D.h
index f2e88d4fee189361db8e91a86fbcc729b3115079..6f9cfde31861d517bbbbbf98b246f1964e8fb7cc 100644
--- a/Common/DataModel/vtkCell3D.h
+++ b/Common/DataModel/vtkCell3D.h
@@ -48,7 +48,7 @@ public:
    * the point ids of the mesh that the cell belongs to. The edgeId must
    * range between 0<=edgeId<this->GetNumberOfEdges().
    */
-  virtual void GetEdgePoints(int edgeId, int*& pts) = 0;
+  virtual void GetEdgePoints(int edgeId, const vtkIdType*& pts) = 0;
 
   /**
    * Get the list of vertices that define a face.  The list is terminated
@@ -57,7 +57,7 @@ public:
    * the cell belongs to. The faceId must range between
    * 0<=faceId<this->GetNumberOfFaces().
    */
-  virtual void GetFacePoints(int faceId, int*& pts) = 0;
+  virtual void GetFacePoints(int faceId, const vtkIdType*& pts) = 0;
 
   void Contour(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
     vtkCellArray* verts, vtkCellArray* lines, vtkCellArray* polys, vtkPointData* inPd,
diff --git a/Common/DataModel/vtkConvexPointSet.h b/Common/DataModel/vtkConvexPointSet.h
index 22ab411542ce2c8bb55fb696554c5cea5298f6a6..8fd854aa1945cd027efd142c896664f468371424 100644
--- a/Common/DataModel/vtkConvexPointSet.h
+++ b/Common/DataModel/vtkConvexPointSet.h
@@ -56,11 +56,11 @@ public:
    * See vtkCell3D API for description of these methods.
    * @warning These method are unimplemented in vtkPolyhedron
    */
-  void GetEdgePoints(int vtkNotUsed(edgeId), int*& vtkNotUsed(pts)) override
+  void GetEdgePoints(int vtkNotUsed(edgeId), const vtkIdType*& vtkNotUsed(pts)) override
   {
     vtkWarningMacro(<< "vtkConvexPointSet::GetEdgePoints Not Implemented");
   }
-  void GetFacePoints(int vtkNotUsed(faceId), int*& vtkNotUsed(pts)) override
+  void GetFacePoints(int vtkNotUsed(faceId), const vtkIdType*& vtkNotUsed(pts)) override
   {
     vtkWarningMacro(<< "vtkConvexPointSet::GetFacePoints Not Implemented");
   }
diff --git a/Common/DataModel/vtkGenericAdaptorCell.cxx b/Common/DataModel/vtkGenericAdaptorCell.cxx
index da3f35010a9ba80b64dd84551952269c1e674262..37c7890b3e66dcd5f2f97e94f1d4e446c6caa230 100644
--- a/Common/DataModel/vtkGenericAdaptorCell.cxx
+++ b/Common/DataModel/vtkGenericAdaptorCell.cxx
@@ -952,7 +952,7 @@ void vtkGenericAdaptorCell::TriangulateFace(vtkGenericAttributeCollection* attri
     int attribute_idx;
 
     this->InternalIds->Reset();
-    int* faceVerts = this->GetFaceArray(index);
+    const vtkIdType* faceVerts = this->GetFaceArray(index);
     int numVerts = this->GetNumberOfVerticesOnFace(index);
     double* locals = this->GetParametricCoords();
     double* local;
diff --git a/Common/DataModel/vtkGenericAdaptorCell.h b/Common/DataModel/vtkGenericAdaptorCell.h
index 7bd4b1a8d658052ff0137da3d95e6547d5724d34..1876c3800b733414c27120c9defda9e945b506cb 100644
--- a/Common/DataModel/vtkGenericAdaptorCell.h
+++ b/Common/DataModel/vtkGenericAdaptorCell.h
@@ -540,7 +540,7 @@ public:
    * \post result_exists: result!=0
    * \post valid_size: sizeof(result)>=GetNumberOfVerticesOnFace(faceId)
    */
-  virtual int* GetFaceArray(int faceId) = 0;
+  virtual const vtkIdType* GetFaceArray(int faceId) = 0;
 
   /**
    * Return the number of vertices defining face `faceId'.
@@ -558,7 +558,7 @@ public:
    * \post result_exists: result!=0
    * \post valid_size: sizeof(result)==2
    */
-  virtual int* GetEdgeArray(int edgeId) = 0;
+  virtual const vtkIdType* GetEdgeArray(int edgeId) = 0;
 
 protected:
   vtkGenericAdaptorCell();
diff --git a/Common/DataModel/vtkGraph.cxx b/Common/DataModel/vtkGraph.cxx
index f516cffb3b767bdd9a4ec3902adae34930ccd558..7f45b90f2d7eb9866da05879e0fa9bac7afb9771 100644
--- a/Common/DataModel/vtkGraph.cxx
+++ b/Common/DataModel/vtkGraph.cxx
@@ -1339,8 +1339,8 @@ void vtkGraph::AddEdgeInternal(
     return;
   }
 
-  vtkIdType edgeId = this->Internals->NumberOfEdges;
-  vtkIdType edgeIndex = edgeId;
+  int edgeId = this->Internals->NumberOfEdges;
+  int edgeIndex = edgeId;
   this->Internals->NumberOfEdges++;
   this->Internals->Adjacency[u].OutEdges.push_back(vtkOutEdgeType(v, edgeId));
   if (directed)
diff --git a/Common/DataModel/vtkHexagonalPrism.cxx b/Common/DataModel/vtkHexagonalPrism.cxx
index 4aa54161d72035437d4aaf03867267234a2c39f3..9ea6e9420c74d7b1e62f34d828508c474ab448a3 100644
--- a/Common/DataModel/vtkHexagonalPrism.cxx
+++ b/Common/DataModel/vtkHexagonalPrism.cxx
@@ -325,7 +325,7 @@ void vtkHexagonalPrism::EvaluateLocation(
   }
 }
 //----------------------------------------------------------------------------
-static int edges[18][2] = {
+static constexpr vtkIdType edges[18][2] = {
   { 0, 1 },
   { 1, 2 },
   { 2, 3 },
@@ -346,7 +346,7 @@ static int edges[18][2] = {
   { 5, 11 },
 };
 
-static int faces[8][7] = {
+static constexpr vtkIdType faces[8][7] = {
   { 0, 5, 4, 3, 2, 1, -1 },
   { 6, 7, 8, 9, 10, 11, -1 },
   { 0, 1, 7, 6, -1, -1, -1 },
@@ -411,7 +411,7 @@ int vtkHexagonalPrism::CellBoundary(int subId, const double pcoords[3], vtkIdLis
   {
     dot = 0;
   }
-  int* verts;
+  const vtkIdType* verts;
 
   if (pcoords[2] < 0.5)
   {
@@ -472,7 +472,7 @@ int vtkHexagonalPrism::CellBoundary(int subId, const double pcoords[3], vtkIdLis
   }
 }
 //----------------------------------------------------------------------------
-int* vtkHexagonalPrism::GetEdgeArray(int edgeId)
+const vtkIdType* vtkHexagonalPrism::GetEdgeArray(int edgeId)
 {
   return edges[edgeId];
 }
@@ -480,7 +480,7 @@ int* vtkHexagonalPrism::GetEdgeArray(int edgeId)
 //----------------------------------------------------------------------------
 vtkCell* vtkHexagonalPrism::GetEdge(int edgeId)
 {
-  int* verts;
+  const vtkIdType* verts;
 
   verts = edges[edgeId];
 
@@ -495,14 +495,14 @@ vtkCell* vtkHexagonalPrism::GetEdge(int edgeId)
   return this->Line;
 }
 //----------------------------------------------------------------------------
-int* vtkHexagonalPrism::GetFaceArray(int faceId)
+const vtkIdType* vtkHexagonalPrism::GetFaceArray(int faceId)
 {
   return faces[faceId];
 }
 //----------------------------------------------------------------------------
 vtkCell* vtkHexagonalPrism::GetFace(int faceId)
 {
-  int* verts;
+  const vtkIdType* verts;
 
   verts = faces[faceId];
 
@@ -732,13 +732,13 @@ void vtkHexagonalPrism::JacobianInverse(
 }
 
 //----------------------------------------------------------------------------
-void vtkHexagonalPrism::GetEdgePoints(int edgeId, int*& pts)
+void vtkHexagonalPrism::GetEdgePoints(int edgeId, const vtkIdType*& pts)
 {
   pts = this->GetEdgeArray(edgeId);
 }
 
 //----------------------------------------------------------------------------
-void vtkHexagonalPrism::GetFacePoints(int faceId, int*& pts)
+void vtkHexagonalPrism::GetFacePoints(int faceId, const vtkIdType*& pts)
 {
   pts = this->GetFaceArray(faceId);
 }
diff --git a/Common/DataModel/vtkHexagonalPrism.h b/Common/DataModel/vtkHexagonalPrism.h
index f7d27141eae8119d302520548795687d371e3744..9fbb8da7efd5fd081a574591f129c61762be8060 100644
--- a/Common/DataModel/vtkHexagonalPrism.h
+++ b/Common/DataModel/vtkHexagonalPrism.h
@@ -53,8 +53,8 @@ public:
   /**
    * See vtkCell3D API for description of these methods.
    */
-  void GetEdgePoints(int edgeId, int*& pts) override;
-  void GetFacePoints(int faceId, int*& pts) override;
+  void GetEdgePoints(int edgeId, const vtkIdType*& pts) override;
+  void GetFacePoints(int faceId, const vtkIdType*& pts) override;
   //@}
 
   //@{
@@ -113,8 +113,8 @@ public:
    * Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
    * Ids are related to the cell, not to the dataset.
    */
-  static int* GetEdgeArray(int edgeId);
-  static int* GetFaceArray(int faceId);
+  static const vtkIdType* GetEdgeArray(int edgeId);
+  static const vtkIdType* GetFaceArray(int faceId);
   //@}
 
   /**
diff --git a/Common/DataModel/vtkHexahedron.cxx b/Common/DataModel/vtkHexahedron.cxx
index bf070bcf8065e51a7aa8295f28c27bb25be15909..9ecd7f35f66be08d035dff79c295d4f6dbd29a24 100644
--- a/Common/DataModel/vtkHexahedron.cxx
+++ b/Common/DataModel/vtkHexahedron.cxx
@@ -363,7 +363,7 @@ int vtkHexahedron::CellBoundary(int vtkNotUsed(subId), const double pcoords[3],
 }
 
 //----------------------------------------------------------------------------
-static int edges[12][2] = {
+static constexpr vtkIdType edges[12][2] = {
   { 0, 1 },
   { 1, 2 },
   { 3, 2 },
@@ -377,7 +377,7 @@ static int edges[12][2] = {
   { 3, 7 },
   { 2, 6 },
 };
-static int faces[6][5] = {
+static constexpr vtkIdType faces[6][5] = {
   { 0, 4, 7, 3, -1 },
   { 1, 2, 6, 5, -1 },
   { 0, 1, 5, 4, -1 },
@@ -398,7 +398,8 @@ void vtkHexahedron::Contour(double value, vtkDataArray* cellScalars,
   static const int CASE_MASK[8] = { 1, 2, 4, 8, 16, 32, 64, 128 };
   vtkMarchingCubesTriangleCases* triCase;
   EDGE_LIST* edge;
-  int i, j, index, *vert;
+  int i, j, index;
+  const vtkIdType* vert;
   int v1, v2, newCellId;
   vtkIdType pts[3];
   double t, x1[3], x2[3], x[3], deltaScalar;
@@ -470,7 +471,7 @@ void vtkHexahedron::Contour(double value, vtkDataArray* cellScalars,
 }
 
 //----------------------------------------------------------------------------
-int* vtkHexahedron::GetEdgeArray(int edgeId)
+const vtkIdType* vtkHexahedron::GetEdgeArray(int edgeId)
 {
   return edges[edgeId];
 }
@@ -487,7 +488,7 @@ int* vtkHexahedron::GetTriangleCases(int caseId)
 //----------------------------------------------------------------------------
 vtkCell* vtkHexahedron::GetEdge(int edgeId)
 {
-  int* verts;
+  const vtkIdType* verts;
 
   verts = edges[edgeId];
 
@@ -503,7 +504,7 @@ vtkCell* vtkHexahedron::GetEdge(int edgeId)
 }
 
 //----------------------------------------------------------------------------
-int* vtkHexahedron::GetFaceArray(int faceId)
+const vtkIdType* vtkHexahedron::GetFaceArray(int faceId)
 {
   return faces[faceId];
 }
@@ -511,7 +512,8 @@ int* vtkHexahedron::GetFaceArray(int faceId)
 //----------------------------------------------------------------------------
 vtkCell* vtkHexahedron::GetFace(int faceId)
 {
-  int *verts, i;
+  const vtkIdType* verts;
+  int i;
 
   verts = faces[faceId];
 
@@ -797,13 +799,13 @@ void vtkHexahedron::JacobianInverse(const double pcoords[3], double** inverse, d
 }
 
 //----------------------------------------------------------------------------
-void vtkHexahedron::GetEdgePoints(int edgeId, int*& pts)
+void vtkHexahedron::GetEdgePoints(int edgeId, const vtkIdType*& pts)
 {
   pts = this->GetEdgeArray(edgeId);
 }
 
 //----------------------------------------------------------------------------
-void vtkHexahedron::GetFacePoints(int faceId, int*& pts)
+void vtkHexahedron::GetFacePoints(int faceId, const vtkIdType*& pts)
 {
   pts = this->GetFaceArray(faceId);
 }
diff --git a/Common/DataModel/vtkHexahedron.h b/Common/DataModel/vtkHexahedron.h
index 0e3b2bf2690fe50af218136d222379ccd0502cc9..152c94708f5ed6cee740351d413ca61a5384e563 100644
--- a/Common/DataModel/vtkHexahedron.h
+++ b/Common/DataModel/vtkHexahedron.h
@@ -49,8 +49,8 @@ public:
   /**
    * See vtkCell3D API for description of these methods.
    */
-  void GetEdgePoints(int edgeId, int*& pts) override;
-  void GetFacePoints(int faceId, int*& pts) override;
+  void GetEdgePoints(int edgeId, const vtkIdType*& pts) override;
+  void GetFacePoints(int faceId, const vtkIdType*& pts) override;
   //@}
 
   //@{
@@ -115,8 +115,8 @@ public:
    * Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
    * Ids are related to the cell, not to the dataset.
    */
-  static int* GetEdgeArray(int edgeId) VTK_SIZEHINT(2);
-  static int* GetFaceArray(int faceId) VTK_SIZEHINT(4);
+  static const vtkIdType* GetEdgeArray(int edgeId) VTK_SIZEHINT(2);
+  static const vtkIdType* GetFaceArray(int faceId) VTK_SIZEHINT(4);
   //@}
 
   /**
diff --git a/Common/DataModel/vtkKdTree.cxx b/Common/DataModel/vtkKdTree.cxx
index f57113ae8c7eec69326150c74d37ff339b7cb37b..e5b949947cb52b46999eac300ad4b42febab6a73 100644
--- a/Common/DataModel/vtkKdTree.cxx
+++ b/Common/DataModel/vtkKdTree.cxx
@@ -1467,7 +1467,7 @@ float vtkKdTree::FindMaxLeftHalf(int dim, float* c1, int K)
 }
 
 //----------------------------------------------------------------------------
-// Note: The indices (L, R, X) into the point array should be vtkIdTypes rather
+// Note: The indices (L, R, X) into the point array should be vtkIdType rather
 // than ints, but this change causes the k-d tree build time to double.
 // _Select is the heart of this build, called for every sub-interval that
 // is to be reordered.  We will leave these as ints now.
diff --git a/Common/DataModel/vtkLagrangeTetra.cxx b/Common/DataModel/vtkLagrangeTetra.cxx
index cdfd9e5d45b66197923b4099e00aa4fbb638e19c..bcad8b66748e4c1b8ae841692adb2ba36c1618cf 100644
--- a/Common/DataModel/vtkLagrangeTetra.cxx
+++ b/Common/DataModel/vtkLagrangeTetra.cxx
@@ -1233,7 +1233,7 @@ void vtkLagrangeTetra::BarycentricIndex(vtkIdType index, vtkIdType* bindex, vtkI
   else if (index - 4 < 6 * (order - 1))
   {
     // we are on an edge
-    vtkIdType edgeId = (index - 4) / (order - 1);
+    int edgeId = (index - 4) / (order - 1);
     vtkIdType vertexId = (index - 4) % (order - 1);
     for (vtkIdType coord = 0; coord < 4; coord++)
     {
@@ -1246,7 +1246,7 @@ void vtkLagrangeTetra::BarycentricIndex(vtkIdType index, vtkIdType* bindex, vtkI
   else
   {
     // we are on a face
-    vtkIdType faceId = (index - 4 - 6 * (order - 1)) / ((order - 2) * (order - 1) / 2);
+    int faceId = (index - 4 - 6 * (order - 1)) / ((order - 2) * (order - 1) / 2);
     vtkIdType vertexId = (index - 4 - 6 * (order - 1)) % ((order - 2) * (order - 1) / 2);
 
     vtkIdType projectedBIndex[3];
@@ -1300,7 +1300,7 @@ vtkIdType vtkLagrangeTetra::Index(const vtkIdType* bindex, vtkIdType order)
     index++;
   }
 
-  for (vtkIdType edge = 0; edge < 6; edge++)
+  for (int edge = 0; edge < 6; edge++)
   {
     if (bindex[EdgeMinCoords[edge][0]] == min && bindex[EdgeMinCoords[edge][1]] == min)
     {
@@ -1310,7 +1310,7 @@ vtkIdType vtkLagrangeTetra::Index(const vtkIdType* bindex, vtkIdType order)
     index += max - (min + 1);
   }
 
-  for (vtkIdType face = 0; face < 4; face++)
+  for (int face = 0; face < 4; face++)
   {
     if (bindex[FaceMinCoord[face]] == min)
     {
diff --git a/Common/DataModel/vtkLagrangeTriangle.cxx b/Common/DataModel/vtkLagrangeTriangle.cxx
index 69eb455ffb8625ded06f1ab0938b8f2c31b6f420..daa180e6d43b9a37a6d7aeb48034d9351e59608c 100644
--- a/Common/DataModel/vtkLagrangeTriangle.cxx
+++ b/Common/DataModel/vtkLagrangeTriangle.cxx
@@ -78,7 +78,7 @@ vtkCell* vtkLagrangeTriangle::GetEdge(int edgeId)
     // point, and then the remaining points in sequence. This loop iterates over
     // the edge in sequence starting with the first point. The following value
     // maps from this iteration loop to the edge's ordering.
-    vtkIdType edgeIndex = (i == 0 ? 0 : (i == order ? 1 : i + 1));
+    int edgeIndex = (i == 0 ? 0 : (i == order ? 1 : i + 1));
 
     this->Edge->GetPointIds()->InsertId(edgeIndex, this->PointIds->GetId(triangleIndex));
     this->Edge->GetPoints()->InsertPoint(edgeIndex, this->Points->GetPoint(triangleIndex));
diff --git a/Common/DataModel/vtkMappedUnstructuredGrid.h b/Common/DataModel/vtkMappedUnstructuredGrid.h
index 959458295d80e71eb68d6fef1fac5e12edf0dc97..5c8a2c855ef0717c97550a308d35364f9aeb923b 100644
--- a/Common/DataModel/vtkMappedUnstructuredGrid.h
+++ b/Common/DataModel/vtkMappedUnstructuredGrid.h
@@ -60,7 +60,7 @@
  * - vtkIdType InsertNextCell(int type, vtkIdList *ptIds)
  * - vtkIdType InsertNextCell(int type, vtkIdType npts, const vtkIdType ptIds[])
  * - vtkIdType InsertNextCell(int type, vtkIdType npts, const vtkIdType ptIds[],
- *                            vtkIdType nfaces, const vtkIdType faces[])
+ *                            vtkIdType nfaces, const int faces[])
  * - void ReplaceCell(vtkIdType cellId, int npts, const vtkIdType pts[])
  *
  * These methods should provide the same functionality as defined in
diff --git a/Common/DataModel/vtkPentagonalPrism.cxx b/Common/DataModel/vtkPentagonalPrism.cxx
index b8dd203923e5fbcbea078a90874a129a2d63d888..4b76e84e885a338d155ef3115fde8e87510db427 100644
--- a/Common/DataModel/vtkPentagonalPrism.cxx
+++ b/Common/DataModel/vtkPentagonalPrism.cxx
@@ -402,11 +402,13 @@ void vtkPentagonalPrism::EvaluateLocation(
     }
   }
 }
-static int edges[15][2] = { { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 4 }, { 4, 0 }, { 5, 6 }, { 6, 7 },
-  { 7, 8 }, { 8, 9 }, { 9, 5 }, { 0, 5 }, { 1, 6 }, { 2, 7 }, { 3, 8 }, { 4, 9 } };
+static constexpr vtkIdType edges[15][2] = { { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 4 }, { 4, 0 },
+  { 5, 6 }, { 6, 7 }, { 7, 8 }, { 8, 9 }, { 9, 5 }, { 0, 5 }, { 1, 6 }, { 2, 7 }, { 3, 8 },
+  { 4, 9 } };
 
-static int faces[7][6] = { { 0, 4, 3, 2, 1, -1 }, { 5, 6, 7, 8, 9, -1 }, { 0, 1, 6, 5, -1, -1 },
-  { 1, 2, 7, 6, -1, -1 }, { 2, 3, 8, 7, -1, -1 }, { 3, 4, 9, 8, -1, -1 }, { 4, 0, 5, 9, -1, -1 } };
+static constexpr vtkIdType faces[7][6] = { { 0, 4, 3, 2, 1, -1 }, { 5, 6, 7, 8, 9, -1 },
+  { 0, 1, 6, 5, -1, -1 }, { 1, 2, 7, 6, -1, -1 }, { 2, 3, 8, 7, -1, -1 }, { 3, 4, 9, 8, -1, -1 },
+  { 4, 0, 5, 9, -1, -1 } };
 
 //----------------------------------------------------------------------------
 // Returns the closest face to the point specified. Closeness is measured
@@ -462,7 +464,7 @@ int vtkPentagonalPrism::CellBoundary(int subId, const double pcoords[3], vtkIdLi
   {
     dot = 0;
   }
-  int* verts;
+  const vtkIdType* verts;
 
   if (pcoords[2] < 0.5)
   {
@@ -524,7 +526,7 @@ int vtkPentagonalPrism::CellBoundary(int subId, const double pcoords[3], vtkIdLi
 }
 
 //----------------------------------------------------------------------------
-int* vtkPentagonalPrism::GetEdgeArray(int edgeId)
+const vtkIdType* vtkPentagonalPrism::GetEdgeArray(int edgeId)
 {
   return edges[edgeId];
 }
@@ -532,7 +534,7 @@ int* vtkPentagonalPrism::GetEdgeArray(int edgeId)
 //----------------------------------------------------------------------------
 vtkCell* vtkPentagonalPrism::GetEdge(int edgeId)
 {
-  int* verts;
+  const vtkIdType* verts;
 
   verts = edges[edgeId];
 
@@ -547,14 +549,14 @@ vtkCell* vtkPentagonalPrism::GetEdge(int edgeId)
   return this->Line;
 }
 //----------------------------------------------------------------------------
-int* vtkPentagonalPrism::GetFaceArray(int faceId)
+const vtkIdType* vtkPentagonalPrism::GetFaceArray(int faceId)
 {
   return faces[faceId];
 }
 //----------------------------------------------------------------------------
 vtkCell* vtkPentagonalPrism::GetFace(int faceId)
 {
-  int* verts;
+  const vtkIdType* verts;
 
   verts = faces[faceId];
 
@@ -775,13 +777,13 @@ void vtkPentagonalPrism::JacobianInverse(
 }
 
 //----------------------------------------------------------------------------
-void vtkPentagonalPrism::GetEdgePoints(int edgeId, int*& pts)
+void vtkPentagonalPrism::GetEdgePoints(int edgeId, const vtkIdType*& pts)
 {
   pts = this->GetEdgeArray(edgeId);
 }
 
 //----------------------------------------------------------------------------
-void vtkPentagonalPrism::GetFacePoints(int faceId, int*& pts)
+void vtkPentagonalPrism::GetFacePoints(int faceId, const vtkIdType*& pts)
 {
   pts = this->GetFaceArray(faceId);
 }
diff --git a/Common/DataModel/vtkPentagonalPrism.h b/Common/DataModel/vtkPentagonalPrism.h
index 0c9ca3f483ea9f2c4b3e0827a743b0f4e7e92d48..6b76f9fa1afbe894c21dc1f6ffa65ff5dde0b565 100644
--- a/Common/DataModel/vtkPentagonalPrism.h
+++ b/Common/DataModel/vtkPentagonalPrism.h
@@ -61,8 +61,8 @@ public:
   /**
    * See vtkCell3D API for description of these methods.
    */
-  void GetEdgePoints(int edgeId, int*& pts) override;
-  void GetFacePoints(int faceId, int*& pts) override;
+  void GetEdgePoints(int edgeId, const vtkIdType*& pts) override;
+  void GetFacePoints(int faceId, const vtkIdType*& pts) override;
   //@}
 
   //@{
@@ -121,8 +121,8 @@ public:
    * Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
    * Ids are related to the cell, not to the dataset.
    */
-  static int* GetEdgeArray(int edgeId);
-  static int* GetFaceArray(int faceId);
+  static const vtkIdType* GetEdgeArray(int edgeId);
+  static const vtkIdType* GetFaceArray(int faceId);
   //@}
 
   /**
diff --git a/Common/DataModel/vtkPolyhedron.cxx b/Common/DataModel/vtkPolyhedron.cxx
index 61b441c4d15016d75f7bdb79701ddce350cfa743..8f04451cf2e3fdb089c4aa7ae5b2a7a5ae4cb7a3 100644
--- a/Common/DataModel/vtkPolyhedron.cxx
+++ b/Common/DataModel/vtkPolyhedron.cxx
@@ -539,7 +539,7 @@ void vtkPolyhedron::SetFaces(vtkIdType* faces)
 
   this->GlobalFaces->InsertNextValue(nfaces);
   vtkIdType* face = faces + 1;
-  vtkIdType faceLoc = 1;
+  int faceLoc = 1;
   vtkIdType i, fid, npts;
 
   for (fid = 0; fid < nfaces; ++fid)
@@ -1781,7 +1781,7 @@ int CreateContours(EdgeFaceSetMap& edgeFaceMap, FaceEdgesVector& faceEdgesVector
 
       const set<vtkIdType>& facesOfEdge = edgeFaceMap[at];
 
-      vtkIdType face(lastFace);
+      int face(lastFace);
       for (const vtkIdType& faceOfEdge : facesOfEdge)
       {
         if (lastFace != faceOfEdge)
diff --git a/Common/DataModel/vtkPolyhedron.h b/Common/DataModel/vtkPolyhedron.h
index f26a2e27b800ee8c5cdfabfbdd2f0750eaac464a..fb7b054795074a10dbdecab47a349e89a6003cb5 100644
--- a/Common/DataModel/vtkPolyhedron.h
+++ b/Common/DataModel/vtkPolyhedron.h
@@ -71,11 +71,11 @@ public:
    * See vtkCell3D API for description of these methods.
    * @warning These method are unimplemented in vtkPolyhedron
    */
-  void GetEdgePoints(int vtkNotUsed(edgeId), int*& vtkNotUsed(pts)) override
+  void GetEdgePoints(int vtkNotUsed(edgeId), const vtkIdType*& vtkNotUsed(pts)) override
   {
     vtkWarningMacro(<< "vtkPolyhedron::GetEdgePoints Not Implemented");
   }
-  void GetFacePoints(int vtkNotUsed(faceId), int*& vtkNotUsed(pts)) override
+  void GetFacePoints(int vtkNotUsed(faceId), const vtkIdType*& vtkNotUsed(pts)) override
   {
     vtkWarningMacro(<< "vtkPolyhedron::GetFacePoints Not Implemented");
   }
diff --git a/Common/DataModel/vtkPyramid.cxx b/Common/DataModel/vtkPyramid.cxx
index 3678d95e133601ce0f1874d743990e476be0a925..1093d271d6889c7d42233d579a1d21c2432fb47c 100644
--- a/Common/DataModel/vtkPyramid.cxx
+++ b/Common/DataModel/vtkPyramid.cxx
@@ -40,7 +40,7 @@ static const double VTK_CONVERGED = 1.e-03;
 //
 namespace
 { // required so we don't violate ODR
-static int edges[8][2] = {
+static constexpr vtkIdType edges[8][2] = {
   { 0, 1 },
   { 1, 2 },
   { 2, 3 },
@@ -50,7 +50,7 @@ static int edges[8][2] = {
   { 2, 4 },
   { 3, 4 },
 };
-static int faces[5][5] = {
+static constexpr vtkIdType faces[5][5] = {
   { 0, 3, 2, 1, -1 },
   { 0, 1, 4, -1, -1 },
   { 1, 2, 4, -1, -1 },
@@ -411,7 +411,8 @@ void vtkPyramid::Contour(double value, vtkDataArray* cellScalars,
   static const int CASE_MASK[5] = { 1, 2, 4, 8, 16 };
   TRIANGLE_CASES* triCase;
   EDGE_LIST* edge;
-  int i, j, index, *vert, v1, v2, newCellId;
+  int i, j, index, v1, v2, newCellId;
+  const vtkIdType* vert;
   vtkIdType pts[3];
   double t, x1[3], x2[3], x[3], deltaScalar;
   vtkIdType offset = verts->GetNumberOfCells() + lines->GetNumberOfCells();
@@ -491,7 +492,7 @@ int* vtkPyramid::GetTriangleCases(int caseId)
 }
 
 //----------------------------------------------------------------------------
-int* vtkPyramid::GetEdgeArray(int edgeId)
+const vtkIdType* vtkPyramid::GetEdgeArray(int edgeId)
 {
   return edges[edgeId];
 }
@@ -499,7 +500,7 @@ int* vtkPyramid::GetEdgeArray(int edgeId)
 //----------------------------------------------------------------------------
 vtkCell* vtkPyramid::GetEdge(int edgeId)
 {
-  int* verts;
+  const vtkIdType* verts;
 
   verts = edges[edgeId];
 
@@ -515,7 +516,7 @@ vtkCell* vtkPyramid::GetEdge(int edgeId)
 }
 
 //----------------------------------------------------------------------------
-int* vtkPyramid::GetFaceArray(int faceId)
+const vtkIdType* vtkPyramid::GetFaceArray(int faceId)
 {
   return faces[faceId];
 }
@@ -523,7 +524,7 @@ int* vtkPyramid::GetFaceArray(int faceId)
 //----------------------------------------------------------------------------
 vtkCell* vtkPyramid::GetFace(int faceId)
 {
-  int* verts;
+  const vtkIdType* verts;
 
   verts = faces[faceId];
 
@@ -848,13 +849,13 @@ int vtkPyramid::JacobianInverse(const double pcoords[3], double** inverse, doubl
 }
 
 //----------------------------------------------------------------------------
-void vtkPyramid::GetEdgePoints(int edgeId, int*& pts)
+void vtkPyramid::GetEdgePoints(int edgeId, const vtkIdType*& pts)
 {
   pts = this->GetEdgeArray(edgeId);
 }
 
 //----------------------------------------------------------------------------
-void vtkPyramid::GetFacePoints(int faceId, int*& pts)
+void vtkPyramid::GetFacePoints(int faceId, const vtkIdType*& pts)
 {
   pts = this->GetFaceArray(faceId);
 }
diff --git a/Common/DataModel/vtkPyramid.h b/Common/DataModel/vtkPyramid.h
index 78a3afec4510dbbc13ae6332d2b1d6e5e0d62a5c..22ebc9661482e98260093d758a75454b61bfcbbf 100644
--- a/Common/DataModel/vtkPyramid.h
+++ b/Common/DataModel/vtkPyramid.h
@@ -51,8 +51,8 @@ public:
   /**
    * See vtkCell3D API for description of these methods.
    */
-  void GetEdgePoints(int edgeId, int*& pts) override;
-  void GetFacePoints(int faceId, int*& pts) override;
+  void GetEdgePoints(int edgeId, const vtkIdType*& pts) override;
+  void GetFacePoints(int faceId, const vtkIdType*& pts) override;
   //@}
 
   //@{
@@ -124,8 +124,8 @@ public:
    * Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
    * Ids are related to the cell, not to the dataset.
    */
-  static int* GetEdgeArray(int edgeId) VTK_SIZEHINT(2);
-  static int* GetFaceArray(int faceId) VTK_SIZEHINT(4);
+  static const vtkIdType* GetEdgeArray(int edgeId) VTK_SIZEHINT(2);
+  static const vtkIdType* GetFaceArray(int faceId) VTK_SIZEHINT(4);
   //@}
 
 protected:
diff --git a/Common/DataModel/vtkQuadraticHexahedron.cxx b/Common/DataModel/vtkQuadraticHexahedron.cxx
index dae48ac87b0bc6315760e4853ed924fcc6983c8e..715980f9636066198a3ef7958448b450b14417fa 100644
--- a/Common/DataModel/vtkQuadraticHexahedron.cxx
+++ b/Common/DataModel/vtkQuadraticHexahedron.cxx
@@ -79,7 +79,7 @@ static int LinearHexs[8][8] = {
   { 26, 21, 18, 23, 25, 13, 6, 14 },
 };
 
-static int HexFaces[6][8] = {
+static constexpr vtkIdType HexFaces[6][8] = {
   { 0, 4, 7, 3, 16, 15, 19, 11 },
   { 1, 2, 6, 5, 9, 18, 13, 17 },
   { 0, 1, 5, 4, 8, 17, 12, 16 },
@@ -88,7 +88,7 @@ static int HexFaces[6][8] = {
   { 4, 5, 6, 7, 12, 13, 14, 15 },
 };
 
-static int HexEdges[12][3] = {
+static constexpr vtkIdType HexEdges[12][3] = {
   { 0, 1, 8 },
   { 1, 2, 9 },
   { 3, 2, 10 },
@@ -114,12 +114,12 @@ static double MidPoints[7][3] = {
 };
 
 //----------------------------------------------------------------------------
-int* vtkQuadraticHexahedron::GetEdgeArray(int edgeId)
+const vtkIdType* vtkQuadraticHexahedron::GetEdgeArray(int edgeId)
 {
   return HexEdges[edgeId];
 }
 //----------------------------------------------------------------------------
-int* vtkQuadraticHexahedron::GetFaceArray(int faceId)
+const vtkIdType* vtkQuadraticHexahedron::GetFaceArray(int faceId)
 {
   return HexFaces[faceId];
 }
diff --git a/Common/DataModel/vtkQuadraticHexahedron.h b/Common/DataModel/vtkQuadraticHexahedron.h
index 8f46f07f1778f71f0e030fe743a72401d61ebc6d..b6d59b664a1e193fdd98b7108b41cc3f5017b930 100644
--- a/Common/DataModel/vtkQuadraticHexahedron.h
+++ b/Common/DataModel/vtkQuadraticHexahedron.h
@@ -117,8 +117,8 @@ public:
    * Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
    * Ids are related to the cell, not to the dataset.
    */
-  static int* GetEdgeArray(int edgeId);
-  static int* GetFaceArray(int faceId);
+  static const vtkIdType* GetEdgeArray(int edgeId);
+  static const vtkIdType* GetFaceArray(int faceId);
   //@}
 
   /**
diff --git a/Common/DataModel/vtkQuadraticLinearWedge.cxx b/Common/DataModel/vtkQuadraticLinearWedge.cxx
index b629768c65921ab4293cc78db6bab750e3d9c8d3..eccab937f82ba6d05ce513115abd5809ca9b3a27 100644
--- a/Common/DataModel/vtkQuadraticLinearWedge.cxx
+++ b/Common/DataModel/vtkQuadraticLinearWedge.cxx
@@ -75,7 +75,7 @@ static int LinearWedges[4][6] = {
 };
 
 // We use 2 quadratic triangles and 3 quadratic-linear quads
-static int WedgeFaces[5][6] = {
+static constexpr vtkIdType WedgeFaces[5][6] = {
   { 0, 1, 2, 6, 7, 8 },   // first quad triangle
   { 3, 5, 4, 11, 10, 9 }, // second quad triangle
   { 1, 0, 3, 4, 6, 9 },   // 1. quad-linear quad
@@ -84,7 +84,7 @@ static int WedgeFaces[5][6] = {
 };
 
 // We have 6 quadratic and 3 linear edges
-static int WedgeEdges[9][3] = {
+static constexpr vtkIdType WedgeEdges[9][3] = {
   // quadratic edges
   { 0, 1, 6 },
   { 1, 2, 7 },
@@ -99,13 +99,13 @@ static int WedgeEdges[9][3] = {
 };
 
 //----------------------------------------------------------------------------
-int* vtkQuadraticLinearWedge::GetEdgeArray(int edgeId)
+const vtkIdType* vtkQuadraticLinearWedge::GetEdgeArray(int edgeId)
 {
   return WedgeEdges[edgeId];
 }
 
 //----------------------------------------------------------------------------
-int* vtkQuadraticLinearWedge::GetFaceArray(int faceId)
+const vtkIdType* vtkQuadraticLinearWedge::GetFaceArray(int faceId)
 {
   return WedgeFaces[faceId];
 }
diff --git a/Common/DataModel/vtkQuadraticLinearWedge.h b/Common/DataModel/vtkQuadraticLinearWedge.h
index 507abc696c092b55afd4e7e82eb0f4b92c22918d..8452db9fcb5f11c66b853fd8ad4e3947000c890a 100644
--- a/Common/DataModel/vtkQuadraticLinearWedge.h
+++ b/Common/DataModel/vtkQuadraticLinearWedge.h
@@ -136,8 +136,8 @@ public:
    * Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
    * Ids are related to the cell, not to the dataset.
    */
-  static int* GetEdgeArray(int edgeId);
-  static int* GetFaceArray(int faceId);
+  static const vtkIdType* GetEdgeArray(int edgeId);
+  static const vtkIdType* GetFaceArray(int faceId);
   //@}
 
   /**
diff --git a/Common/DataModel/vtkQuadraticPyramid.cxx b/Common/DataModel/vtkQuadraticPyramid.cxx
index 8eabc9080725218fe7a1f15c215a96651c68964f..59127572bad91ed236341dd9a3e066c885010a04 100644
--- a/Common/DataModel/vtkQuadraticPyramid.cxx
+++ b/Common/DataModel/vtkQuadraticPyramid.cxx
@@ -90,7 +90,7 @@ static int LinearPyramids[10][5] = {
   { 8, 13, 12, 9, 0 },
 };
 
-static int PyramidFaces[5][8] = {
+static constexpr vtkIdType PyramidFaces[5][8] = {
   { 0, 3, 2, 1, 8, 7, 6, 5 },
   { 0, 1, 4, 5, 10, 9, 0, 0 },
   { 1, 2, 4, 6, 11, 10, 0, 0 },
@@ -98,7 +98,7 @@ static int PyramidFaces[5][8] = {
   { 3, 0, 4, 8, 9, 12, 0, 0 },
 };
 
-static int PyramidEdges[8][3] = {
+static constexpr vtkIdType PyramidEdges[8][3] = {
   { 0, 1, 5 },
   { 1, 2, 6 },
   { 2, 3, 7 },
@@ -110,12 +110,12 @@ static int PyramidEdges[8][3] = {
 };
 
 //----------------------------------------------------------------------------
-int* vtkQuadraticPyramid::GetEdgeArray(int edgeId)
+const vtkIdType* vtkQuadraticPyramid::GetEdgeArray(int edgeId)
 {
   return PyramidEdges[edgeId];
 }
 //----------------------------------------------------------------------------
-int* vtkQuadraticPyramid::GetFaceArray(int faceId)
+const vtkIdType* vtkQuadraticPyramid::GetFaceArray(int faceId)
 {
   return PyramidFaces[faceId];
 }
diff --git a/Common/DataModel/vtkQuadraticPyramid.h b/Common/DataModel/vtkQuadraticPyramid.h
index ccd358f3c53e3682edd8f8e6e6f92c3c6e2b208a..e547f7906aba8d9833e6958919f46680e40c9ff0 100644
--- a/Common/DataModel/vtkQuadraticPyramid.h
+++ b/Common/DataModel/vtkQuadraticPyramid.h
@@ -129,8 +129,8 @@ public:
    * Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
    * Ids are related to the cell, not to the dataset.
    */
-  static int* GetEdgeArray(int edgeId);
-  static int* GetFaceArray(int faceId);
+  static const vtkIdType* GetEdgeArray(int edgeId);
+  static const vtkIdType* GetFaceArray(int faceId);
   //@}
 
   /**
diff --git a/Common/DataModel/vtkQuadraticTetra.cxx b/Common/DataModel/vtkQuadraticTetra.cxx
index c7a45bb45a385396a18d774e3cf813bb7987903e..3a9a2143645b812d2d9e3df60071975080b9bbdd 100644
--- a/Common/DataModel/vtkQuadraticTetra.cxx
+++ b/Common/DataModel/vtkQuadraticTetra.cxx
@@ -64,14 +64,14 @@ static int LinearTetras[3][8][4] = {
     { 5, 4, 8, 7 }, { 5, 8, 9, 7 } },
 };
 
-static int TetraFaces[4][6] = {
+static constexpr vtkIdType TetraFaces[4][6] = {
   { 0, 1, 3, 4, 8, 7 },
   { 1, 2, 3, 5, 9, 8 },
   { 2, 0, 3, 6, 7, 9 },
   { 0, 2, 1, 6, 5, 4 },
 };
 
-static int TetraEdges[6][3] = {
+static constexpr vtkIdType TetraEdges[6][3] = {
   { 0, 1, 4 },
   { 1, 2, 5 },
   { 2, 0, 6 },
@@ -81,12 +81,12 @@ static int TetraEdges[6][3] = {
 };
 
 //------------------------Tuple1----------------------------------------------------
-int* vtkQuadraticTetra::GetEdgeArray(int edgeId)
+const vtkIdType* vtkQuadraticTetra::GetEdgeArray(int edgeId)
 {
   return TetraEdges[edgeId];
 }
 //----------------------------------------------------------------------------
-int* vtkQuadraticTetra::GetFaceArray(int faceId)
+const vtkIdType* vtkQuadraticTetra::GetFaceArray(int faceId)
 {
   return TetraFaces[faceId];
 }
diff --git a/Common/DataModel/vtkQuadraticTetra.h b/Common/DataModel/vtkQuadraticTetra.h
index 0173da863d0c65dc947efe45bb217d4bda0b6385..78efc26dfbf846376538177ac8d2c7bf9ab845fb 100644
--- a/Common/DataModel/vtkQuadraticTetra.h
+++ b/Common/DataModel/vtkQuadraticTetra.h
@@ -130,8 +130,8 @@ public:
    * Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
    * Ids are related to the cell, not to the dataset.
    */
-  static int* GetEdgeArray(int edgeId);
-  static int* GetFaceArray(int faceId);
+  static const vtkIdType* GetEdgeArray(int edgeId);
+  static const vtkIdType* GetFaceArray(int faceId);
   //@}
 
   /**
diff --git a/Common/DataModel/vtkQuadraticWedge.cxx b/Common/DataModel/vtkQuadraticWedge.cxx
index 7c99f86a77597d53ecb7596e269e5f7dfd22e6dd..1efba3f4677aff28cd3decb09e117bcbbe80f2b0 100644
--- a/Common/DataModel/vtkQuadraticWedge.cxx
+++ b/Common/DataModel/vtkQuadraticWedge.cxx
@@ -84,7 +84,7 @@ static int LinearWedges[8][6] = {
   { 17, 14, 16, 11, 5, 10 },
 };
 
-static int WedgeFaces[5][8] = {
+static constexpr vtkIdType WedgeFaces[5][8] = {
   { 0, 1, 2, 6, 7, 8, 0, 0 },
   { 3, 5, 4, 11, 10, 9, 0, 0 },
   { 0, 3, 4, 1, 12, 9, 13, 6 },
@@ -92,7 +92,7 @@ static int WedgeFaces[5][8] = {
   { 2, 5, 3, 0, 14, 11, 12, 8 },
 };
 
-static int WedgeEdges[9][3] = {
+static constexpr vtkIdType WedgeEdges[9][3] = {
   { 0, 1, 6 },
   { 1, 2, 7 },
   { 2, 0, 8 },
@@ -110,12 +110,12 @@ static double MidPoints[3][3] = {
   { 0.0, 0.5, 0.5 },
 };
 //----------------------------------------------------------------------------
-int* vtkQuadraticWedge::GetEdgeArray(int edgeId)
+const vtkIdType* vtkQuadraticWedge::GetEdgeArray(int edgeId)
 {
   return WedgeEdges[edgeId];
 }
 //----------------------------------------------------------------------------
-int* vtkQuadraticWedge::GetFaceArray(int faceId)
+const vtkIdType* vtkQuadraticWedge::GetFaceArray(int faceId)
 {
   return WedgeFaces[faceId];
 }
diff --git a/Common/DataModel/vtkQuadraticWedge.h b/Common/DataModel/vtkQuadraticWedge.h
index 5f5b6baa35aa4b6e5876bc461d72cc3e1252ef1c..e9f6e3cef74c66235f9c0aa4e81145e530cf38b3 100644
--- a/Common/DataModel/vtkQuadraticWedge.h
+++ b/Common/DataModel/vtkQuadraticWedge.h
@@ -125,8 +125,8 @@ public:
    * Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
    * Ids are related to the cell, not to the dataset.
    */
-  static int* GetEdgeArray(int edgeId);
-  static int* GetFaceArray(int faceId);
+  static const vtkIdType* GetEdgeArray(int edgeId);
+  static const vtkIdType* GetFaceArray(int faceId);
   //@}
 
   /**
diff --git a/Common/DataModel/vtkSimpleCellTessellator.cxx b/Common/DataModel/vtkSimpleCellTessellator.cxx
index 3ee106d1af36650e0ab040d0c26e96515d566b29..51b4a164090bff1d5903fd41446a80beb8463a42 100644
--- a/Common/DataModel/vtkSimpleCellTessellator.cxx
+++ b/Common/DataModel/vtkSimpleCellTessellator.cxx
@@ -2059,8 +2059,8 @@ void vtkSimpleCellTessellator::Tessellate(vtkGenericAdaptorCell* cell,
       }
       // Get the edges Ids (local)
       //      int edgeIds[6];
-      int* originalEdge;
-      int edge[2];
+      const vtkIdType* originalEdge;
+      vtkIdType edge[2];
       j = 0;
       while (j < 6)
       {
@@ -2083,8 +2083,8 @@ void vtkSimpleCellTessellator::Tessellate(vtkGenericAdaptorCell* cell,
 
       // Get the face Ids (local)
       //      int faceIds[4];
-      int* originalFace;
-      int face[3];
+      const vtkIdType* originalFace;
+      vtkIdType face[3];
       j = 0;
       while (j < 4)
       {
@@ -2120,8 +2120,8 @@ void vtkSimpleCellTessellator::Tessellate(vtkGenericAdaptorCell* cell,
 
     //
     // Get the edges Ids (local)
-    int* originalEdge;
-    int edge[2];
+    const vtkIdType* originalEdge;
+    vtkIdType edge[2];
     j = 0;
     while (j < 6)
     {
@@ -2144,8 +2144,8 @@ void vtkSimpleCellTessellator::Tessellate(vtkGenericAdaptorCell* cell,
     }
 
     // Get the face Ids (local)
-    int* originalFace;
-    int face[3];
+    const vtkIdType* originalFace;
+    vtkIdType face[3];
     int numFaces = cell->GetNumberOfBoundaries(2);
     j = 0;
     while (j < 4)
@@ -2259,7 +2259,7 @@ void vtkSimpleCellTessellator::TessellateFace(vtkGenericAdaptorCell* cell,
     // build a linear polygon, call tessellate() on it and iterate over each triangle
     // by sending it to the tessellator
 
-    int* faceVerts = cell->GetFaceArray(index);
+    const vtkIdType* faceVerts = cell->GetFaceArray(index);
     int numVerts = cell->GetNumberOfVerticesOnFace(index);
     this->Polygon->PointIds->SetNumberOfIds(numVerts);
     this->Polygon->Points->SetNumberOfPoints(numVerts);
@@ -2298,9 +2298,9 @@ void vtkSimpleCellTessellator::TessellateFace(vtkGenericAdaptorCell* cell,
 
       //
       // Get the edges Ids (local)
-      int edgeIds[3];
-      int* originalEdge;
-      int edge[2];
+      vtkIdType edgeIds[3];
+      const vtkIdType* originalEdge;
+      vtkIdType edge[2];
       j = 0;
       int numEdges = cell->GetNumberOfBoundaries(1);
 
@@ -2334,7 +2334,7 @@ void vtkSimpleCellTessellator::TessellateFace(vtkGenericAdaptorCell* cell,
     this->AllocatePointIds(4); // tetra
     cell->GetPointIds(this->PointIds);
 
-    int* facepts = cell->GetFaceArray(index);
+    const vtkIdType* facepts = cell->GetFaceArray(index);
     // we know we are using a tetra.
     pts[0] = facepts[0];
     pts[1] = facepts[1];
@@ -2351,9 +2351,9 @@ void vtkSimpleCellTessellator::TessellateFace(vtkGenericAdaptorCell* cell,
 
     //
     // Get the edges Ids (local)
-    int edgeIds[3];
-    int* originalEdge;
-    int edge[2];
+    vtkIdType edgeIds[3];
+    const vtkIdType* originalEdge;
+    vtkIdType edge[2];
     j = 0;
     while (j < 3)
     {
@@ -2439,9 +2439,9 @@ void vtkSimpleCellTessellator::Triangulate(vtkGenericAdaptorCell* cell,
 
       //
       // Get the edges Ids (local)
-      int edgeIds[3];
-      int* originalEdge;
-      int edge[2];
+      vtkIdType edgeIds[3];
+      const vtkIdType* originalEdge;
+      vtkIdType edge[2];
       j = 0;
       int numEdges = cell->GetNumberOfBoundaries(1);
 
@@ -2471,7 +2471,7 @@ void vtkSimpleCellTessellator::Triangulate(vtkGenericAdaptorCell* cell,
   else
   {
     vtkIdType pts[3] = { 0, 1, 2 };
-    int edgeIds[3] = { 0, 1, 2 };
+    const vtkIdType edgeIds[3] = { 0, 1, 2 };
     this->AllocatePointIds(cell->GetNumberOfBoundaries(0));
     cell->GetPointIds(this->PointIds);
     this->TriangulateTriangle(
@@ -2481,8 +2481,8 @@ void vtkSimpleCellTessellator::Triangulate(vtkGenericAdaptorCell* cell,
 
 //-----------------------------------------------------------------------------
 void vtkSimpleCellTessellator::TriangulateTriangle(vtkGenericAdaptorCell* cell, vtkIdType* localIds,
-  vtkIdType* ids, int* edgeIds, vtkGenericAttributeCollection* att, vtkDoubleArray* points,
-  vtkCellArray* cellArray, vtkPointData* internalPd)
+  vtkIdType* ids, const vtkIdType* edgeIds, vtkGenericAttributeCollection* att,
+  vtkDoubleArray* points, vtkCellArray* cellArray, vtkPointData* internalPd)
 {
   assert("pre: cell_exixts" && cell != nullptr);
   assert("pre: localIds_exists" && localIds != nullptr);
@@ -2752,7 +2752,7 @@ void vtkSimpleCellTessellator::AllocatePointIds(int size)
 // Are the faces `originalFace' and `face' equal?
 // The result is independent from any order or orientation.
 // \pre originalFace_exists: originalFace!=0
-int vtkSimpleCellTessellator::FacesAreEqual(int* originalFace, int face[3])
+int vtkSimpleCellTessellator::FacesAreEqual(const vtkIdType* originalFace, const vtkIdType face[3])
 {
   assert("pre: originalFace_exists" && originalFace != nullptr);
 
diff --git a/Common/DataModel/vtkSimpleCellTessellator.h b/Common/DataModel/vtkSimpleCellTessellator.h
index 50dd1cf8e4aac41dd521c83c0a4a0986e50bb16a..937569afe835c50bec2c93fa472cc8378785bd0e 100644
--- a/Common/DataModel/vtkSimpleCellTessellator.h
+++ b/Common/DataModel/vtkSimpleCellTessellator.h
@@ -247,7 +247,7 @@ protected:
    * \pre edgeIds_size: sizeof(edgeIds)==3
    */
   void TriangulateTriangle(vtkGenericAdaptorCell* cell, vtkIdType* localIds, vtkIdType* ids,
-    int* edgeIds, vtkGenericAttributeCollection* att, vtkDoubleArray* points,
+    const vtkIdType* edgeIds, vtkGenericAttributeCollection* att, vtkDoubleArray* points,
     vtkCellArray* cellArray, vtkPointData* internalPd);
 
   /**
@@ -348,7 +348,7 @@ protected:
    * The result is independent from any order or orientation.
    * \pre originalFace_exists: originalFace!=0
    */
-  int FacesAreEqual(int* originalFace, int face[3]);
+  int FacesAreEqual(const vtkIdType* originalFace, const vtkIdType face[3]);
 
   /**
    * Number of points in the dataset to be tessellated.
@@ -363,12 +363,12 @@ protected:
    * For each edge (6) of the sub-tetra, there is the id of the original edge
    * or -1 if the edge is not an original edge
    */
-  int* EdgeIds;
+  const vtkIdType* EdgeIds;
   /**
    * For each face (4) of the sub-tetra, there is the id of the original face
    * or -1 if the face is not an original face
    */
-  int* FaceIds;
+  const vtkIdType* FaceIds;
 
   // The following variables are for complex cells.
 
diff --git a/Common/DataModel/vtkTetra.cxx b/Common/DataModel/vtkTetra.cxx
index 9ebafe870d94967600313ee686bfdf7faa659637..ccb73cccf506e87cce3b627d832e360572abb606 100644
--- a/Common/DataModel/vtkTetra.cxx
+++ b/Common/DataModel/vtkTetra.cxx
@@ -218,7 +218,7 @@ int vtkTetra::CellBoundary(int vtkNotUsed(subId), const double pcoords[3], vtkId
 //
 namespace
 { // required so we don't violate ODR
-static int edges[6][2] = {
+static constexpr vtkIdType edges[6][2] = {
   { 0, 1 },
   { 1, 2 },
   { 2, 0 },
@@ -226,7 +226,7 @@ static int edges[6][2] = {
   { 1, 3 },
   { 2, 3 },
 };
-static int faces[4][4] = {
+static constexpr vtkIdType faces[4][4] = {
   { 0, 1, 3, -1 },
   { 1, 2, 3, -1 },
   { 2, 0, 3, -1 },
@@ -267,7 +267,8 @@ void vtkTetra::Contour(double value, vtkDataArray* cellScalars, vtkIncrementalPo
   static const int CASE_MASK[4] = { 1, 2, 4, 8 };
   TRIANGLE_CASES* triCase;
   EDGE_LIST* edge;
-  int i, j, index, *vert, v1, v2, newCellId;
+  int i, j, index, v1, v2, newCellId;
+  const vtkIdType* vert;
   vtkIdType pts[3];
   double t, x1[3], x2[3], x[3], deltaScalar;
   vtkIdType offset = verts->GetNumberOfCells() + lines->GetNumberOfCells();
@@ -338,7 +339,7 @@ void vtkTetra::Contour(double value, vtkDataArray* cellScalars, vtkIncrementalPo
 }
 
 //----------------------------------------------------------------------------
-int* vtkTetra::GetEdgeArray(int edgeId)
+const vtkIdType* vtkTetra::GetEdgeArray(int edgeId)
 {
   return edges[edgeId];
 }
@@ -355,7 +356,7 @@ int* vtkTetra::GetTriangleCases(int caseId)
 //----------------------------------------------------------------------------
 vtkCell* vtkTetra::GetEdge(int edgeId)
 {
-  int* verts;
+  const vtkIdType* verts;
 
   verts = edges[edgeId];
 
@@ -371,7 +372,7 @@ vtkCell* vtkTetra::GetEdge(int edgeId)
 }
 
 //----------------------------------------------------------------------------
-int* vtkTetra::GetFaceArray(int faceId)
+const vtkIdType* vtkTetra::GetFaceArray(int faceId)
 {
   return faces[faceId];
 }
@@ -379,7 +380,7 @@ int* vtkTetra::GetFaceArray(int faceId)
 //----------------------------------------------------------------------------
 vtkCell* vtkTetra::GetFace(int faceId)
 {
-  int* verts;
+  const vtkIdType* verts;
 
   verts = faces[faceId];
 
@@ -815,13 +816,13 @@ int vtkTetra::JacobianInverse(double** inverse, double derivs[12])
 }
 
 //----------------------------------------------------------------------------
-void vtkTetra::GetEdgePoints(int edgeId, int*& pts)
+void vtkTetra::GetEdgePoints(int edgeId, const vtkIdType*& pts)
 {
   pts = this->GetEdgeArray(edgeId);
 }
 
 //----------------------------------------------------------------------------
-void vtkTetra::GetFacePoints(int faceId, int*& pts)
+void vtkTetra::GetFacePoints(int faceId, const vtkIdType*& pts)
 {
   pts = this->GetFaceArray(faceId);
 }
@@ -871,7 +872,8 @@ void vtkTetra::Clip(double value, vtkDataArray* cellScalars, vtkIncrementalPoint
   static const int CASE_MASK[4] = { 1, 2, 4, 8 };
   TETRA_CASES* tetraCase;
   TETRA_EDGE_LIST* edge;
-  int i, j, index, *vert, newCellId;
+  int i, j, index, newCellId;
+  const vtkIdType* vert;
   vtkIdType pts[6];
   int vertexId;
   double t, x1[3], x2[3], x[3];
diff --git a/Common/DataModel/vtkTetra.h b/Common/DataModel/vtkTetra.h
index 1e5447c7ae4ce531fc5854fcf5ff1df2f3defd39..48364090905d79c23d97ab427e3342e057daef73 100644
--- a/Common/DataModel/vtkTetra.h
+++ b/Common/DataModel/vtkTetra.h
@@ -49,8 +49,8 @@ public:
   /**
    * See vtkCell3D API for description of these methods.
    */
-  void GetEdgePoints(int edgeId, int*& pts) override;
-  void GetFacePoints(int faceId, int*& pts) override;
+  void GetEdgePoints(int edgeId, const vtkIdType*& pts) override;
+  void GetFacePoints(int faceId, const vtkIdType*& pts) override;
   //@}
 
   //@{
@@ -182,8 +182,8 @@ public:
    * Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
    * Ids are related to the cell, not to the dataset.
    */
-  static int* GetEdgeArray(int edgeId) VTK_SIZEHINT(2);
-  static int* GetFaceArray(int faceId) VTK_SIZEHINT(3);
+  static const vtkIdType* GetEdgeArray(int edgeId) VTK_SIZEHINT(2);
+  static const vtkIdType* GetFaceArray(int faceId) VTK_SIZEHINT(3);
   //@}
 
 protected:
diff --git a/Common/DataModel/vtkTriQuadraticHexahedron.cxx b/Common/DataModel/vtkTriQuadraticHexahedron.cxx
index 557eeb75f383f979fede89297876e1f843edbf7f..f56fb30e0be5941f4ee9564cdedbe692281b8820 100644
--- a/Common/DataModel/vtkTriQuadraticHexahedron.cxx
+++ b/Common/DataModel/vtkTriQuadraticHexahedron.cxx
@@ -70,7 +70,7 @@ static int LinearHexs[8][8] = {
   { 26, 21, 18, 23, 25, 13, 6, 14 },
 };
 
-static int HexFaces[6][9] = {
+static constexpr vtkIdType HexFaces[6][9] = {
   { 0, 4, 7, 3, 16, 15, 19, 11, 20 },
   { 1, 2, 6, 5, 9, 18, 13, 17, 21 },
   { 0, 1, 5, 4, 8, 17, 12, 16, 22 },
@@ -79,7 +79,7 @@ static int HexFaces[6][9] = {
   { 4, 5, 6, 7, 12, 13, 14, 15, 25 },
 };
 
-static int HexEdges[12][3] = {
+static constexpr vtkIdType HexEdges[12][3] = {
   { 0, 1, 8 },
   { 1, 2, 9 },
   { 3, 2, 10 },
@@ -95,12 +95,12 @@ static int HexEdges[12][3] = {
 };
 
 //----------------------------------------------------------------------------
-int* vtkTriQuadraticHexahedron::GetEdgeArray(int edgeId)
+const vtkIdType* vtkTriQuadraticHexahedron::GetEdgeArray(int edgeId)
 {
   return HexEdges[edgeId];
 }
 //----------------------------------------------------------------------------
-int* vtkTriQuadraticHexahedron::GetFaceArray(int faceId)
+const vtkIdType* vtkTriQuadraticHexahedron::GetFaceArray(int faceId)
 {
   return HexFaces[faceId];
 }
diff --git a/Common/DataModel/vtkTriQuadraticHexahedron.h b/Common/DataModel/vtkTriQuadraticHexahedron.h
index c939ddce0fe11386f3512034efc6418814176606..efce7f96892f0b937579e183532a4c5321e92fa1 100644
--- a/Common/DataModel/vtkTriQuadraticHexahedron.h
+++ b/Common/DataModel/vtkTriQuadraticHexahedron.h
@@ -154,8 +154,8 @@ public:
    * Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
    * Ids are related to the cell, not to the dataset.
    */
-  static int* GetEdgeArray(int edgeId);
-  static int* GetFaceArray(int faceId);
+  static const vtkIdType* GetEdgeArray(int edgeId);
+  static const vtkIdType* GetFaceArray(int faceId);
   //@}
 
   /**
diff --git a/Common/DataModel/vtkUnstructuredGridCellIterator.cxx b/Common/DataModel/vtkUnstructuredGridCellIterator.cxx
index 8223b7f888dc211c6edd52433fd8172d0f2b807f..77b99b4b435c65e1abb5712b854aa82b56015b82 100644
--- a/Common/DataModel/vtkUnstructuredGridCellIterator.cxx
+++ b/Common/DataModel/vtkUnstructuredGridCellIterator.cxx
@@ -149,9 +149,9 @@ void vtkUnstructuredGridCellIterator::FetchFaces()
   if (this->FaceLocs)
   {
     const vtkIdType cellId = this->Cells->GetCurrentCellId();
-    const vtkIdType faceLoc = this->FaceLocs->GetValue(cellId);
+    const int faceLoc = this->FaceLocs->GetValue(cellId);
     const vtkIdType* faceSet = this->FaceConn->GetPointer(faceLoc);
-    vtkIdType facesSize = FaceSetSize(faceSet);
+    int facesSize = FaceSetSize(faceSet);
     this->Faces->SetNumberOfIds(facesSize);
     vtkIdType* tmpPtr = this->Faces->GetPointer(0);
     std::copy_n(faceSet, facesSize, tmpPtr);
diff --git a/Common/DataModel/vtkVoxel.cxx b/Common/DataModel/vtkVoxel.cxx
index e0266a5deba8582fea1d202833c044403b1f6c82..8ceaaa3ea1719311d7e18f8e3636415c84f9efe5 100644
--- a/Common/DataModel/vtkVoxel.cxx
+++ b/Common/DataModel/vtkVoxel.cxx
@@ -282,11 +282,11 @@ int vtkVoxel::CellBoundary(int vtkNotUsed(subId), const double pcoords[3], vtkId
 }
 
 //----------------------------------------------------------------------------
-static int edges[12][2] = { { 0, 1 }, { 1, 3 }, { 2, 3 }, { 0, 2 }, { 4, 5 }, { 5, 7 }, { 6, 7 },
-  { 4, 6 }, { 0, 4 }, { 1, 5 }, { 2, 6 }, { 3, 7 } };
+static constexpr vtkIdType edges[12][2] = { { 0, 1 }, { 1, 3 }, { 2, 3 }, { 0, 2 }, { 4, 5 },
+  { 5, 7 }, { 6, 7 }, { 4, 6 }, { 0, 4 }, { 1, 5 }, { 2, 6 }, { 3, 7 } };
 // define in terms vtkPixel understands
-static int faces[6][5] = { { 2, 0, 6, 4, -1 }, { 1, 3, 5, 7, -1 }, { 0, 1, 4, 5, -1 },
-  { 3, 2, 7, 6, -1 }, { 1, 0, 3, 2, -1 }, { 4, 5, 6, 7, -1 } };
+static constexpr vtkIdType faces[6][5] = { { 2, 0, 6, 4, -1 }, { 1, 3, 5, 7, -1 },
+  { 0, 1, 4, 5, -1 }, { 3, 2, 7, 6, -1 }, { 1, 0, 3, 2, -1 }, { 4, 5, 6, 7, -1 } };
 
 //----------------------------------------------------------------------------
 //
@@ -301,7 +301,8 @@ void vtkVoxel::Contour(double value, vtkDataArray* cellScalars, vtkIncrementalPo
   static const int CASE_MASK[8] = { 1, 2, 4, 8, 16, 32, 64, 128 };
   vtkMarchingCubesTriangleCases* triCase;
   EDGE_LIST* edge;
-  int i, j, index, *vert;
+  int i, j, index;
+  const vtkIdType* vert;
   static const int vertMap[8] = { 0, 1, 3, 2, 4, 5, 7, 6 };
   int newCellId;
   vtkIdType pts[3];
@@ -356,7 +357,7 @@ void vtkVoxel::Contour(double value, vtkDataArray* cellScalars, vtkIncrementalPo
 }
 
 //----------------------------------------------------------------------------
-int* vtkVoxel::GetEdgeArray(int edgeId)
+const vtkIdType* vtkVoxel::GetEdgeArray(int edgeId)
 {
   return edges[edgeId];
 }
@@ -378,7 +379,7 @@ vtkCell* vtkVoxel::GetEdge(int edgeId)
     this->Line = vtkLine::New();
   }
 
-  int* verts;
+  const vtkIdType* verts;
 
   verts = edges[edgeId];
 
@@ -394,7 +395,7 @@ vtkCell* vtkVoxel::GetEdge(int edgeId)
 }
 
 //----------------------------------------------------------------------------
-int* vtkVoxel::GetFaceArray(int faceId)
+const vtkIdType* vtkVoxel::GetFaceArray(int faceId)
 {
   return faces[faceId];
 }
@@ -407,7 +408,8 @@ vtkCell* vtkVoxel::GetFace(int faceId)
     this->Pixel = vtkPixel::New();
   }
 
-  int *verts, i;
+  const vtkIdType* verts;
+  int i;
 
   verts = faces[faceId];
 
@@ -616,13 +618,13 @@ void vtkVoxel::Derivatives(
 }
 
 //----------------------------------------------------------------------------
-void vtkVoxel::GetEdgePoints(int edgeId, int*& pts)
+void vtkVoxel::GetEdgePoints(int edgeId, const vtkIdType*& pts)
 {
   pts = this->GetEdgeArray(edgeId);
 }
 
 //----------------------------------------------------------------------------
-void vtkVoxel::GetFacePoints(int faceId, int*& pts)
+void vtkVoxel::GetFacePoints(int faceId, const vtkIdType*& pts)
 {
   pts = this->GetFaceArray(faceId);
 }
diff --git a/Common/DataModel/vtkVoxel.h b/Common/DataModel/vtkVoxel.h
index 2dc838c4de3c8ba9a1268c657c1856415d94efd8..e4bd30cfb5caf8377170a37dfb2d03d3a9673f6a 100644
--- a/Common/DataModel/vtkVoxel.h
+++ b/Common/DataModel/vtkVoxel.h
@@ -46,8 +46,8 @@ public:
   /**
    * See vtkCell3D API for description of these methods.
    */
-  void GetEdgePoints(int edgeId, int*& pts) override;
-  void GetFacePoints(int faceId, int*& pts) override;
+  void GetEdgePoints(int edgeId, const vtkIdType*& pts) override;
+  void GetFacePoints(int faceId, const vtkIdType*& pts) override;
   double* GetParametricCoords() override;
   //@}
 
@@ -115,8 +115,8 @@ public:
    * Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
    * Ids are related to the cell, not to the dataset.
    */
-  static int* GetEdgeArray(int edgeId) VTK_SIZEHINT(2);
-  static int* GetFaceArray(int faceId) VTK_SIZEHINT(4);
+  static const vtkIdType* GetEdgeArray(int edgeId) VTK_SIZEHINT(2);
+  static const vtkIdType* GetFaceArray(int faceId) VTK_SIZEHINT(4);
   //@}
 
 protected:
diff --git a/Common/DataModel/vtkWedge.cxx b/Common/DataModel/vtkWedge.cxx
index e00bd93a5bb125c029cb94edf140c57cc8613fac..d1735980f1d603b16f39081508e8a84dad48d309 100644
--- a/Common/DataModel/vtkWedge.cxx
+++ b/Common/DataModel/vtkWedge.cxx
@@ -34,7 +34,7 @@ static const double VTK_DIVERGED = 1.e6;
 //----------------------------------------------------------------------------
 // Marching (convex) wedge
 //
-static int edges[9][2] = {
+static constexpr vtkIdType edges[9][2] = {
   { 0, 1 },
   { 1, 2 },
   { 2, 0 },
@@ -45,7 +45,7 @@ static int edges[9][2] = {
   { 1, 4 },
   { 2, 5 },
 };
-static int faces[5][5] = {
+static constexpr vtkIdType faces[5][5] = {
   { 0, 1, 2, -1 },
   { 3, 5, 4, -1 },
   { 0, 3, 4, 1, -1 },
@@ -407,7 +407,8 @@ void vtkWedge::Contour(double value, vtkDataArray* cellScalars, vtkIncrementalPo
   static const int CASE_MASK[6] = { 1, 2, 4, 8, 16, 32 };
   TRIANGLE_CASES* triCase;
   EDGE_LIST* edge;
-  int i, j, index, *vert, v1, v2, newCellId;
+  int i, j, index, v1, v2, newCellId;
+  const vtkIdType* vert;
   vtkIdType pts[3];
   double t, x1[3], x2[3], x[3], deltaScalar;
   vtkIdType offset = verts->GetNumberOfCells() + lines->GetNumberOfCells();
@@ -477,7 +478,7 @@ void vtkWedge::Contour(double value, vtkDataArray* cellScalars, vtkIncrementalPo
 }
 
 //----------------------------------------------------------------------------
-int* vtkWedge::GetEdgeArray(int edgeId)
+const vtkIdType* vtkWedge::GetEdgeArray(int edgeId)
 {
   return edges[edgeId];
 }
@@ -494,7 +495,7 @@ int* vtkWedge::GetTriangleCases(int caseId)
 //----------------------------------------------------------------------------
 vtkCell* vtkWedge::GetEdge(int edgeId)
 {
-  int* verts;
+  const vtkIdType* verts;
 
   verts = edges[edgeId];
 
@@ -510,7 +511,7 @@ vtkCell* vtkWedge::GetEdge(int edgeId)
 }
 
 //----------------------------------------------------------------------------
-int* vtkWedge::GetFaceArray(int faceId)
+const vtkIdType* vtkWedge::GetFaceArray(int faceId)
 {
   return faces[faceId];
 }
@@ -518,7 +519,7 @@ int* vtkWedge::GetFaceArray(int faceId)
 //----------------------------------------------------------------------------
 vtkCell* vtkWedge::GetFace(int faceId)
 {
-  int* verts = faces[faceId];
+  const vtkIdType* verts = faces[faceId];
 
   if (verts[3] != -1) // quad cell
   {
@@ -825,13 +826,13 @@ int vtkWedge::JacobianInverse(const double pcoords[3], double** inverse, double
 }
 
 //----------------------------------------------------------------------------
-void vtkWedge::GetEdgePoints(int edgeId, int*& pts)
+void vtkWedge::GetEdgePoints(int edgeId, const vtkIdType*& pts)
 {
   pts = this->GetEdgeArray(edgeId);
 }
 
 //----------------------------------------------------------------------------
-void vtkWedge::GetFacePoints(int faceId, int*& pts)
+void vtkWedge::GetFacePoints(int faceId, const vtkIdType*& pts)
 {
   pts = this->GetFaceArray(faceId);
 }
diff --git a/Common/DataModel/vtkWedge.h b/Common/DataModel/vtkWedge.h
index 1a970d52e5e0e48fb283f3686918f36a68991cf1..a1863c40f442ee7affde117951e2b0a6a0631422 100644
--- a/Common/DataModel/vtkWedge.h
+++ b/Common/DataModel/vtkWedge.h
@@ -51,8 +51,8 @@ public:
   /**
    * See vtkCell3D API for description of these methods.
    */
-  void GetEdgePoints(int edgeId, int*& pts) override;
-  void GetFacePoints(int faceId, int*& pts) override;
+  void GetEdgePoints(int edgeId, const vtkIdType*& pts) override;
+  void GetFacePoints(int faceId, const vtkIdType*& pts) override;
   //@}
 
   //@{
@@ -123,8 +123,8 @@ public:
    * Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
    * Ids are related to the cell, not to the dataset.
    */
-  static int* GetEdgeArray(int edgeId) VTK_SIZEHINT(2);
-  static int* GetFaceArray(int faceId) VTK_SIZEHINT(4);
+  static const vtkIdType* GetEdgeArray(int edgeId) VTK_SIZEHINT(2);
+  static const vtkIdType* GetFaceArray(int faceId) VTK_SIZEHINT(4);
   //@}
 
 protected:
diff --git a/Filters/Core/vtk3DLinearGridInternal.h b/Filters/Core/vtk3DLinearGridInternal.h
index dc0c21b6478d1ae8428903d755803cb443f88b63..13e5e1cf4e64d839bf81c7c17cdb58c06959f770 100644
--- a/Filters/Core/vtk3DLinearGridInternal.h
+++ b/Filters/Core/vtk3DLinearGridInternal.h
@@ -86,12 +86,13 @@ struct BaseCell
   // vertices (v0,v1) for each edge. Note that groups of three contiguous
   // edges form a triangle.
   virtual void BuildCases() = 0;
-  void BuildCases(int numCases, int** edges, int** cases, unsigned short* caseArray);
+  void BuildCases(int numCases, const vtkIdType** edges, int** cases, unsigned short* caseArray);
 };
 // Used to generate case mask
 unsigned char BaseCell::Mask[MAX_CELL_VERTS] = { 1, 2, 4, 8, 16, 32, 64, 128 };
 // Build repackaged case table and place into cases array.
-void BaseCell::BuildCases(int numCases, int** edges, int** cases, unsigned short* caseArray)
+void BaseCell::BuildCases(
+  int numCases, const vtkIdType** edges, int** cases, unsigned short* caseArray)
 {
   int caseOffset = numCases;
   for (int caseNum = 0; caseNum < numCases; ++caseNum)
@@ -107,7 +108,7 @@ void BaseCell::BuildCases(int numCases, int** edges, int** cases, unsigned short
     caseArray[caseOffset++] = count;
 
     // Now populate the edges
-    int* edge;
+    const vtkIdType* edge;
     for (count = 0; triCases[count] != (-1); ++count)
     {
       edge = edges[triCases[count]];
@@ -141,7 +142,7 @@ unsigned short TetraCell::TetraCases[152] = { 0 };
 // efficiency (e.g., support the GetCase() method).
 void TetraCell::BuildCases()
 {
-  int** edges = new int*[this->NumEdges];
+  const vtkIdType** edges = new const vtkIdType*[this->NumEdges];
   int numCases = std::pow(2, this->NumVerts);
   int** cases = new int*[numCases];
   for (int i = 0; i < this->NumEdges; ++i)
@@ -181,7 +182,7 @@ unsigned short HexahedronCell::HexahedronCases[5432] = { 0 };
 // repackaged for efficiency (e.g., support the GetCase() method).
 void HexahedronCell::BuildCases()
 {
-  int** edges = new int*[this->NumEdges];
+  const vtkIdType** edges = new const vtkIdType*[this->NumEdges];
   int numCases = std::pow(2, this->NumVerts);
   int** cases = new int*[numCases];
   for (int i = 0; i < this->NumEdges; ++i)
@@ -221,7 +222,7 @@ unsigned short WedgeCell::WedgeCases[968] = { 0 };
 // repackaged for efficiency (e.g., support the GetCase() method).
 void WedgeCell::BuildCases()
 {
-  int** edges = new int*[this->NumEdges];
+  const vtkIdType** edges = new const vtkIdType*[this->NumEdges];
   int numCases = std::pow(2, this->NumVerts);
   int** cases = new int*[numCases];
   for (int i = 0; i < this->NumEdges; ++i)
@@ -261,7 +262,7 @@ unsigned short PyramidCell::PyramidCases[448] = { 0 };
 // repackaged for efficiency (e.g., support the GetCase() method).
 void PyramidCell::BuildCases()
 {
-  int** edges = new int*[this->NumEdges];
+  const vtkIdType** edges = new const vtkIdType*[this->NumEdges];
   int numCases = std::pow(2, this->NumVerts);
   int** cases = new int*[numCases];
   for (int i = 0; i < this->NumEdges; ++i)
@@ -305,9 +306,9 @@ void VoxelCell::BuildCases()
 {
   // Map the voxel points consistent with the hex edges and cases, Basically
   // the hex points (2,3,6,7) are ordered (3,2,7,6) on the voxel.
-  int** edges = new int*[this->NumEdges];
-  int voxEdges[12][2] = { { 0, 1 }, { 1, 3 }, { 2, 3 }, { 0, 2 }, { 4, 5 }, { 5, 7 }, { 6, 7 },
-    { 4, 6 }, { 0, 4 }, { 1, 5 }, { 2, 6 }, { 3, 7 } };
+  const vtkIdType** edges = new const vtkIdType*[this->NumEdges];
+  constexpr vtkIdType voxEdges[12][2] = { { 0, 1 }, { 1, 3 }, { 2, 3 }, { 0, 2 }, { 4, 5 },
+    { 5, 7 }, { 6, 7 }, { 4, 6 }, { 0, 4 }, { 1, 5 }, { 2, 6 }, { 3, 7 } };
 
   for (int i = 0; i < this->NumEdges; ++i)
   {
diff --git a/Filters/General/vtkDataSetGradientPrecompute.cxx b/Filters/General/vtkDataSetGradientPrecompute.cxx
index 3ed769945867d17b80d3fc69a0132bbc1d8e1c37..84bc5f1cb9a492a7dd4f800d53ba40d9aa68a7ee 100644
--- a/Filters/General/vtkDataSetGradientPrecompute.cxx
+++ b/Filters/General/vtkDataSetGradientPrecompute.cxx
@@ -182,7 +182,7 @@ int vtkDataSetGradientPrecompute::GradientPrecompute(vtkDataSet* ds)
         int nf = cell->GetNumberOfFaces();
         for (int f = 0; f < nf; f++)
         {
-          int* faceIds = nullptr;
+          const vtkIdType* faceIds = nullptr;
           int nfp = cell->GetFace(f)->GetNumberOfPoints();
           cell3d->GetFacePoints(f, faceIds);
 #ifdef VTK_DATASET_GRADIENT_TRIANGLE_OPTIMIZATION
diff --git a/Filters/General/vtkYoungsMaterialInterface.cxx b/Filters/General/vtkYoungsMaterialInterface.cxx
index 6961734f4a2ca982d205c992d87cb44c0fe10e1c..efd3f837b927e53b896c2ac3fced032d23868a94 100644
--- a/Filters/General/vtkYoungsMaterialInterface.cxx
+++ b/Filters/General/vtkYoungsMaterialInterface.cxx
@@ -887,8 +887,7 @@ int vtkYoungsMaterialInterface::RequestData(vtkInformation* vtkNotUsed(request),
         cell.nEdges = vtkcell->GetNumberOfEdges();
         for (int i = 0; i < cell.nEdges; i++)
         {
-          int tmp[4];
-          int* edgePoints = tmp;
+          const vtkIdType* edgePoints;
           cell3D->GetEdgePoints(i, edgePoints);
           cell.edges[i][0] = edgePoints[0];
           DBG_ASSERT(cell.edges[i][0] >= 0 && cell.edges[i][0] < cell.np);
@@ -1363,8 +1362,7 @@ int vtkYoungsMaterialInterface::RequestData(vtkInformation* vtkNotUsed(request),
                 nextCell.nEdges = vtkcell->GetNumberOfEdges();
                 for (int i = 0; i < nextCell.nEdges; i++)
                 {
-                  int tmp[4];
-                  int* edgePoints = tmp;
+                  const vtkIdType* edgePoints;
                   cell3D->GetEdgePoints(i, edgePoints);
                   nextCell.edges[i][0] = edgePoints[0];
                   DBG_ASSERT(nextCell.edges[i][0] >= 0 && nextCell.edges[i][0] < nextCell.np);
diff --git a/Filters/Geometry/vtkGeometryFilter.cxx b/Filters/Geometry/vtkGeometryFilter.cxx
index 69411689352fe3bb8294c666f5af0bab0dcf3377..3d8c7ad9ca9bc96e206d9367df059e8c784e7a28 100644
--- a/Filters/Geometry/vtkGeometryFilter.cxx
+++ b/Filters/Geometry/vtkGeometryFilter.cxx
@@ -603,7 +603,8 @@ void vtkGeometryFilter::UnstructuredGridExecute(vtkDataSet* dataSetInput, vtkPol
   vtkCellArray *verts, *lines, *polys, *strips;
   vtkIdList *cellIds, *faceIds;
   char* cellVis;
-  int faceId, *faceVerts, numFacePts;
+  int faceId, numFacePts;
+  const vtkIdType* faceVerts;
   double x[3];
   int pixelConvert[4];
   unsigned char* cellGhosts = nullptr;
@@ -1095,7 +1096,8 @@ void vtkGeometryFilter::StructuredGridExecute(
   vtkIdList* cellIds;
   vtkIdList* pts;
   vtkIdType ptId;
-  int *faceVerts, faceId, numFacePts;
+  const vtkIdType* faceVerts;
+  int faceId, numFacePts;
   vtkIdType* facePts;
   vtkPointData* pd = input->GetPointData();
   vtkCellData* cd = input->GetCellData();
diff --git a/Filters/Geometry/vtkUnstructuredGridGeometryFilter.cxx b/Filters/Geometry/vtkUnstructuredGridGeometryFilter.cxx
index 5f51c50160183f54da79e8e97f4face70e0a14b7..85dceadba7cb09f198ad4caa15124f22bd7ff015 100644
--- a/Filters/Geometry/vtkUnstructuredGridGeometryFilter.cxx
+++ b/Filters/Geometry/vtkUnstructuredGridGeometryFilter.cxx
@@ -401,7 +401,7 @@ public:
     vtkIdType points[NumPoints];
     for (int face = FirstFace; face < LastFace; ++face)
     {
-      int* faceIndices = CellType::GetFaceArray(face);
+      const vtkIdType* faceIndices = CellType::GetFaceArray(face);
       for (int pt = 0; pt < NumPoints; ++pt)
       {
         points[pt] = pts[faceIndices[pt]];
diff --git a/Testing/GenericBridge/vtkBridgeCell.cxx b/Testing/GenericBridge/vtkBridgeCell.cxx
index 1ba6f5889217edb146f32a53058180f122aa4ef5..05782cab7ca3bd0233b858335998226970d15117 100644
--- a/Testing/GenericBridge/vtkBridgeCell.cxx
+++ b/Testing/GenericBridge/vtkBridgeCell.cxx
@@ -715,12 +715,12 @@ void vtkBridgeCell::GetPointIds(vtkIdType* id)
 // \pre valid_faceId_range: faceId>=0 && faceId<this->GetNumberOfBoundaries(2)
 // \post result_exists: result!=0
 // \post valid_size: sizeof(result)>=GetNumberOfVerticesOnFace(faceId)
-int* vtkBridgeCell::GetFaceArray(int faceId)
+const vtkIdType* vtkBridgeCell::GetFaceArray(int faceId)
 {
   assert("pre: is_3d" && this->GetDimension() == 3);
   assert("pre: valid_faceId_range" && faceId >= 0 && faceId < this->GetNumberOfBoundaries(2));
 
-  int* result = nullptr;
+  const vtkIdType* result = nullptr;
 
   switch (this->GetType())
   {
@@ -829,8 +829,8 @@ int vtkBridgeCell::GetNumberOfVerticesOnFace(int faceId)
 }
 
 // copy/paste of vtkTriangle.cxx
-static int triangleEdges[3][2] = { { 0, 1 }, { 1, 2 }, { 2, 0 } };
-static int quadEdges[4][2] = { { 0, 1 }, { 1, 2 }, { 3, 2 }, { 0, 3 } };
+static constexpr vtkIdType triangleEdges[3][2] = { { 0, 1 }, { 1, 2 }, { 2, 0 } };
+static constexpr vtkIdType quadEdges[4][2] = { { 0, 1 }, { 1, 2 }, { 3, 2 }, { 0, 3 } };
 
 //----------------------------------------------------------------------------
 // Description:
@@ -839,12 +839,12 @@ static int quadEdges[4][2] = { { 0, 1 }, { 1, 2 }, { 3, 2 }, { 0, 3 } };
 // \pre valid_edgeId_range: edgeId>=0 && edgeId<this->GetNumberOfBoundaries(1)
 // \post result_exists: result!=0
 // \post valid_size: sizeof(result)==2
-int* vtkBridgeCell::GetEdgeArray(int edgeId)
+const vtkIdType* vtkBridgeCell::GetEdgeArray(int edgeId)
 {
   assert("pre: valid_dimension" && this->GetDimension() >= 2);
   assert("pre: valid_faceId_range" && edgeId >= 0 && edgeId < this->GetNumberOfBoundaries(1));
 
-  int* result = nullptr;
+  const vtkIdType* result = nullptr;
 
   switch (this->GetType())
   {
diff --git a/Testing/GenericBridge/vtkBridgeCell.h b/Testing/GenericBridge/vtkBridgeCell.h
index 40c3dac3a99b56835b2659bea1ae0112829a11fd..d5e1716c0ef53639e950af9b04d971d992deb649 100644
--- a/Testing/GenericBridge/vtkBridgeCell.h
+++ b/Testing/GenericBridge/vtkBridgeCell.h
@@ -447,7 +447,7 @@ public:
    * \post result_exists: result!=0
    * \post valid_size: sizeof(result)>=GetNumberOfVerticesOnFace(faceId)
    */
-  int* GetFaceArray(int faceId) override;
+  const vtkIdType* GetFaceArray(int faceId) override;
 
   /**
    * Return the number of vertices defining face `faceId'
@@ -464,7 +464,7 @@ public:
    * \post result_exists: result!=0
    * \post valid_size: sizeof(result)==2
    */
-  int* GetEdgeArray(int edgeId) override;
+  const vtkIdType* GetEdgeArray(int edgeId) override;
 
   /**
    * Used internally for the Bridge.