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

Fix #413: limit vacuum step size in magnetic field #415

Merged
merged 1 commit into from Mar 5, 2018

Conversation

ftessier
Copy link
Member

@ftessier ftessier commented Mar 1, 2018

Adjust the charged particle step routine for transport in vacuum when
there is an electromagnetic field (emf). The existing logic failed
because the emf step size restriction was not taken into account before
the howfar call. Hence the howfar method tracked the particle in a
single straight step across the entire vacuum region, causing erroneous
region changes and discards.

@mainegra
Copy link
Contributor

mainegra commented Mar 1, 2018

Very nice @ftessier !

@ftessier ftessier self-assigned this Mar 2, 2018
Adjust the charged particle step routine for transport in vacuum when
there is an electromagnetic field (emf). The existing logic failed
because the emf step size restriction was not taken into account before
the howfar call. Hence the howfar method tracked the particle in a
single straight step across the entire vacuum region, causing erroneous
region changes and discards.

Also check if the particle in fact entered a new region before calling
the macro to change the region, since charged particle may take many
steps through a vacuum region when there is a field.

Remove redundant step size restriction code in the vacuum emf transport
macro, now that the field step size restriction in vacuum has been moved
ahead of howfar in the electr subroutine.
@ftessier
Copy link
Member Author

ftessier commented Mar 5, 2018

@blakewalters are we good to merge this in its current form?

@blakewalters
Copy link
Contributor

Yup @ftessier.

@ftessier ftessier merged commit 677bbe5 into develop Mar 5, 2018
@ftessier ftessier deleted the fix-emf-vacuum branch March 5, 2018 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants