Commit d8668a8f authored by bonnell's avatar bonnell
Browse files

Fix reading of pvti data. Resolves #2286.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@31510 18c085ea-50e0-402c-830e-de6fd14e8384
parent f93711d5
......@@ -1655,6 +1655,9 @@ GetListOfUniqueCellTypes(vtkUnstructuredGrid *ug, vtkUnsignedCharArray *uca)
// Kathleen Biagas, Fri Nov 1 13:27:44 PDT 2013
// Changed pieceOrigin from int to double to prevent truncating.
//
// Kathleen Biagas, Thu Sep 14 13:45:00 PDT 2017
// Take the quick copy-array route when pieceDims == wholeDims.
//
// ****************************************************************************
vtkDataSet *
......@@ -1670,6 +1673,7 @@ avtVTKFileReader::ConvertStructuredPointsToRGrid(vtkStructuredPoints *inSP,
int pieceDims[3];
double pieceOrigin[3];
bool pieceEqualWhole = false;
if (extents == NULL)
{
pieceDims[0] = wholeDims[0];
......@@ -1678,6 +1682,7 @@ avtVTKFileReader::ConvertStructuredPointsToRGrid(vtkStructuredPoints *inSP,
pieceOrigin[0] = wholeOrigin[0];
pieceOrigin[1] = wholeOrigin[1];
pieceOrigin[2] = wholeOrigin[2];
pieceEqualWhole = true;
}
else
{
......@@ -1687,6 +1692,10 @@ avtVTKFileReader::ConvertStructuredPointsToRGrid(vtkStructuredPoints *inSP,
pieceOrigin[0] = wholeOrigin[0] + extents[0] * spacing[0];
pieceOrigin[1] = wholeOrigin[1] + extents[2] * spacing[1];
pieceOrigin[2] = wholeOrigin[2] + extents[4] * spacing[2];
pieceEqualWhole = (wholeDims[0] == pieceDims[0]) &&
(wholeDims[1] == pieceDims[1]) &&
(wholeDims[2] == pieceDims[2]);
}
vtkFloatArray *x = vtkFloatArray::New();
......@@ -1721,7 +1730,7 @@ avtVTKFileReader::ConvertStructuredPointsToRGrid(vtkStructuredPoints *inSP,
for (i = 0; i < pieceDims[2]; i++, ptr++)
*ptr = pieceOrigin[2] + i * spacing[2];
if (extents == NULL)
if (extents == NULL || pieceEqualWhole)
{
for (i = 0; i < inSP->GetPointData()->GetNumberOfArrays(); i++)
outRG->GetPointData()->AddArray(inSP->GetPointData()->GetArray(i));
......
......@@ -55,7 +55,7 @@ enhancements and bug-fixes that were added to this release.</p>
<p><b><font size="4">File format reader changes in version 2.13</font></b></p>
<ul>
<li>EnSight reader was modified to handle variables not defined on all parts. Part descriptions are now used to fill out the SIL. Particles supplied in measured files are now supported as a separate mesh.</li>
<li>File Format 2</li>
<li>The VTK reader was modified to fix a bug reading .pvti data.</li>
</ul>
<a name="Plot_changes"></a>
......
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