Skip to content

How to initialize beam from arrays with different macroparticle charges? #1031

Answered by ax3l
Xuan0533 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Xuan0533,

Thanks for the question! Yes, internally ImpactX does use particle weights for individual particles, which primarily has an effect on collective effects and diagnostics.

The example you mention is a bit rough still and focuses on equal-weight particle beams. The example calls a high-level API, which is implemented here and after partitioning the particles and ensuring we have them well distributed for parallelism (in-node and across compute nodes), we create the weight array in the same function and actually init the particles.
This is the part that we could certainly split up further and expose a more low-level function to Python.

We also recently implemented a new Source e…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ax3l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants