Closed reichherzerp closed 1 year ago
So basically with this PR simply the whole error calculation part is skipped as it would not be used anyway, right?
Yes exactly, currently, we compute the propagation step (h) and the two small helper propagation steps (h/2) to get the error estimate that we do not need when using fixed steps. By removing the two helper steps, we save 2/3 of these time-consuming computations.
I can roughly confirm the speed improvement. Using the above script with the SIMD optimization for the plane wave approach ("Fast waves"), decreases the performance a bit, but it still is a significant improvement.
So if you fix the typo and comment on my other question, I can approve this PR.
Nice performance improvement for "no cost" by the way!
Looks good to me now.
Description This pull request improves the behavior of the PropagationBP module in CRPropa for fixed step sizes, resulting in a speed improvement of up to a factor of 3. In addition, I have implemented a test to verify the correct behavior of my changes in the module. I also manually checked the output files and compared them to the current master.
Performance comparison: simulation time with grid-less turbulence: master: 75.05±0.11 s this PR: 25.43±0.02 s
simulation time with grid turbulence: master: 82.04±0.23 s this PR: 57.16±0.22 s
Code to reproduce: