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

Position keyword now adds position variables in PICMI ParticleDiagnostic #4721

Conversation

n01r
Copy link
Member

@n01r n01r commented Feb 22, 2024

As our documentation states, adding the string 'position' to the data_list parameter of PICMI's ParticleDiagnostic should add position variables. This was true by default until recently but now positions can actually be left out and are not written automatically, anymore.

This PR also symmetrizes the list of accepted variables between the LabFrameParticleDiagnostic and the ParticleDiagnostic classes while adding the former to the documentation.

@@ -2457,7 +2458,7 @@ def diagnostic_initialize_inputs(self):
variables.add('Bx')
variables.add('By')
variables.add('Bz')
elif dataname in ['ux', 'uy', 'uz', 'Ex', 'Ey', 'Ez', 'Bx', 'By', 'Bz']:
elif dataname in ['x', 'y', 'z', 'ux', 'uy', 'uz', 'Ex', 'Ey', 'Ez', 'Bx', 'By', 'Bz', 'Er', 'Et', 'Br', 'Bt']:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the current variables j, though?
I don't quite see why they are missing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not anymore have an E or B field on the particle itself.
(For j we never had it.)

n01r added 2 commits February 23, 2024 15:43
Prior to recently, the `'position'` string in the input of the PICMI
`ParticleDiagnostic` did not add the positions because they were written out
automatically.
That has been changed and so we are adding them to the list of variables now.

Also added the class `LabFrameParticleDiagnostic` to the docs.
- in picmi.py, the dimensions were not checked and so it would try to add
  variables that do not exist for a species in a lower dimension
- in examples, some coordinates were named wrongly for lower dimensions
  than 2 but it did not matter before since positions were added automatically
@n01r n01r force-pushed the topic-positionKeywordInParticleDiagsActuallyAddsPositionVariables branch from 9e16831 to 43949fb Compare February 24, 2024 01:14
@n01r
Copy link
Member Author

n01r commented Feb 26, 2024

Opening and closing because CI test for HIP failed with a timeout while installing dependencies

@n01r n01r closed this Feb 26, 2024
@n01r n01r reopened this Feb 26, 2024
@ax3l ax3l self-requested a review February 27, 2024 00:08
@ax3l ax3l self-assigned this Feb 27, 2024
@ax3l ax3l added the component: PICMI Standardized input format label Feb 27, 2024
@ax3l ax3l added the bug Something isn't working label Feb 27, 2024
@ax3l ax3l merged commit 1d87c26 into BLAST-WarpX:development Feb 27, 2024
70 of 71 checks passed
@n01r n01r deleted the topic-positionKeywordInParticleDiagsActuallyAddsPositionVariables branch February 27, 2024 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component: PICMI Standardized input format
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants