Axect / puruspe

PURe RUSt SPEcial library
Apache License 2.0
14 stars 6 forks source link

Ricatti-Bessel functions of complex arguments #6

Open kostyfisik opened 5 months ago

kostyfisik commented 5 months ago

@Axect Hi! I am interested to solve Mie scattering problem in pure Rust (to make a WebAssembly module for web app as an ultimate goal). Thus, your crate seems to be a good starting point. So I need to have all Bessel (+Hankel) functions of complex argument in series of integer order. I know a numerically stable way to evaluate them from logarithmic derivatives of Riccati-Bessel functions, as we do in our battle tested C++ Scattnlay project (related scientific paper).

You can check of C++ implementation and tests here, I am ready to try to reimplement them in Rust.

However, this will require your supervision as soon as I am new to Rust. E.g. I will need to add a crate for complex numbers (num-complex), however, this will break your "There are no dependencies" part for the current state of ReadMe.

Axect commented 4 months ago

Hi @kostyfisik ,

Thanks for reaching out! I'm glad to hear that my crate seems like a good starting point for your project.

I appreciate your concern about breaking the "no dependencies" principle. However, I think we can manage the num-complex dependency by declaring it as a separate feature. This way, users who don't need complex numbers can still use the crate without any dependencies.

If you could implement the Bessel and Hankel functions for complex arguments based on your experience with the Scattnlay project, that would be fantastic. I'd be happy to provide guidance and review your Rust code as needed.

Feel free to submit a pull request whenever you're ready. I look forward to collaborating with you on this!

Best regards, Axect