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

Method LoadUnstructuredBoundsVariable

IO/NetCDF/vtkNetCDFCFReader.cxx:640–660  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

638
639//------------------------------------------------------------------------------
640int vtkNetCDFCFReader::vtkDependentDimensionInfo::LoadUnstructuredBoundsVariable(
641 int ncFD, int varId, vtkDoubleArray* coords)
642{
643 int dimIds[2];
644 CALL_NETCDF_GW(this->Accessor->inq_vardimid(ncFD, varId, dimIds));
645
646 size_t dimSizes[2];
647 for (int i = 0; i < 2; i++)
648 {
649 CALL_NETCDF_GW(this->Accessor->inq_dimlen(ncFD, dimIds[i], &dimSizes[i]));
650 }
651
652 int numVertPerCell = static_cast<int>(dimSizes[1]);
653 vtkIdType numCells = static_cast<vtkIdType>(dimSizes[0]);
654
655 coords->SetNumberOfComponents(numVertPerCell);
656 coords->SetNumberOfTuples(numCells);
657 CALL_NETCDF_GW(this->Accessor->get_var_double(ncFD, varId, coords->GetPointer(0)));
658
659 return 1;
660}
661
662//------------------------------------------------------------------------------
663class vtkNetCDFCFReader::vtkDependentDimensionInfoVector

Callers 1

LoadMetaDataMethod · 0.95

Calls 6

inq_vardimidMethod · 0.45
inq_dimlenMethod · 0.45
SetNumberOfComponentsMethod · 0.45
SetNumberOfTuplesMethod · 0.45
get_var_doubleMethod · 0.45
GetPointerMethod · 0.45

Tested by

no test coverage detected