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

Method vtkNodeSet

IO/IOSS/vtkIOSSModel.cxx:1661–1687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 6

GetGlobalIdsMethod · 0.80
GetFieldsFunction · 0.70
assertFunction · 0.50
GetPointDataMethod · 0.45
GetNumberOfPointsMethod · 0.45
GetNumberOfTuplesMethod · 0.45

Tested by

no test coverage detected