Commit ea27bc75 authored by Kenneth Leiter's avatar Kenneth Leiter
Browse files

ENH: Fix ParaView 3.6 bug causing seg faults on grid centered attributes

parent 67ef0612
......@@ -91,7 +91,7 @@
//----------------------------------------------------------------------------
vtkStandardNewMacro(vtkXdmfReader);
vtkCxxRevisionMacro(vtkXdmfReader, "1.66");
vtkCxxRevisionMacro(vtkXdmfReader, "1.67");
//----------------------------------------------------------------------------
vtkCxxSetObjectMacro(vtkXdmfReader,Controller,vtkMultiProcessController);
......@@ -3268,9 +3268,11 @@ int vtkXdmfReaderInternal::RequestGridData(
vtkDebugWithObjectMacro(this->Reader,
"Setting Grid Centered Values");
tmpArray->CopyType( values );
tmpArray->SetNumberOfElements( dataSet->GetNumberOfPoints() );
tmpArray->Generate( values->GetValueAsFloat64(0),
values->GetValueAsFloat64(0) );
tmpArray->SetNumberOfElements( dataSet->GetNumberOfPoints() * Components);
for (int i=0; i<dataSet->GetNumberOfPoints(); i++)
{
tmpArray->SetValues(i * Components, vtkValues->GetTuple(0), Components, 1, 1);
}
vtkValues->Delete();
this->ArrayConverter->SetVtkArray( NULL );
vtkValues=this->ArrayConverter->FromXdmfArray(tmpArray->GetTagName(), 1, 1, Components, 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