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

Method GetAMRBlockCellData

IO/AMR/vtkAMRDataSetCache.cxx:95–115  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

93
94//------------------------------------------------------------------------------
95vtkDataArray* vtkAMRDataSetCache::GetAMRBlockCellData(int compositeIdx, const char* dataName)
96{
97 if (this->HasAMRBlockCellData(compositeIdx, dataName))
98 {
99 vtkUniformGrid* amrBlock = this->GetAMRBlock(compositeIdx);
100 assert("pre: AMR block should not be nullptr" && (this->HasAMRBlock(compositeIdx)));
101
102 vtkCellData* CD = amrBlock->GetCellData();
103 assert("pre: CellData should not be nullptr" && (CD != nullptr));
104
105 if (CD->HasArray(dataName))
106 {
107 return CD->GetArray(dataName);
108 }
109 else
110 {
111 return nullptr;
112 }
113 }
114 return nullptr;
115}
116
117//------------------------------------------------------------------------------
118vtkDataArray* vtkAMRDataSetCache::GetAMRBlockPointData(int compositeIdx, const char* dataName)

Callers 1

GetAMRDataMethod · 0.80

Calls 7

HasAMRBlockCellDataMethod · 0.95
GetAMRBlockMethod · 0.95
HasAMRBlockMethod · 0.95
assertFunction · 0.50
GetCellDataMethod · 0.45
HasArrayMethod · 0.45
GetArrayMethod · 0.45

Tested by

no test coverage detected