Skip to content

ENH: Unit test for kernels

Bill Lorensen requested to merge lorensen/vtk:UnitTestKernels into master

ENH: Unit test for kernels

Test the non-SPH kernels.

  1. Generate a random sphere of points with radius 1.
  2. Generate scalar data that is the distance from the origin.
  3. Generate a sphere source with radius .5
  4. For each point on the sphere source, interpolate the scalar data.
  5. Compute the mean of the interpolated data and report it. It should be close to .5.

NOTE: This UnitTest found an error in ProbabalisticVoronoKernel::ComputeWeights. highestProbability was initialized with -VTK_FLOAT_MIN rather than VTK_FLOAT_MIN.

Merge request reports