Make `CellSetStructuredAny`
Currently, if you want a structured DataSet
, you use CellSetStructured
. This class is templated on the dimension of the grid (i.e. 1, 2, or 3).
There are advantages to this implementation. It means that when you access a cell, you know at compile time what type of cell it is (vertex, quad, or hex).
But it also means that if you support more than one grid dimension (which is common) you have to create multiple code paths for that. In these cases, it would be much nicer to have a single class, named something like CellSetStructuredAny
that can hold a structured cell set of any dimension. In this case, a single cell set class and structure can be used in place of 3.
When a worklet asks for a cell shape, it gets a CellShapeGeneric
and has to do a runtime selection.