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

Add ability to load external particle fields from file #4997

Merged

Conversation

oshapoval
Copy link
Member

@oshapoval oshapoval commented Jun 17, 2024

Description of PR #4981 @RemiLehe:

We currently have the ability to load an external grid field from a file (thanks to #3584).

This PR provides a similar ability for the external particle fields.

The external grid and particle fields differ e.g. in the case of the EM solver:

  • The external grid fields are applied to the grid at t=0 and serve as initial condition to the Maxwell solver.
  • By contrast, the external particle fields are applied to the particles directly and are not affected by the Maxwell solver.

In this PR, support for external particle fields is achieved by reusing many of the structures that are used for the external grid fields. For instance, we store the fields from file into the field Efield_fp_external and Bfield_fp_external in both cases. (As a result, using external particle fields and external grid fields from file at the same time is not possible.) However:

  • in the case of the external grid fields, Efield_external is added to the grid fields Efield_fp directly.
  • in the case of the external particle fields, Efield_external is instead added to the fields from which the particle gather Efield_aux. In some case (e.g. energy-conserving gather), Efield_fp and Efield_aux used to be aliases of each other. This is no longer the case if the external particle fields from file are used.

@roelof-groenewald
Copy link
Member

It would be good to include the divergence cleaning from #4944 to these particle fields as well.

@RemiLehe RemiLehe changed the title [WIP] Add ability to load external particle fields from file & fix CI tests [WIP] Add ability to load external particle fields from file Jun 24, 2024
@RemiLehe RemiLehe closed this Jun 24, 2024
@RemiLehe RemiLehe reopened this Jun 24, 2024
@RemiLehe RemiLehe changed the title [WIP] Add ability to load external particle fields from file Add ability to load external particle fields from file Jun 25, 2024
@RemiLehe RemiLehe requested a review from dpgrote June 25, 2024 21:57
@RemiLehe RemiLehe changed the title Add ability to load external particle fields from file [WIP] Add ability to load external particle fields from file Jun 25, 2024
@RemiLehe RemiLehe force-pushed the fix_ci_in_ext_particle_from_file branch from ad9df06 to 1bcf7b6 Compare June 25, 2024 23:29
@RemiLehe RemiLehe changed the title [WIP] Add ability to load external particle fields from file Add ability to load external particle fields from file Jun 25, 2024
@RemiLehe RemiLehe merged commit ce9f4af into ECP-WarpX:development Jul 9, 2024
45 checks passed
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.

None yet

4 participants