You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both conduit o2mrelation offsets and vtkCellArray offsets store the index in the connectivity array where each cell starts.
However, vtkCellArray offsets stores numCells + 1 values while o2mrelation offsets stores numCells values. The last value in vtkCellArray offsets is always the length of the connectivity array. It is used as a sentinel, eliminating an additional test for the end of the array.
VTKm uses the same convention as VTK.
We cannot simply pass the pointer to the offsets array coming from conduit o2mrelation to be able to use it in vtkCellarray offsets. We have to copy that array and add an element to it.
The text was updated successfully, but these errors were encountered:
@danlipsa That is correct, o2m includes an entry per mapping, it doesn't have an extra entry at the end.
The length is handled by the Conduit leaf data type description of the array (it's not encoded in the array data itself). o2ms are used for general relationships not just connectivity arrays.
Despite what the docs currently say - sizes, offsets are both required.
We could think about a special case to allow the lenght of sizes and offsets to differ for this case - but folks would need to detect and discriminate against those cases. Since we use this for more than cell connectivity, I worry that logic to match vtk + vtk-m will confuse things elsewhere.
So this limits what we can zero-copy to VTK/VTK-m. Definitely not asking VTK/VTK-m to change, I know that would be disruptive.
Both conduit o2mrelation offsets and vtkCellArray offsets store the index in the connectivity array where each cell starts.
However, vtkCellArray offsets stores numCells + 1 values while o2mrelation offsets stores numCells values. The last value in vtkCellArray offsets is always the length of the connectivity array. It is used as a sentinel, eliminating an additional test for the end of the array.
VTKm uses the same convention as VTK.
We cannot simply pass the pointer to the offsets array coming from conduit o2mrelation to be able to use it in vtkCellarray offsets. We have to copy that array and add an element to it.
The text was updated successfully, but these errors were encountered: