Skip to content

Initializing PICMI real component #4416

Closed Answered by roelof-groenewald
archermarx asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Thomas. The reason you are encountering a segfault is because the particle containers are not initialized yet when you query WarpX for it via elec_wrapper = particle_containers.ParticleContainerWrapper('electrons'). This call needs to happen after WarpX has been initialized through simulation.initialize_warpx().
Take a look at the example at https://github.com/ECP-WarpX/WarpX/blob/development/Examples/Tests/particle_data_python/PICMI_inputs_2d.py for how this can be achieved.

Please let us know if you have further questions.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by archermarx
Comment options

archermarx
Nov 21, 2023
Collaborator Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
component: Python Python layer
2 participants