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

Method RequestData

Filters/Sources/vtkDiagonalMatrixSource.cxx:61–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59//------------------------------------------------------------------------------
60
61int vtkDiagonalMatrixSource::RequestData(
62 vtkInformation*, vtkInformationVector**, vtkInformationVector* outputVector)
63{
64 if (this->Extents < 1)
65 {
66 vtkErrorMacro(<< "Invalid matrix extents: " << this->Extents << "x" << this->Extents
67 << " array is not supported.");
68 return 0;
69 }
70
71 vtkArray* array = nullptr;
72 switch (this->ArrayType)
73 {
74 case DENSE:
75 array = this->GenerateDenseArray();
76 break;
77 case SPARSE:
78 array = this->GenerateSparseArray();
79 break;
80 default:
81 vtkErrorMacro(<< "Invalid array type: " << this->ArrayType << ".");
82 return 0;
83 }
84
85 vtkArrayData* const output = vtkArrayData::GetData(outputVector);
86 output->ClearArrays();
87 output->AddArray(array);
88 array->Delete();
89
90 return 1;
91}
92
93vtkArray* vtkDiagonalMatrixSource::GenerateDenseArray()
94{

Callers

nothing calls this directly

Calls 6

GenerateDenseArrayMethod · 0.95
GenerateSparseArrayMethod · 0.95
DeleteMethod · 0.65
GetDataFunction · 0.50
ClearArraysMethod · 0.45
AddArrayMethod · 0.45

Tested by

no test coverage detected