Skip to content
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

Implement 5th order Adams-Bashforth pusher #77

Merged
merged 12 commits into from
Jul 2, 2022
Merged

Conversation

AngelFP
Copy link
Owner

@AngelFP AngelFP commented Jul 2, 2022

This PR implements the 5th order Adams-Bashforth (AB5) pusher for the plasma particles in the Baxevanis wakefield model. This is a multi-step method that can provide a factor ~4 speedup over the original 4th order Runge-Kutta (RK4) pusher. This is because the RK4 method, although single-step, generates 3 substeps whose information is discarded after pushing. In contrast, AB5 simply reuses the information from the previous 5 steps. As a result, this pusher reduces by a factor 4 the amount of times that B_theta, psi and its derivatives need to be computed at the location of the plasma particles.

Implementing this pusher has also been a good chance to refactor the Baxevanis model, which includes the following changes:

  • The model has been split into several files.
  • The laser and beam sources are now gathered into preallocated arrays instead of generating new ones every time.
  • A new PlasmaParticles class has been implemented. This class contains the slice of plasma particles to be evolved and preallocates all the necessary arrays to compute its evolution (as opposed to before, where new arrays were being continuously generated).
  • Using the new class and the reorganization of the wakefield solver, the implementation of the RK4 pusher has also been updated to be more efficient.

* The Baxevanis wakefieldmodel has been split in several files.
* A dedicated class for the plasma particles has been created.
* The methods for gathering and calculating fields now use preallocared
arrays.
* Dedicated depostition methods for a 1D column of particles have been
implemented.
@AngelFP AngelFP merged commit 635a21c into new_pipeline Jul 2, 2022
@AngelFP AngelFP deleted the new_plasma_pusher branch July 2, 2022 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant