ascot4fusion / ascot5

ASCOT5 is a high-performance orbit-following code for fusion plasma physics and engineering
https://ascot4fusion.github.io/ascot5/
GNU Lesser General Public License v3.0
30 stars 9 forks source link

Backward Monte Carlo method #7

Open miekkasarki opened 1 year ago

miekkasarki commented 1 year ago

This issue is for merging (and finishing) the BMC code to the main.

miekkasarki commented 11 months ago

I've rebased branch https://github.com/ascot4fusion/ascot5/tree/feature/7-bmc on the main. There were several conflicts in Makefile and simulate_gc_fixed.c so I've probably broken something, which is why I pushed the rebased variant to https://github.com/ascot4fusion/ascot5/tree/feature/7-bmc-rebased

miekkasarki commented 9 months ago

Branch https://github.com/ascot4fusion/ascot5/tree/feature/7-bmc-rewrote contains the rewrote of the BMC algorithm. The main numerical scheme is the same but it was easier to rewrite than trying to merge the old one because:

Regarding the last bullet, the next steps would be to generalize the momentum-space mesh (so it can support energy-pitch as well) and implement a triangular spatial mesh.

There is also a WIP tutorial for BMC which would also check that the code works.