-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add native Boris method #96
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #96 +/- ##
==========================================
+ Coverage 47.10% 52.79% +5.69%
==========================================
Files 9 10 +1
Lines 535 608 +73
==========================================
+ Hits 252 321 +69
- Misses 283 287 +4 ☔ View full report in Codecov by Sentry. |
This is an exciting idea. Do you have a ToDo list? Maybe I can do something. |
Yes! I've added a ToDo list above. After I clean up the code a bit more, feel free to directly push to this branch! Adding the Boris method was not in my original plan for this package. I want to try this now because of some performance issue I encountered recently with a large number of test particles (> 1e7). By adding a native particle pusher, the high GC time may be largely avoided. |
Benchmark resultJudge resultBenchmark Report for /home/runner/work/TestParticle.jl/TestParticle.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/TestParticle.jl/TestParticle.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/TestParticle.jl/TestParticle.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
I'm going to merge this to master in order to test the performance for a specific problem. We can further polish this part afterwards. |
Have you read this paper? PS. Perhaps you have also come across this author. |
I've heard of this paper recently from a senior member of my group. By briefly scanning through the derivations, I got the impression that |
It's time to add some native particle pushers in the package!
Background
The Boris method is the de facto particle pusher in plasma physics, because of its excellent conservation behavior and relative simplicity. The Boris method is a second order method with discrete phase error related to the choice of fixed time step. If the time step is not fixed, this method can still be used, but the conservation of phase space trajectory will be violated.
Why do we need this?
The Boris method is specifically designed for the expression of Lorentz force. A general ODE solver in OrdinaryDiffEq.jl does not take into account the special form of the Lorentz equation, which is also the reason why the Boris method does not exist in OrdinaryDiffEq.jl. With my recent tests on multiple algorithms from OrdinaryDiffEq.jl, the default
Tsit5()
has poor conservation properties in many cases, and there are only a few options that display nice energy conservation behaviors #73. The Boris method also requires a fixed timestep for conservation, which makes it a bit harder for investigating a new problem, but we should have a version of our own in this package.Plan