Commit ea532fa5 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Expose mode-shape-range meta-data to downstream filters.

Filters downstream from vtkExodusIIReader has access to mode_shape in
FieldData, but there was no way of getting information for the range of
the mode shapes. This changes added support for a new "mode_shape_range"
array that provides this meta-data.

Also adding "mode_shape" and "mode_shape_range" arrays only when
HasModeShapes is true. Otherwise, these variables are meaningless.
parent 636fc932
......@@ -1010,6 +1010,7 @@ int vtkExodusIIReaderPrivate::AssembleOutputGlobalArrays(
}
// Add mode_shape/time_step
if (this->HasModeShapes)
{
vtkNew<vtkIntArray> dataIndexArray;
dataIndexArray->SetName("mode_shape");
......@@ -1018,6 +1019,14 @@ int vtkExodusIIReaderPrivate::AssembleOutputGlobalArrays(
// mode-shape == (timestep + 1). See vtkExodusIIReader::SetModeShape().
dataIndexArray->SetValue(0, (timeStep + 1));
ofieldData->AddArray(dataIndexArray.GetPointer());
vtkNew<vtkIntArray> modeShapeRange;
modeShapeRange->SetName("mode_shape_range");
modeShapeRange->SetNumberOfComponents(2);
modeShapeRange->SetNumberOfTuples(1);
modeShapeRange->SetValue(0, this->Parent->GetModeShapesRange()[0]);
modeShapeRange->SetValue(1, this->Parent->GetModeShapesRange()[1]);
ofieldData->AddArray(modeShapeRange.GetPointer());
}
vtkExodusIICacheKey infokey( -1, vtkExodusIIReader::INFO_RECORDS, 0, 0 );
......
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