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

Method SetObjectArrayStatus

IO/Exodus/vtkExodusIIReader.cxx:5027–5061  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5025}
5026
5027void vtkExodusIIReaderPrivate::SetObjectArrayStatus(int otyp, int i, int stat)
5028{
5029 stat = (stat != 0); // Force stat to be either 0 or 1
5030 std::map<int, std::vector<ArrayInfoType>>::iterator it = this->ArrayInfo.find(otyp);
5031 if (it != this->ArrayInfo.end())
5032 {
5033 int N = (int)it->second.size();
5034 if (i < 0 || i >= N)
5035 {
5036 vtkDebugMacro("You requested array " << i << " in a collection of only " << N << " arrays.");
5037 return;
5038 }
5039 if (it->second[i].Status == stat)
5040 {
5041 // no change => do nothing
5042 return;
5043 }
5044 it->second[i].Status = stat;
5045 this->Modified();
5046 // FIXME: Mark something so we know what's changed since the last RequestData?!
5047 // For the "global" (assembled) array, this is tricky because we really only want
5048 // to invalidate a range of the total array... For now, we'll just force the "global"
5049 // array to be reassembled even if it does mean a lot more copying -- it's not like
5050 // it was any faster before.
5051 // vtkExodusIICacheKey key( 0, GLOBAL, 0, i );
5052 // vtkExodusIICacheKey pattern( 0, 1, 0, 1 );
5053 this->Cache->Invalidate(
5054 vtkExodusIICacheKey(0, vtkExodusIIReader::GLOBAL, otyp, i), vtkExodusIICacheKey(0, 1, 1, 1));
5055 }
5056 else
5057 {
5058 vtkDebugMacro("Could not find collection of arrays for objects of type "
5059 << otyp << " (" << objtype_names[this->GetObjectTypeIndexFromObjectType(otyp)] << ").");
5060 }
5061}
5062
5063void vtkExodusIIReaderPrivate::SetInitialObjectArrayStatus(
5064 int objectType, const char* arrayName, int status)

Callers 15

SetEdgeResultArrayStatusFunction · 0.80
SetFaceResultArrayStatusFunction · 0.80
SetAllArrayStatusMethod · 0.80
readExodusCopyFunction · 0.80

Calls 10

ModifiedMethod · 0.95
GetObjectArrayIndexMethod · 0.95
vtkExodusIICacheKeyFunction · 0.85
findMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
InvalidateMethod · 0.45

Tested by 3

readExodusCopyFunction · 0.64
TestResampleWithDataSet2Function · 0.64