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

Method UpdateStepsGroup

IO/HDF/vtkHDFWriter.cxx:602–637  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

600
601//------------------------------------------------------------------------------
602bool vtkHDFWriter::UpdateStepsGroup(hid_t group, vtkUnstructuredGrid* input)
603{
604 if (!this->IsTemporal)
605 {
606 return true;
607 }
608
609 vtkDebugMacro("Update UG Steps group for file " << this->GetFileName());
610
611 hid_t stepsGroup = this->Impl->GetStepsGroup(group);
612 bool result = true;
613
614 vtkIdType pointsOffset = 0;
615 vtkIdType connectivitiesIdOffset = 0;
616
617 if (this->HasGeometryChangedFromPreviousStep(input))
618 {
619 pointsOffset = input->GetNumberOfPoints();
620 connectivitiesIdOffset = input->GetCells()->GetNumberOfConnectivityIds();
621 result &= this->Impl->AddOrCreateSingleValueDataset(
622 stepsGroup, "PointOffsets", pointsOffset, true, true);
623 result &= this->Impl->AddOrCreateSingleValueDataset(
624 stepsGroup, "ConnectivityIdOffsets", connectivitiesIdOffset, true, true);
625 }
626 // Don't write offsets for the last timestep
627 if (this->CurrentTimeIndex < this->NumberOfTimeSteps - 1)
628 {
629 result &= this->Impl->AddOrCreateSingleValueDataset(stepsGroup, "PointOffsets", 0, true);
630 result &= this->Impl->AddOrCreateSingleValueDataset(stepsGroup, "CellOffsets", 0, true);
631 result &=
632 this->Impl->AddOrCreateSingleValueDataset(stepsGroup, "ConnectivityIdOffsets", 0, true);
633 result &= this->Impl->AddOrCreateSingleValueDataset(stepsGroup, "PartOffsets", 0, true);
634 }
635
636 return result;
637}
638
639//------------------------------------------------------------------------------
640bool vtkHDFWriter::UpdateStepsGroup(hid_t group, vtkPolyData* input)

Callers 1

WriteDatasetToFileMethod · 0.95

Calls 15

GetStepsGroupMethod · 0.80
WriteSumStepsPolyDataMethod · 0.80
GetCellArraysForToposMethod · 0.80
AddArrayToDatasetMethod · 0.80
GetFileNameMethod · 0.45
GetNumberOfPointsMethod · 0.45
GetCellsMethod · 0.45
OpenDatasetMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected