Commit 2bbc674a authored by Chris Harris's avatar Chris Harris
Browse files

Update vtkXdmf<Reader|Writer> to work with VTK changes


Suggested-By: default avatarYuanxin Liu <leo.liu@kitware.com>
parent 410831ab
......@@ -405,7 +405,7 @@ int vtkXdmfReader::RequestData(vtkInformation *, vtkInformationVector **,
{
double time =
this->XdmfDocument->GetActiveDomain()->GetTimeForIndex(this->LastTimeIndex);
output->GetInformation()->Set(vtkDataObject::DATA_TIME_STEPS(), &time, 1);
output->GetInformation()->Set(vtkDataObject::DATA_TIME_STEP(), time);
}
return 1;
}
......@@ -413,11 +413,11 @@ int vtkXdmfReader::RequestData(vtkInformation *, vtkInformationVector **,
//----------------------------------------------------------------------------
int vtkXdmfReader::ChooseTimeStep(vtkInformation* outInfo)
{
if (outInfo->Has(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS()))
if (outInfo->Has(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP()))
{
// we do not support multiple timestep requests.
double time =
outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS())[0];
outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP());
return this->XdmfDocument->GetActiveDomain()->GetIndexForTime(time);
}
......
......@@ -310,8 +310,8 @@ int vtkXdmfWriter::RequestUpdateExtent(
//but that is annoying.
double timeReq = inTimes[this->CurrentTimeIndex];
inputVector[0]->GetInformationObject(0)->Set(
vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS(),
&timeReq, 1);
vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP(),
timeReq);
}
return 1;
......@@ -371,16 +371,16 @@ int vtkXdmfWriter::RequestData(
vtkInformation* inInfo = inputVector[0]->GetInformationObject(0);
vtkDataObject* input = inInfo->Get(vtkDataObject::DATA_OBJECT());
vtkInformation *inDataInfo = input->GetInformation();
if (inDataInfo->Has(vtkDataObject::DATA_TIME_STEPS()))
if (inDataInfo->Has(vtkDataObject::DATA_TIME_STEP()))
{
//I am assuming we are not given a temporal data object and getting just one time.
double *dataT = input->GetInformation()->Get(vtkDataObject::DATA_TIME_STEPS());
double dataT = input->GetInformation()->Get(vtkDataObject::DATA_TIME_STEP());
//cerr << "Writing " << this->CurrentTimeIndex << " " << *dataT << endl;
XdmfTime *xT = grid->GetTime();
xT->SetDeleteOnGridDelete(true);
xT->SetTimeType(XDMF_TIME_SINGLE);
xT->SetValue(*dataT);
xT->SetValue(dataT);
grid->Insert(xT);
}
......
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