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

Method GetSubElementBlockInfo

IO/IOSS/vtkIOSSModel.cxx:1231–1246  ·  view source on GitHub ↗

* Get the block name and id of a given element in a block. */

Source from the content-addressed store, hash-verified

1229 * Get the block name and id of a given element in a block.
1230 */
1231 std::pair<int, std::string> GetSubElementBlockInfo(
1232 unsigned char vtkCellType, std::string elementType) const
1233 {
1234 const bool preservedStructure = this->ElementCounts.size() == 1;
1235 if (preservedStructure)
1236 {
1237 return std::make_pair(this->BlockId, this->RootName);
1238 }
1239 else
1240 {
1241 const int splitElementBlockId =
1242 this->StartSplitElementBlockId + static_cast<int>(vtkCellType);
1243 const std::string blockName = this->RootName + "_" + elementType;
1244 return std::make_pair(splitElementBlockId, blockName);
1245 }
1246 }
1247
1248 virtual Ioss::EntityBlock* CreateEntity(Ioss::DatabaseIO* db, const std::string& blockName,
1249 const std::string& elementType, int64_t elementCount) const = 0;

Callers 4

DefineModelMethod · 0.95
DefineTransientMethod · 0.95
ModelMethod · 0.95
TransientMethod · 0.95

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected