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

Method InsertAMRBlockCellData

IO/AMR/vtkAMRDataSetCache.cxx:73–92  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

71
72//------------------------------------------------------------------------------
73void vtkAMRDataSetCache::InsertAMRBlockCellData(int compositeIdx, vtkDataArray* dataArray)
74{
75 assert("pre: AMR array is nullptr" && (dataArray != nullptr));
76 assert("pre: AMR block is cached" && (this->HasAMRBlock(compositeIdx)));
77
78 vtkTimerLog::MarkStartEvent("AMRCache::InsertAMRBlockCellData");
79
80 vtkUniformGrid* amrBlock = this->GetAMRBlock(compositeIdx);
81 assert("pre: AMR block should not be nullptr" && (this->HasAMRBlock(compositeIdx)));
82
83 vtkCellData* CD = amrBlock->GetCellData();
84 assert("pre: CellData should not be nullptr" && (CD != nullptr));
85
86 if (!CD->HasArray(dataArray->GetName()))
87 {
88 CD->AddArray(dataArray);
89 }
90
91 vtkTimerLog::MarkEndEvent("AMRCache::InsertAMRBlockCellData");
92}
93
94//------------------------------------------------------------------------------
95vtkDataArray* vtkAMRDataSetCache::GetAMRBlockCellData(int compositeIdx, const char* dataName)

Callers 1

GetAMRDataMethod · 0.80

Calls 7

HasAMRBlockMethod · 0.95
GetAMRBlockMethod · 0.95
assertFunction · 0.50
GetCellDataMethod · 0.45
HasArrayMethod · 0.45
GetNameMethod · 0.45
AddArrayMethod · 0.45

Tested by

no test coverage detected