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

Method GetUnstructuredGridFromPointPackingZone

IO/Geometry/vtkTecplotReader.cxx:1076–1102  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1074
1075//------------------------------------------------------------------------------
1076void vtkTecplotReader::GetUnstructuredGridFromPointPackingZone(int numNodes, int numCells,
1077 const char* cellType, int zoneIndx, const char* zoneName, vtkMultiBlockDataSet* multZone)
1078{
1079 if (!cellType || !zoneName || !multZone)
1080 {
1081 vtkErrorMacro(<< "Zone name / cell type un-specified, or nullptr "
1082 << "vtkMultiBlockDataSet object.");
1083 return;
1084 }
1085
1086 vtkPoints* gridPnts = vtkPoints::New();
1087 vtkUnstructuredGrid* unstruct = vtkUnstructuredGrid::New();
1088 this->GetArraysFromPointPackingZone(numNodes, gridPnts, unstruct->GetPointData());
1089 this->GetUnstructuredGridCells(numCells, cellType, unstruct);
1090 unstruct->SetPoints(gridPnts);
1091 gridPnts->Delete();
1092 gridPnts = nullptr;
1093
1094 if ((this->Internal->TopologyDim == 2 || this->Internal->TopologyDim == 3) ||
1095 (this->Internal->TopologyDim == 0 && this->Internal->GeometryDim > 1))
1096 {
1097 multZone->SetBlock(zoneIndx, unstruct);
1098 multZone->GetMetaData(zoneIndx)->Set(vtkCompositeDataSet::NAME(), zoneName);
1099 }
1100 unstruct->Delete();
1101 unstruct = nullptr;
1102}
1103
1104void vtkTecplotReader::GetPolyhedralGridCells(
1105 int numCells, int numFaces, vtkUnstructuredGrid* unstruct) const

Callers 1

ReadFileMethod · 0.95

Calls 9

SetBlockMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
GetPointDataMethod · 0.45
SetPointsMethod · 0.45
SetMethod · 0.45
GetMetaDataMethod · 0.45

Tested by

no test coverage detected