`vtkHyperTreeGrid` ghost types
Currently, vtkHyperTreeGridGhostCellsGenerator
generates binary ghosts: cells (or more precisely vertices) are ghosts, or they are not. However, righting algorithms implicating ghosts might need some extra topological information on such vertices to avoid unnecessary search / communication.
This issue aims to define what types of ghosts are relevant for an htg. I will propose a set of ghost types, which we can then amend. Note that in the current ghost implementation, an entire hypertree is held by one and only one process, but in the future, it could make sense to split a hypertree among multiple processes.
Before I list a proposal for those types, I think we should call them TreeVertexGhostType
and not VertexGhostType
, since if at some point someone wants to do ghosts on graphs that are not trees, it would be more legitimate to keep the pure vertex naming for this case.
Here is what could be defined in vtkDataSetAttributes.h
:
enum TreeVertexGhostType
{
DUPLICATETREEVERTEX = 1, // the vertex is present on multiple processors.
PUREGHOSTTREEVERTEX = 2, // the vertex sub-tree is only composed of ghost vertices.
PUREGHOSTROOTTREEVERTEX = 4, // the vertex is the first pure ghost vertex in the current path to the root of the hypertree.
INCOMPLETETREEVERTEX = 8, // the vertex is refined into a subtree in another process, but is locally a leaf.
HIDDENTREEVERTEX = 16 // the vertex is needed for hypertree topology, but does not hold any data information.
};
Adding a REFINEDTREEVERTEX
would not be relevant in most cases since this information can be accessed through cursors using IsLeaf()
method. But maybe we want to be able to know about it by only looking at the ghost array without actually traversing the htg. This is to be discussed.
Solving this issue implies changing vtkHyperTreeGridGhostCellsGenerator
to acknowledge these types.