Skip to content
  • Philippe P. Pébaÿ's avatar
    Rewrite HTG cell centers filter as a HTG algorithm sub-class · e26f1910
    Philippe P. Pébaÿ authored
    The motivation for this refactoring was quite simple: amongst
    all ancient (but renovated) and new hypetree grid filters, which
    were part of the recently merged "HyperTreeGrid Version 2" branch,
    the HTG CellCenters filter stood out as the only one which was
    not deriving from vtkHyperTreeGridAlgorithm, which had also been
    reworked entirely for this new version of HTG support.
    
    This was because vtkHyperTreeGridCellCenters was, initially,
    deriving from the vtkCellCenters class in Filters/General.
    As VTK does not support multiple inheritance, it was left that
    way but that was not consistent with our overall approach of
    making all HTG algorithms derive from a single base class, in
    the double goal of facilitating both the writing of new HTG
    filters and their maintenance in the long run.
    
    The current commit thus provides a re-writing of the HTG cell
    center creating algorithm as subclass of vtkHyperTreeGridAlgorithm
    while preserving the outside appearance of a vtkCellCenter-derived
    filter in its API, specifically by introducing a VertexCells
    instance variable in order to mimic that which is provided
    in vtkCellCenters.
    
    Note that no new unit tests are provided as part of this commit,
    for the 4 existing ones for the previous incarnation of the HTG
    cell center filter are still passing with unchanged results (as
    they should indeed).
    e26f1910