Grid virtual casing - #217
Conversation
jonathanschilling
left a comment
There was a problem hiding this comment.
Overall looks quite good to me, thanks for implementing this! Looking forward to seeing the CI results and replies to a few minor comments.
|
@smiet Could you please also have a look at this? |
jonathanschilling
left a comment
There was a problem hiding this comment.
Thanks for the latest updates. As far as I can judge without looking at actual runs, the changes look good to me.
|
Added further performance improvements (MPI Parallelization in addition to OpenMP). Checked correctness of datasharing using Logging on 2 Ranks before and after allreduce |
|
Both VC implementations exploit stellerator symmetry now to save 1/2 evaluations |
Grid-virtual-casing implementation didn't compute the surface currents over all field periods, and was incorrect for nfp>1 cases.
…r/SPEC into grid-virtual-casing2
|
I added an example config for the axysymmetric test case to the CI @jonathanschilling , it runs in about half the time and reaches the same result as the reference implementation (within tolerance). |
|
I think, as far as I can tell without much more effort, that this is ready for merging. @jloizu Could you maybe also have a look and potentially try out this new feature on some of the free-boundary SPEC verification cases? |
Trying out the Feature should only require adding |
|
I added Erol Balkovic to the reviewing, since he is currently testing free-boundary test cases. I pass the review torch to him and Chris, and then I am guessing it can be merged. |
|
Thanks for the work @missing-user. I checked your code and have also successfully ran an axisymmetric free-boundary problem input_file. The result matches what we had before and virtual casing calculation Other than that, under the powers given by Joaquim to me, this pull request LGTM. |
Addressing issue #32 with a faster virtual casing implementation.
I iteratively increase the resolution to get an estimate of how well the integral has converged, and could adaptively refine the grid until a given epsilon is reached. For now it just prints the error estimate and doesn't terminate if gBnstol isn't reached.
For the rotating ellipse test case at a given accuracy, it is approximately 10x faster than the current implementation (serial performance) and parallelizes trivially across both MPI ranks and OMP threads. Comparing to DCUHRE results at 1e-12 tolerance, the accuracy estimates of the new method seem accurate, and it converges exponentially to the correct result as expected.
Changes to Inputlist
Lvcgridwas added to choose which virtual casing routine is being used.vcNt,vcNzthe resolution parameters for the new integration routinePossible improvements