--- vtk-5.4.2.orig/IO/vtkPLOT3DReader.cxx
+++ vtk-5.4.2/IO/vtkPLOT3DReader.cxx
@@ -28,9 +28,11 @@
 vtkCxxRevisionMacro(vtkPLOT3DReader, "$Revision: 1.89 $");
 vtkStandardNewMacro(vtkPLOT3DReader);
 
+// density, sound speed, and pressure at infinity
 #define VTK_RHOINF 1.0
 #define VTK_CINF 1.0
-#define VTK_PINF ((VTK_RHOINF*VTK_CINF) * (VTK_RHOINF*VTK_CINF) / this->Gamma)
+#define VTK_PINF ((VTK_RHOINF*VTK_CINF) * (VTK_CINF) / this->Gamma)
+// constant-volume specific heat
 #define VTK_CV (this->R / (this->Gamma-1.0))
 
 vtkPLOT3DReader::vtkPLOT3DReader()
@@ -250,16 +252,16 @@
 // Estimate the size of a grid (binary file only)
 long vtkPLOT3DReader::EstimateSize(int ni, int nj, int nk)
 {
-  long size; // the header portion, 3 ints
+  long size;
   if (!this->TwoDimensionalGeometry)
     {
-    size = 3*4;
+    size = 3*4; // the header portion, 3 ints
     size += ni*nj*nk*3*4; // x, y, z
     }
   else
     {
-    size = 2*4;
-    size += ni*nj*nk*2*4; // x, y, z
+    size = 2*4; // the header portion, 2 ints
+    size += ni*nj*nk*2*4; // x, y
     }
   if (this->HasByteCount)
     {
@@ -363,13 +365,13 @@
 
   if (!verify)
     {
-    // We were told not the verify the number of grid. Just return it.
+    // We were told not to verify the number of grids. Just return it.
     numOutputs = numGrid;
     }
   else
     {
     // We were told to make sure that the file can really contain
-    // the number of grid in the header (we can only check this
+    // the number of grids in the header (we can only check this
     // if file is binary)
     int error=0;
     if ( this->BinaryFile )
@@ -523,6 +525,10 @@
       {
       this->ReadIntBlock(fp, 1, &nk);
       }
+    else
+      {
+      nk = 1;
+      }
     vtkDebugMacro("Q, block " << i << " dimensions: "
                   << ni << " " << nj << " " << nk);
 
@@ -1370,9 +1376,7 @@
   vtkPointData* outputPD = output->GetPointData();
   vtkDataArray* density = outputPD->GetArray("Density");
   vtkDataArray* momentum = outputPD->GetArray("Momentum");
-  vtkDataArray* energy = outputPD->GetArray("StagnationEnergy");
-  if ( density == NULL || momentum == NULL ||
-       energy == NULL )
+  if ( density == NULL || momentum == NULL )
     {
     vtkErrorMacro(<<"Cannot compute velocity magnitude");
     return;
@@ -1521,9 +1525,7 @@
   vtkPointData* outputPD = output->GetPointData();
   vtkDataArray* density = outputPD->GetArray("Density");
   vtkDataArray* momentum = outputPD->GetArray("Momentum");
-  vtkDataArray* energy = outputPD->GetArray("StagnationEnergy");
-  if ( density == NULL || momentum == NULL ||
-       energy == NULL )
+  if ( density == NULL || momentum == NULL )
     {
     vtkErrorMacro(<<"Cannot compute velocity");
     return;
@@ -1572,10 +1574,8 @@
   vtkPointData* outputPD = output->GetPointData();
   vtkDataArray* density = outputPD->GetArray("Density");
   vtkDataArray* momentum = outputPD->GetArray("Momentum");
-  vtkDataArray* energy = outputPD->GetArray("StagnationEnergy");
   if ( (points=output->GetPoints()) == NULL || 
-       density == NULL || momentum == NULL || 
-       energy == NULL )
+       density == NULL || momentum == NULL )
     {
     vtkErrorMacro(<<"Cannot compute vorticity");
     return;
@@ -1972,7 +1972,7 @@
         //  Now calculate the Jacobian.  Grids occasionally have
         //  singularities, or points where the Jacobian is infinite (the
         //  inverse is zero).  For these cases, we'll set the Jacobian to
-        //  zero, which will result in a zero vorticity.
+        //  zero, which will result in a zero pressure gradient.
         //
         aj =  xxi*yeta*zzeta+yxi*zeta*xzeta+zxi*xeta*yzeta
               -zxi*yeta*xzeta-yxi*xeta*zzeta-xxi*zeta*yzeta;
@@ -1996,7 +1996,7 @@
         zetay= -aj*(xxi*zeta-zxi*xeta);
         zetaz=  aj*(xxi*yeta-yxi*xeta);
 
-        //  Finally, the vorticity components.
+        //  Finally, the pressure gradient components.
         g[0]= xix*pxi+etax*peta+zetax*pzeta;
         g[1]= xiy*pxi+etay*peta+zetay*pzeta;
         g[2]= xiz*pxi+etaz*peta+zetaz*pzeta;
