andyljones / pybbfmm

Black-box fast multipole method package for Python
MIT License
47 stars 8 forks source link

Using pybbfmm for interpolation #3

Closed RBFresearch closed 3 years ago

RBFresearch commented 3 years ago

Hey Sir, thank you very much for your hard work. I came across your great article on the Fast multiople method during my search for interpolation methods for a very large number of interpolation points, and now I am wondering if it is possible to use pybbfmm for interpolation using radial basis functions? Thanks a lot!

andyljones commented 3 years ago

Should be! See the example.

RBFresearch commented 3 years ago

I may be a little confused about the notation. In the original paper by William & Fong, they try to solve sums of the form

,

where they call the sources. Do these sources correspond to your notation as charges in a pybbfmm problem?
Also, am I misunderstanding something, does the solution I get when solving a problem not correspond to the sum of the target far field, the w-interactions and u-interactions, which is an approximation of the sum above? Thanks!

andyljones commented 3 years ago

And yeah, the solution corresponds to the eqn above. The eqn above is interpolation of the field generated by the particles at the y to the points x.

RBFresearch commented 3 years ago

Thank you very much for your response.

I think I need to be more precisely about what I want to do. I want to try to interpolate surfaces of particles. I have 3D image data of particles from which I extract the surfaces of these particles, and now I want to find a radial basis function to interpolate the particle surfaces in continuous space, i.e. solving

with respect to the charges (mapping coefficients) , i.e. the task is to solve an equation system like in the wiki https://en.wikipedia.org/wiki/Radial_basis_function_interpolation

The problem with radial basis functions is that these functions depend on all the support points of the interpolation, i.e. it is not possible to solve such systems of equations without loading a large chunk of matrices into the computer's workspace.

My idea now was to use FMM to solve this problem by splitting my supporting points into meaningful groups using the tree construction in pybbfmm to calculate interpolation weights for each node of the tree. I think, assuming that sources (support points) that are close to each other make approximately the same contribution to the point, it should be possible to use an approximation also for the calculation of the interpolation weights.

Is there a way to use your programm for solving such tasks?

andyljones commented 3 years ago

Not without serious modification. If nothing else, I didn't optimise for the 3D case and so performance on 3D problems is terrible.

RBFresearch commented 3 years ago

I already thought that this would not be easy to implement. Maybe I'll try to deduce something from the construction of the trees...

Anyway, thank you very much for your response.