Skip to content

Fixing error in data set reader that zeroed out cell asscociated fields in unstructured data sets

Matt Larsen requested to merge mclarsen/vtk-m:fix/dataset_reader into master

There was an error in the data set reader base that return a cell associated field of size 0. With unstructured data sets, the VTK file can include cell types that are not supported in VTK-m, and they are removed when the data set is loaded. After they are removed, the cell field has to be permuted to remove the values that did not make it from the VTK file to the VTK-m data set.

The problem occurs when every cell in the data set is supported. The permutation is cleared, but the cast and call is still made, which allocates an array of size 0 and returns it. I changed the cast and call to do nothing when the size was zero.

Merge request reports