Issue running vtkImplicitPolyDataDistance using the vtkSampleImplicitFunctionFilter in parallel
I am using the vtkImplicitPolyDataDistance class along with the vtkSampleImplicitFunctionFilter to determine the signed distance function to a surface. The problem I run into is an assertion with allocating memory in the vtkBuffer.h (line 177). This issue only occurs when running in parallel, and has been verified to happen with both OpenMP and TBB. When I don't get asserted and crashed, the results that it produces are incorrect. This problem has only been verified on Windows using Visual Studio 2019 and MSVC. I have also verified that other implicit solvers work as expected in parallel, vtkImplicitPolyDataDistance is the only one that I have tested that has an issue.
This is the first time I built VTK-9.0.1 with CMake, the .jason file is attached. It is possible I just missed some variable.CMakeSettings.json I also attached a sample code test_vtk_sdf.cpp, the surface surface.stl, the mesh mesh.vts, and a file with the correct solution and the incorrect parallel solution.vtk_sdf_solution.vts
My gut says that it's a race condition in vtkImplicitPolyDataDistance's implementation. This is due to the fact that it is inconsistent in behavior and produces poor results.