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

Method FillArrays

IO/NetCDF/vtkNetCDFUGRIDReader.cxx:665–700  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

663
664//--------------------------------------------------------------------------------------------------
665bool vtkNetCDFUGRIDReader::FillArrays(vtkUnstructuredGrid* output, std::size_t timeStep)
666{
667 for (std::size_t i = 0; i < this->FaceArrayVarIds.size(); ++i)
668 {
669 if (!this->CellDataArraySelection->GetArraySetting(static_cast<int>(i)))
670 {
671 continue;
672 }
673
674 const auto array(this->GetArrayData(this->FaceArrayVarIds[i], timeStep, this->FaceCount));
675 if (!array)
676 {
677 return false;
678 }
679
680 output->GetCellData()->AddArray(array);
681 }
682
683 for (std::size_t i = 0; i < this->NodeArrayVarIds.size(); ++i)
684 {
685 if (!this->PointDataArraySelection->GetArraySetting(static_cast<int>(i)))
686 {
687 continue;
688 }
689
690 const auto array(this->GetArrayData(this->NodeArrayVarIds[i], timeStep, this->NodeCount));
691 if (!array)
692 {
693 return false;
694 }
695
696 output->GetPointData()->AddArray(array);
697 }
698
699 return true;
700}
701
702//--------------------------------------------------------------------------------------------------
703void vtkNetCDFUGRIDReader::Close()

Callers 1

RequestDataMethod · 0.95

Calls 6

GetArrayDataMethod · 0.95
sizeMethod · 0.45
GetArraySettingMethod · 0.45
AddArrayMethod · 0.45
GetCellDataMethod · 0.45
GetPointDataMethod · 0.45

Tested by

no test coverage detected