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

Method GetUnstructuredGridFromBlockPackingZone

IO/Geometry/vtkTecplotReader.cxx:1046–1073  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1044
1045//------------------------------------------------------------------------------
1046void vtkTecplotReader::GetUnstructuredGridFromBlockPackingZone(int numNodes, int numCells,
1047 const char* cellType, int zoneIndx, const char* zoneName, vtkMultiBlockDataSet* multZone)
1048{
1049 if (!cellType || !zoneName || !multZone)
1050 {
1051 vtkErrorMacro(<< "Zone name / cell type un-specified, or nullptr "
1052 << "vtkMultiBlockDataSet object.");
1053 return;
1054 }
1055
1056 vtkPoints* gridPnts = vtkPoints::New();
1057 vtkUnstructuredGrid* unstruct = vtkUnstructuredGrid::New();
1058 this->GetArraysFromBlockPackingZone(
1059 numNodes, numCells, gridPnts, unstruct->GetPointData(), unstruct->GetCellData());
1060 this->GetUnstructuredGridCells(numCells, cellType, unstruct);
1061 unstruct->SetPoints(gridPnts);
1062 gridPnts->Delete();
1063 gridPnts = nullptr;
1064
1065 if ((this->Internal->TopologyDim == 2 || this->Internal->TopologyDim == 3) ||
1066 (this->Internal->TopologyDim == 0 && this->Internal->GeometryDim > 1))
1067 {
1068 multZone->SetBlock(zoneIndx, unstruct);
1069 multZone->GetMetaData(zoneIndx)->Set(vtkCompositeDataSet::NAME(), zoneName);
1070 }
1071 unstruct->Delete();
1072 unstruct = nullptr;
1073}
1074
1075//------------------------------------------------------------------------------
1076void vtkTecplotReader::GetUnstructuredGridFromPointPackingZone(int numNodes, int numCells,

Callers 1

ReadFileMethod · 0.95

Calls 10

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

Tested by

no test coverage detected