Commit 8ccb3ad8 authored by Jerry Clarke's avatar Jerry Clarke
Browse files

fix for dimension[x] = 1

parent d3fc525d
......@@ -90,7 +90,7 @@
//----------------------------------------------------------------------------
vtkStandardNewMacro(vtkXdmfReader);
vtkCxxRevisionMacro(vtkXdmfReader, "1.62");
vtkCxxRevisionMacro(vtkXdmfReader, "1.63");
//----------------------------------------------------------------------------
vtkCxxSetObjectMacro(vtkXdmfReader,Controller,vtkMultiProcessController);
......@@ -1784,9 +1784,9 @@ int vtkXdmfReaderInternal::RequestGridInformation(
Dimensions[i] = 1;
}
// End Extent is Dim - 1
EndExtent[0] = Dimensions[0] - 1;
EndExtent[1] = Dimensions[1] - 1;
EndExtent[2] = Dimensions[2] - 1;
EndExtent[0] = vtkMAX(0, Dimensions[0] - 1);
EndExtent[1] = vtkMAX(0, Dimensions[1] - 1);
EndExtent[2] = vtkMAX(0, Dimensions[2] - 1);
// vtk Dims are i,j,k XDMF are k,j,i
EndExtent[0] = vtkMAX(0, EndExtent[0]) / readerStride[2];
EndExtent[1] = vtkMAX(0, EndExtent[1]) / readerStride[1];
......@@ -2209,9 +2209,9 @@ int vtkXdmfReaderInternal::RequestGridData(
start[1] = vtkMAX(0, upext[2]);
start[0] = vtkMAX(0, upext[4]);
count[2] = upext[1] - upext[0];
count[1] = upext[3] - upext[2];
count[0] = upext[5] - upext[4];
count[2] = vtkMAX(1, upext[1] - upext[0]);
count[1] = vtkMAX(1, upext[3] - upext[2]);
count[0] = vtkMAX(1, upext[5] - upext[4]);
}
XdmfGeometry *Geometry = xdmfGrid->GetGeometry();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment