Open rui-coelho opened 8 months ago
I pushed the fix on hotfix/101-distributions-not-properly-updated-when-using-adaptive-timestep if you want to try it out @rui-coelho .
The distributions are updated by depositing weight dt to the bin where marker is at the end of the time-step. The problem was that if dt varies (as it does in the adaptive time-step) this leads to bias. This was fixed by depositing weight dt / 2 to the final position/bin and weight * dt /2 to the initial position/bin.
When testing ASCOT5 to benchmark against ASCOT4, i found that when using "SIM_MODE":2, "ENABLE_ADAPTIVE":1 as the grid resolution increases there is a notorious degradation/filamentation in the distribution function on slowing down. The following figure illustrates the several cases.