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

Method GetGlobalFields

IO/IOSS/vtkIOSSReaderInternal.cxx:2543–2573  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2541}
2542
2543bool vtkIOSSReaderInternal::GetGlobalFields(vtkDataArraySelection* globalFieldSelection,
2544 vtkFieldData* fd, const DatabaseHandle& handle, int timestep)
2545{
2546 auto region = this->GetRegion(handle);
2547 if (!region)
2548 {
2549 return false;
2550 }
2551
2552 Ioss::NameList fieldNames;
2553 region->field_describe(&fieldNames);
2554 for (const auto& name : fieldNames)
2555 {
2556 switch (region->get_fieldref(name).get_role())
2557 {
2558 case Ioss::Field::ATTRIBUTE:
2559 case Ioss::Field::REDUCTION:
2560 if (globalFieldSelection->ArrayIsEnabled(name.c_str()))
2561 {
2562 if (auto array = this->GetField(name, region, region, handle, timestep))
2563 {
2564 fd->AddArray(array);
2565 }
2566 }
2567 break;
2568 default:
2569 break;
2570 }
2571 }
2572 return true;
2573}
2574
2575VTK_ABI_NAMESPACE_END

Callers 2

ReadMeshMethod · 0.80
ReadMeshMethod · 0.80

Calls 6

GetRegionMethod · 0.95
GetFieldMethod · 0.95
field_describeMethod · 0.80
ArrayIsEnabledMethod · 0.45
c_strMethod · 0.45
AddArrayMethod · 0.45

Tested by

no test coverage detected