Tube filter fails when applied to output data from the Streamline filter, for certain numbers of grid points and streamline seed samplings
I have created a simple example where a velocity field is created on a uniform grid, which has (N+1) grid points per spatial direction. A streamline filter is then applied to the velocity field, where the seeds used for the Streamline filter are sampled as every (seedEveryNId) grid points. Then, the Tube filter is applied to the streamline filtered data, in order to render the streamline data.
For certain combinations of N and seedEveryNId, the tube filter execution fails with the error:
"VTKmDataCreationAndAnalysis-Simplified: /home/elyce/workspace/libraries/vtk-m/vtkm/internal/ArrayPortalBasic.h:113: void vtkm::internal::ArrayPortalBasicWrite::Set(vtkm::Id, const ValueType&) const [with T = vtkm::Vec<double, 3>; vtkm::Id = int; vtkm::internal::ArrayPortalBasicWrite::ValueType = vtkm::Vec<double, 3>]: Assertion `index < this->NumberOfValues' failed"
I have tried this example with the following combinations and results:
N | seedEveryId | Pass/Fail |
---|---|---|
33 | 3 | Fail |
33 | 4 | Pass |
33 | 10 | Pass |
33 | 11 | Fail |
100 | 3 | Fail |
100 | 4 | Fail |
100 | 24 | Fail |
100 | 25 | Fail |
100 | 26 | Pass |
I am attaching the .cpp file and CMakeLists.txt file with which I am running this example.
To run the executable, the user must provide the parameter "N" as the first command line argument, and the parameter "seedEveryNId" as the second command line argument. Additionally, the user should specify an environment variable "VTKM_OUTPUT_DATA_BASE", which provides the desired output path and base name to output files generated. i.e. VTKM_OUTPUT_DATA_BASE=/home/elyce/Desktop/test will output files named "test_basic" or "test_streamlines" in the directory /home/elyce/Desktop.
The example will output two vtk files -- one for the original data set, and one for the streamline data set, both labeled with the parameters N and seedEveryNId that were used. If the Tube filter does not fail, it will also output a rendering of the streamlines.
@mmathai Manish, I was asked to tag you in this. Thanks for your help! Let me know if you have any questions.
VTKm-ex-DataCreationAndAnalysis-Simplified.cppCMakeLists.txt