------------------------------------------------------------------------------
| 1599 | |
| 1600 | //------------------------------------------------------------------------------ |
| 1601 | void vtkHDFWriter::AppendCompositeSubfilesDataObject(const std::string& uniqueSubTreeName) |
| 1602 | { |
| 1603 | // In multi-piece/distributed, it is possible that one piece is null for the rank 0 |
| 1604 | // writing the virtual structure. We try to infer the actual type of the current |
| 1605 | // non-composite dataset, create array structures, and write all non-null pieces to the |
| 1606 | // main file. |
| 1607 | |
| 1608 | const std::string blockPath = vtkHDFUtilities::VTKHDF_ROOT_PATH + "/" + |
| 1609 | uniqueSubTreeName; // All blocks are located on root group and have the same name |
| 1610 | // for all subfiles |
| 1611 | int type = -1; |
| 1612 | |
| 1613 | vtkHDF::ScopedH5GHandle nonNullPart = this->Impl->GetSubfileNonNullPart(blockPath, type); |
| 1614 | if (nonNullPart == H5I_INVALID_HID) |
| 1615 | { |
| 1616 | return; // Leaf is null for every subfile |
| 1617 | } |
| 1618 | |
| 1619 | if (type == VTK_UNSTRUCTURED_GRID) |
| 1620 | { |
| 1621 | // Get all arrays from the non null part |
| 1622 | vtkNew<vtkUnstructuredGrid> ug; |
| 1623 | this->Impl->CreateArraysFromNonNullPart(nonNullPart, ug); |
| 1624 | this->DispatchDataObject( |
| 1625 | this->Impl->OpenExistingGroup(this->Impl->GetRoot(), uniqueSubTreeName.c_str()), ug); |
| 1626 | } |
| 1627 | else if (type == VTK_POLY_DATA) |
| 1628 | { |
| 1629 | vtkNew<vtkPolyData> pd; |
| 1630 | this->Impl->CreateArraysFromNonNullPart(nonNullPart, pd); |
| 1631 | this->DispatchDataObject( |
| 1632 | this->Impl->OpenExistingGroup(this->Impl->GetRoot(), uniqueSubTreeName.c_str()), pd); |
| 1633 | } |
| 1634 | } |
| 1635 | |
| 1636 | //------------------------------------------------------------------------------ |
| 1637 | bool vtkHDFWriter::AppendTimeValues(hid_t group) |
no test coverage detected