| 1254 | Ioss::Region& region, const std::string& blockName) const = 0; |
| 1255 | |
| 1256 | void DefineModel(Ioss::Region& region) const override |
| 1257 | { |
| 1258 | for (const auto& element : this->ElementCounts) |
| 1259 | { |
| 1260 | const int64_t elementCount = element.second; |
| 1261 | const unsigned char vtk_cell_type = element.first; |
| 1262 | |
| 1263 | const Ioss::ElementTopology* elementTopology = nullptr; |
| 1264 | try |
| 1265 | { |
| 1266 | elementTopology = vtkIOSSUtilities::GetElementTopology(vtk_cell_type); |
| 1267 | } |
| 1268 | catch (std::runtime_error&) |
| 1269 | { |
| 1270 | continue; |
| 1271 | } |
| 1272 | const auto& elementType = elementTopology->name(); |
| 1273 | const auto blockInfo = this->GetSubElementBlockInfo(vtk_cell_type, elementType); |
| 1274 | |
| 1275 | auto entityBlock = |
| 1276 | this->CreateEntity(region.get_database(), blockInfo.second, elementType, elementCount); |
| 1277 | entityBlock->property_add(Ioss::Property("id", blockInfo.first)); |
| 1278 | if (this->Writer->GetPreserveOriginalIds()) |
| 1279 | { |
| 1280 | entityBlock->property_add( |
| 1281 | Ioss::Property("original_id", this->BlockId, Ioss::Property::ATTRIBUTE)); |
| 1282 | } |
| 1283 | this->AddEntity(region, entityBlock); |
| 1284 | } |
| 1285 | } |
| 1286 | |
| 1287 | void DefineTransient(Ioss::Region& region) const override |
| 1288 | { |
nothing calls this directly
no test coverage detected