Algorithm for Distribution function computation in IBM

Hi,

I am trying to implement "Immersed Boundary-Lattice Boltzmann Method using Momentum Exchange method. I am trying to compute distribution function over the boundary points using interpolation, but unsuccessful.

Anyone can help me in the correct algorithm/code for the problem.