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

Method GetTimeOfCurrentStep

IO/Fides/vtkFidesReader.cxx:601–628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

599}
600
601double vtkFidesReader::GetTimeOfCurrentStep()
602{
603 if (!this->StreamSteps)
604 {
605 vtkErrorMacro("GetTimeOfCurrentStep() can only be called in streaming mode");
606 return 0.0;
607 }
608
609 if (this->Impl->NumberOfDataSources == 0)
610 {
611 this->Impl->SetNumberOfDataSources();
612 }
613
614 if (!this->Impl->HasParsedDataModel)
615 {
616 vtkErrorMacro(<< "data model has not been parsed");
617 return 0.0;
618 }
619
620 auto metaData = this->Impl->Reader->ReadMetaData(this->Impl->Paths);
621 if (metaData.Has(fides::keys::TIME_VALUE()))
622 {
623 return metaData.Get<fides::metadata::Time>(fides::keys::TIME_VALUE()).Data;
624 }
625
626 vtkErrorMacro(<< "Couldn't grab the time from the Fides metadata");
627 return 0.0;
628}
629
630int vtkFidesReader::RequestData(
631 vtkInformation*, vtkInformationVector**, vtkInformationVector* outputVector)

Callers

nothing calls this directly

Calls 4

TIME_VALUEFunction · 0.85
ReadMetaDataMethod · 0.45
HasMethod · 0.45

Tested by

no test coverage detected