| 1659 | std::vector<std::tuple<std::string, Ioss::Field::BasicType, int>> Fields; |
| 1660 | |
| 1661 | vtkNodeSet(vtkPartitionedDataSet* pds, const std::string& name, int blockId, |
| 1662 | vtkMultiProcessController* controller, vtkIOSSWriter* writer) |
| 1663 | : vtkGroupingEntity(writer) |
| 1664 | , DataSets{ vtkCompositeDataSet::GetDataSets<vtkDataSet>(pds) } |
| 1665 | , Name(name) |
| 1666 | , BlockId(blockId) |
| 1667 | , Count(0) |
| 1668 | { |
| 1669 | for (auto& ds : this->DataSets) |
| 1670 | { |
| 1671 | auto* gids = vtkIdTypeArray::SafeDownCast(ds->GetPointData()->GetGlobalIds()); |
| 1672 | if (!gids && ds->GetNumberOfPoints() != 0) |
| 1673 | { |
| 1674 | throw std::runtime_error("missing point global IDs for nodesets."); |
| 1675 | } |
| 1676 | const auto numPoints = ds->GetNumberOfPoints(); |
| 1677 | if (gids) |
| 1678 | { |
| 1679 | assert(gids->GetNumberOfTuples() == numPoints); |
| 1680 | } |
| 1681 | this->Count += numPoints; |
| 1682 | } |
| 1683 | |
| 1684 | // in a nodeSet, number of points == number of cells, because cells are vertices |
| 1685 | this->Fields = ::GetFields(vtkDataObject::CELL, writer->GetChooseFieldsToWrite(), |
| 1686 | writer->GetNodeSetFieldSelection(), pds, controller); |
| 1687 | } |
| 1688 | |
| 1689 | vtkIOSSWriter::EntityType GetEntityType() const override |
| 1690 | { |
nothing calls this directly
no test coverage detected