Open bgmeulem opened 11 months ago
Hello, I'm currently porting your code to C++. It is still a work in progress and still trying to decode the finesses of the Python version. If you want and can help you, I can upload what I already have on Github.
Hi Niohori
That's absolutely wonderful! By any means, feel free to make contributions.
The python code could use some cleaning and restructuring to make it more clear (there is some superfluous code, plotting methods I used during debugging, and hooks for future extensions that were never finished), but the main "juice" of it is solving equation 13 (currently done with a midpoint solver). If you have any questions about the code, do let me know! I won't be able to add to your contribution for the next week or so, but after that, I would love to join in on the C++ conversion.
OK, I will upload in the coming days what I have on Github.
FYI: I uploaded some code
Lovely! Feel free to create a pull request. I'll run it over when I get the chance. I've skimmed through it and it looks great!
A lot of points need to be sampled, and there are currently no significant matters taken for speedup. The biggest bottleneck is solving the elliptic integral in equation 13. While scipy solves this in C, it is an annoying overhead having the solver itself in Python. A lot of time is wasted on communicating back and forth the solutions. The code should either be vectorized, so that all solutions can be communicated at once, or I should write my
math.py
in C/C++ to speed up the biggest bottleneck of the code. Preferably both should be done.