------------------------------------------------------------------------------
| 600 | |
| 601 | //------------------------------------------------------------------------------ |
| 602 | bool 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 | //------------------------------------------------------------------------------ |
| 640 | bool vtkHDFWriter::UpdateStepsGroup(hid_t group, vtkPolyData* input) |
no test coverage detected