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

Method GetNumberOfCellsSubfile

IO/HDF/vtkHDFWriterImplementation.cxx:1196–1218  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1194
1195//------------------------------------------------------------------------------
1196hsize_t vtkHDFWriter::Implementation::GetNumberOfCellsSubfile(const std::string& basePath,
1197 std::size_t subfileId, hsize_t part, bool isPolyData, const std::string& groupName)
1198{
1199 if (!isPolyData)
1200 {
1201 return this->GetSubfileNumberOf(basePath, PATH::NUMBER_OF_CELLS, subfileId, part);
1202 }
1203
1204 if (isPolyData && groupName.find(PATH::CELL_DATA) != std::string::npos)
1205 {
1206 // Sum up the number of cells for each primitive type
1207 return std::accumulate(PrimitiveNames.begin(), PrimitiveNames.end(), 0,
1208 [this, subfileId, part, basePath](vtkIdType sum, std::string prim)
1209 {
1210 return sum +
1211 this->GetSubfileNumberOf(basePath, prim + "/" + PATH::NUMBER_OF_CELLS, subfileId, part);
1212 });
1213 }
1214 else
1215 {
1216 return this->GetSubfileNumberOf(groupName, PATH::NUMBER_OF_CELLS, subfileId, part);
1217 }
1218}
1219
1220//------------------------------------------------------------------------------
1221std::string vtkHDFWriter::Implementation::GetBasePath(const std::string& fullPath)

Callers 1

CreateVirtualDatasetMethod · 0.95

Calls 4

GetSubfileNumberOfMethod · 0.95
findMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected