Repository navigation
Add a Helmholtz solver to simulate FEL - #1404
Open
MaxThevenet wants to merge 157 commits into
Open
MaxThevenet wants to merge 157 commits into
MaxThevenet wants to merge 157 commits into
Conversation
…d, that recovers old results 9a56f69 to machine precision
…operations in BeamParticleAdvance.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning: very early implementation
Adds a Helmholtz solver for the radiation field of a beam in an undulator, plus the beam push in the undulator and radiation fields. Two modes:
When enabled (
helmholtz.use_helmholtz = 1), the plasma/beam current deposition and Poisson solves are skipped.Beamline elements (undulators, thick/thin quadrupoles, phase shifters) are set per beam and applied by the Helmholtz pusher.
Main changes
src/helmholtz/Helmholtz.{H,cpp}(new): field slices and geometry, Envelope/FullWave solvers, initialization, in-situ diagnostics.src/particles/deposition/HelmholtzDeposition.{H,cpp}(new): beam source deposition onto the Helmholtz grid. In envelope mode, arrays jx, jz and rho are hacked and contain refraction and source terms of the Helmholtz envelope.src/particles/pusher/HelmholtzParticleAdvance.{H,cpp}(new): beam push with undulator, quadrupoles, phase shifters and radiation field. Shared pusher helpers moved toBeamParticleAdvance.H.src/particles/beam/{BeamParticleContainer,MultiBeam}.*: parsing of beamline elements,<beam>.output_ids,beams.tstart_push, pusher dispatch.src/Hipace.cpp,src/utils/MultiBuffer.*: integration in the slice loop and MPI transfer of the Helmholtz slices.src/diagnostics/*,src/fields/Fields.cpp:helmholtz_diagfield diagnostic.examples/helmholtz,tests/helmholtz.2Rank.sh(new CI test, both modes, compared with Genesis),docs/.../parameters.rst.Notes
examples/helmholtz/inputs).HelmholtzParticleAdvance.cpp(e.g. which time level of the field to push with); to be revisited after merge.