MCPcopy Create free account
hub / github.com/Kitware/VTK / SetTimeInformation

Method SetTimeInformation

IO/Geometry/vtkOpenFOAMReader.cxx:11566–11587  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

11564
11565//------------------------------------------------------------------------------
11566void vtkOpenFOAMReader::SetTimeInformation(
11567 vtkInformationVector* outputVector, vtkDoubleArray* timeValues)
11568{
11569 const vtkIdType nTimes = timeValues->GetNumberOfTuples();
11570 vtkInformation* outInfo = outputVector->GetInformationObject(0);
11571
11572 double timeRange[2];
11573 if (nTimes)
11574 {
11575 timeRange[0] = timeValues->GetValue(0);
11576 timeRange[1] = timeValues->GetValue(nTimes - 1);
11577
11578 outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(), timeValues->GetPointer(0),
11579 static_cast<int>(nTimes));
11580 }
11581 else
11582 {
11583 timeRange[0] = timeRange[1] = 0.0;
11584 outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(), timeRange, 0);
11585 }
11586 outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(), timeRange, 2);
11587}
11588
11589//------------------------------------------------------------------------------
11590int vtkOpenFOAMReader::MakeInformationVector(vtkInformationVector* outputVector,

Callers 1

MakeInformationVectorMethod · 0.95

Calls 5

GetInformationObjectMethod · 0.80
GetNumberOfTuplesMethod · 0.45
GetValueMethod · 0.45
SetMethod · 0.45
GetPointerMethod · 0.45

Tested by

no test coverage detected