# vtkPointInterpolator gives new arrays

**URL:** <https://discourse.vtk.org/t/vtkpointinterpolator-gives-new-arrays/12293>\
**Category:** Development\
**Created:** [September 15, 2023, 9:14am UTC](https://discourse.vtk.org/t/vtkpointinterpolator-gives-new-arrays/12293 "2023-09-15T09:14:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankush\_Jain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ankush_jain/32/7705_2.png) [@Ankush\_Jain](https://discourse.vtk.org/u/Ankush_Jain)\
**Post date:** [September 15, 2023, 9:14am UTC](https://discourse.vtk.org/t/vtkpointinterpolator-gives-new-arrays/12293/1 "2023-09-15T09:14:06Z")

</div>

I have the following function:

```auto
def interpolateToGrid( mesh: vtkPolyData, grid: vtkStructuredGrid, gridSize ):
    
    # Perform the interpolation
    interpolator = vtkPointInterpolator()
    gaussianKernel = vtkGaussianKernel()
    gaussianKernel.SetRadius( gridSize*15)
    gaussianKernel.SetSharpness(10)
    interpolator.SetSourceData( mesh )
    interpolator.SetInputData( grid )
    interpolator.SetKernel( gaussianKernel )
    interpolator.SetNullPointsStrategy(vtkPointInterpolator.CLOSEST_POINT)
    interpolator.Update()

    #output = interpolator.GetOutput()
    output = vtkStructuredGrid()
    output.DeepCopy(interpolator.GetOutput())
    return output

```

grid initially had 2 scalar arrays  
The returned vtkStructuredGrid object I get from `interpolator.GetOutput()` has 14 more arrays  
The new arrays - `[stress_xx, stress_yy, stress_zz, stress_xy, stress_yz, stress_xz, vonmises, strain_xx, strain_yy, strain_zz, strain_xy, strain_yz, strain_xz, displacement]` I understand these values are related to FEA  
but I am not able to find the origin of these new arrays  
neither in the documentation nor in the source code

Kindly help

---

<div class="post-metadata">

**Author:** ![Ankush\_Jain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ankush_jain/32/7705_2.png) [@Ankush\_Jain](https://discourse.vtk.org/u/Ankush_Jain)\
**Post date:** [October 27, 2023, 7:56am UTC](https://discourse.vtk.org/t/vtkpointinterpolator-gives-new-arrays/12293/2 "2023-10-27T07:56:21Z")

</div>

This is solved, I didn’t understand the behaviour of interpolation functions before. Thanks
