Closed isuruf closed 2 years ago
Dear Isuru, Thanks for looking into this. I believe that the choice of zkfmm is correct, and this is because after the tree generation, all the sources, targets and boxsizes are also rescaled using b0inv in lines 390:411 in src/Helmholtz/hfmm3d.f
The reason for the factor of 1.5, is that it represents the distance to the closest target. Hope this clarifies the matter.
Thanks @mrachh. It makes sense to me now.
In https://github.com/flatironinstitute/FMM3D/blob/6e3add2a8fb7cfc2b6b723975ff36f2adea48e28/src/Helmholtz/hfmm3d.f#L430
zkfmm = zk * b0
is passed for theh3dterms
routine which I believe expectszk
instead ofzkfmm
. I believe so because in theh3dterms
routine, the parameter is namedzk
and that value is multiplied by the boxsize of the level, i.e.z1
at https://github.com/flatironinstitute/FMM3D/blob/df2114e23474469cb8b6f2937f037d7f387b0b0b/src/Helmholtz/h3dterms.f#L35 is equivalent tozk * boxsize(0) * boxsize(ilev) * 1.5
which I found rather odd.cc @inducer