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

Method RequestInformation

IO/NetCDF/vtkMPASReader.cxx:1041–1122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1039//------------------------------------------------------------------------------
1040
1041int vtkMPASReader::RequestInformation(
1042 vtkInformation* reqInfo, vtkInformationVector** inVector, vtkInformationVector* outVector)
1043{
1044 vtkDebugMacro(<< "In vtkMPASReader::RequestInformation" << endl);
1045
1046 this->ReleaseNcData();
1047
1048 if (!this->Superclass::RequestInformation(reqInfo, inVector, outVector))
1049 {
1050 return 0;
1051 }
1052
1053 // Verify that file exists
1054 if (!this->FileName)
1055 {
1056 vtkErrorMacro("No filename specified");
1057 return 0;
1058 }
1059
1060 // Get ParaView information pointer
1061 vtkInformation* outInfo = outVector->GetInformationObject(0);
1062
1063 if (!this->Internals->open(this->FileName))
1064 {
1065 vtkErrorMacro(<< "Couldn't open file: " << this->FileName << endl);
1066 this->ReleaseNcData();
1067 return 0;
1068 }
1069
1070 if (!this->GetNcDims())
1071 {
1072 this->ReleaseNcData();
1073 return 0;
1074 }
1075
1076 if (!this->GetNcAtts())
1077 {
1078 this->ReleaseNcData();
1079 return 0;
1080 }
1081
1082 if (!this->CheckParams())
1083 {
1084 this->ReleaseNcData();
1085 return 0;
1086 }
1087
1088 if (!this->BuildVarArrays())
1089 {
1090 this->ReleaseNcData();
1091 return 0;
1092 }
1093
1094 // Collect temporal information
1095
1096 // At this time, MPAS doesn't have fine-grained time value, just
1097 // the number of the step, so that is what I store here for TimeSteps.
1098 if (this->NumberOfTimeSteps > 0)

Callers

nothing calls this directly

Calls 13

ReleaseNcDataMethod · 0.95
GetNcDimsMethod · 0.95
GetNcAttsMethod · 0.95
CheckParamsMethod · 0.95
BuildVarArraysMethod · 0.95
GetInformationObjectMethod · 0.80
openMethod · 0.45
reserveMethod · 0.45
push_backMethod · 0.45
SetMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected