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

Method SumOutputCounts

Filters/CellGrid/vtkUnstructuredGridToCellGrid.cxx:103–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103bool vtkUnstructuredGridToCellGrid::TranscribeQuery::SumOutputCounts()
104{
105 bool allCellsClaimed = true;
106 this->OutputAllocations.clear();
107 for (const auto& entry : this->CellTypeMap)
108 {
109 if (entry.second.NumberOfCells > 0)
110 {
111 if (entry.second.CellType.IsValid())
112 {
113 this->OutputAllocations[entry.second.CellType] += entry.second.NumberOfCells;
114 // clang-format off
115 vtkLogF(TRACE, "Entry %zu += %lld for '%s' (%x)",
116 this->OutputAllocations.size(),
117 static_cast<long long>(entry.second.NumberOfCells),
118 entry.second.CellType.Data().c_str(),
119 entry.second.CellType.GetId());
120 // clang-format on
121 }
122 else
123 {
124 // clang-format off
125 vtkLogF(TRACE, "No allocations for %llu cells of type %lu",
126 static_cast<unsigned long long>(entry.second.NumberOfCells),
127 static_cast<unsigned long>(entry.first));
128 // clang-format on
129 allCellsClaimed = false;
130 }
131 }
132 }
133 vtkLogF(TRACE, "%zu types with allocations", this->OutputAllocations.size());
134 return allCellsClaimed;
135}
136
137void vtkUnstructuredGridToCellGrid::TranscribeQuery::AddCellAttributes(
138 vtkDataSetAttributes* attributes)

Callers 1

Calls 6

clearMethod · 0.45
IsValidMethod · 0.45
sizeMethod · 0.45
c_strMethod · 0.45
DataMethod · 0.45
GetIdMethod · 0.45

Tested by

no test coverage detected