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

Method GetObjectArrayIndex

IO/Exodus/vtkExodusIIReader.cxx:6117–6141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6115}
6116
6117int vtkExodusIIReader::GetObjectArrayIndex(int objectType, const char* arrayName)
6118{
6119 if (!arrayName)
6120 {
6121 vtkErrorMacro("You must specify a non-nullptr name");
6122 return -1;
6123 }
6124 int nObj = this->GetNumberOfObjectArrays(objectType);
6125 if (nObj == 0)
6126 {
6127 vtkDebugMacro("No objects of that type (" << objectType << ") to find index for given array "
6128 << arrayName << ".");
6129 return -1;
6130 }
6131 for (int obj = 0; obj < nObj; ++obj)
6132 {
6133 if (!strcmp(arrayName, this->GetObjectArrayName(objectType, obj)))
6134 {
6135 return obj;
6136 }
6137 }
6138 vtkDebugMacro(
6139 "No arrays named \"" << arrayName << "\" of the specified type (" << objectType << ").");
6140 return -1;
6141}
6142
6143vtkIdType vtkExodusIIReader::GetTotalNumberOfNodes()
6144{

Callers 3

SetObjectArrayStatusMethod · 0.95
GetVariableIDMethod · 0.95
GetObjectArrayStatusFunction · 0.80

Calls 2

GetObjectArrayNameMethod · 0.80

Tested by

no test coverage detected