|
ImpactX
|
Classes | |
| struct | NonlinearLensInvariants |
Functions | |
| std::tuple< amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal > | CubicRootsTrig (amrex::ParticleReal a, amrex::ParticleReal b, amrex::ParticleReal c, amrex::ParticleReal d) |
| std::tuple< amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal > | CubicRootsAlg (amrex::ParticleReal a, amrex::ParticleReal b, amrex::ParticleReal c, amrex::ParticleReal d) |
| void | DiagnosticOutput (ImpactXParticleContainer const &pc, std::string file_name, int step, bool append) |
| void | DiagnosticOutput (Map6x6 const &cm, RefPart const &ref_part, std::string file_name, int step, bool append) |
| void | DiagnosticOutput (RefPart const &ref_part, std::string file_name, int step, bool append) |
| std::tuple< amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal > | KineticInvariants (amrex::SmallMatrix< amrex::ParticleReal, 6, 6, amrex::Order::F, 1 > const &Sigma) |
| std::tuple< amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal > | Eigenemittances (amrex::SmallMatrix< amrex::ParticleReal, 6, 6, amrex::Order::F, 1 > const &Sigma) |
| std::unordered_map< std::string, amrex::ParticleReal > | reduced_beam_characteristics (ImpactXParticleContainer const &pc) |
| std::unordered_map< std::string, amrex::ParticleReal > | reduced_beam_characteristics (Map6x6 const &cm, RefPart const &ref_part) |
| std::tuple< amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal > impactx::diagnostics::CubicRootsAlg | ( | amrex::ParticleReal | a, |
| amrex::ParticleReal | b, | ||
| amrex::ParticleReal | c, | ||
| amrex::ParticleReal | d ) |
Function to return the roots of a cubic polynomial ax^3 + bx^2 + cx + d. The algebraic form of Cardano's formula is used. This implementation expects three real roots, which is verified by checking the sign of the discriminant.
| [in] | a | coefficient of cubic term |
| [in] | b | coefficient of quadratic term |
| [in] | c | coefficient of linear term |
| [in] | d | coefficient of constant term |
| std::tuple< amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal > impactx::diagnostics::CubicRootsTrig | ( | amrex::ParticleReal | a, |
| amrex::ParticleReal | b, | ||
| amrex::ParticleReal | c, | ||
| amrex::ParticleReal | d ) |
Function to return the roots of a cubic polynomial ax^3 + bx^2 + cx + d. The trigonometric form of Cardano's formula is used. This implementation expects three real roots, which is verified by checking the sign of the discriminant.
| [in] | a | coefficient of cubic term |
| [in] | b | coefficient of quadratic term |
| [in] | c | coefficient of linear term |
| [in] | d | coefficient of constant term |
| void impactx::diagnostics::DiagnosticOutput | ( | ImpactXParticleContainer const & | pc, |
| std::string | file_name, | ||
| int | step = 0, | ||
| bool | append = false ) |
ASCII output diagnostics associated with the beam particles.
This prints reduced beam characteristics derived from particles in ASCII.
| pc | container of the particles use for diagnostics |
| file_name | the file name to write to |
| step | the global step |
| append | open a new file with a fresh header (false) or append data to an existing file (true) |
| void impactx::diagnostics::DiagnosticOutput | ( | Map6x6 const & | cm, |
| RefPart const & | ref_part, | ||
| std::string | file_name, | ||
| int | step = 0, | ||
| bool | append = false ) |
ASCII output diagnostics associated with the covariance matrix.
This prints reduced beam characteristics derived from the envelope description in ASCII.
| cm | covariance matrix |
| ref_part | reference particle |
| file_name | the file name to write to |
| step | the global step |
| append | open a new file with a fresh header (false) or append data to an existing file (true) |
| void impactx::diagnostics::DiagnosticOutput | ( | RefPart const & | ref_part, |
| std::string | file_name, | ||
| int | step = 0, | ||
| bool | append = false ) |
ASCII output diagnostics associated with the reference particle.
This prints reference particle properties in ASCII.
| ref_part | reference particle |
| file_name | the file name to write to |
| step | the global step |
| append | open a new file with a fresh header (false) or append data to an existing file (true) |
| std::tuple< amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal > impactx::diagnostics::Eigenemittances | ( | amrex::SmallMatrix< amrex::ParticleReal, 6, 6, amrex::Order::F, 1 > const & | Sigma | ) |
This function returns the three eigenemittances denoted e1, e2, and e3 as constructed from the 6x6 beam covariance matrix. These three quantities are invariant under any linear symplectic transport map, and reduce to the projected normalized rms emittances in the limit of uncoupled transport.
input - Sigma symmetric 6x6 covariance matrix returns - tuple containing eigenemittances e1, e2, and e3
Returns the three eigenemittances denoted e1, e2, and e3 as constructed from the 6x6 beam covariance matrix. These three quantities are invariant under any linear symplectic transport map, and reduce to the projected normalized rms emittances in the limit of uncoupled transport. These quantities are described in:
G. Rangarajan, F. Neri, and A. Dragt, "Generalized Emittance Invariants," in Proc. 1989 IEEE Part. Accel. Conf., Chicago, IL, 1989, doi:10.1109/PAC.1989.73422. A. Dragt, F. Neri, and G. Rangarajan, "General Moment Invariants for Linear Hamiltonian Systems," Phys. Rev. A 45, 2572-2585 (1992), doi:10.1103/PhysRevA.45.2572.
| [in] | Sigma | symmetric 6x6 covariance matrix |
| std::tuple< amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal > impactx::diagnostics::KineticInvariants | ( | amrex::SmallMatrix< amrex::ParticleReal, 6, 6, amrex::Order::F, 1 > const & | Sigma | ) |
This function returns the three independent kinetic invariants denoted I2, I4, and I6 as constructed from the 6x6 beam covariance matrix. These three quantities are invariant under any linear symplectic transport map, and are used in the calculation of the three eigenemittances.
input - Sigma symmetric 6x6 covariance matrix returns - tuple containing invariants I2, I4, and I6
Returns the three independent kinematic moment invariants denoted I2, I4, and I6 as constructed from the 6x6 beam covariance matrix. These three quantities are invariant under any linear symplectic transport map, and are used in the calculation of the three eigenemittances, as described in:
G. Rangarajan, F. Neri, and A. Dragt, "Generalized Emittance Invariants," in Proc. 1989 IEEE Part. Accel. Conf., Chicago, IL, 1989, doi:10.1109/PAC.1989.73422. A. Dragt, F. Neri, and G. Rangarajan, "General Moment Invariants for Linear Hamiltonian Systems," Phys. Rev. A 45, 2572-2585 (1992), doi:10.1103/PhysRevA.45.2572.
| [in] | Sigma | symmetric 6x6 covariance matrix |
| std::unordered_map< std::string, amrex::ParticleReal > impactx::diagnostics::reduced_beam_characteristics | ( | ImpactXParticleContainer const & | pc | ) |
Compute moments of the beam distribution from particle data
This uses an MPI Allreduce and returns a result on all ranks.