ImpactX
Loading...
Searching...
No Matches
impactx::integrators Namespace Reference

Functions

template<typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void symp2_integrate (RefPart &refpart, amrex::ParticleReal const zin, amrex::ParticleReal const zout, int const nsteps, T_Element const &element)
 
template<typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void symp2_integrate_split3 (RefPart &refpart, amrex::ParticleReal const zin, amrex::ParticleReal const zout, int const nsteps, T_Element const &element)
 
template<typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void symp4_integrate (RefPart &refpart, amrex::ParticleReal const zin, amrex::ParticleReal const zout, int const nsteps, T_Element const &element)
 
template<typename T_Real, typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void symp2_integrate_particle (amrex::SmallVector< T_Real, 6, 1 > &particle, amrex::ParticleReal const zin, amrex::ParticleReal const zout, int const nsteps, T_Element const &element)
 
template<typename T_Real, typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void symp4_integrate_particle (amrex::SmallVector< T_Real, 6, 1 > &particle, amrex::ParticleReal const zin, amrex::ParticleReal const zout, int const nsteps, T_Element const &element)
 
template<typename T_Real, typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void symp6_integrate_particle (amrex::SmallVector< T_Real, 6, 1 > &particle, amrex::ParticleReal const zin, amrex::ParticleReal const zout, int const nsteps, T_Element const &element)
 
template<typename T_Real, typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void symp2_integrate_particle_spin_step (amrex::SmallVector< T_Real, 6, 1 > &particle, amrex::SmallVector< T_Real, 3, 1 > &particle_spin, amrex::ParticleReal const tau, amrex::ParticleReal &zeval, T_Element const &element)
 
template<typename T_Real, typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void symp4_integrate_particle_spin_step (amrex::SmallVector< T_Real, 6, 1 > &particle, amrex::SmallVector< T_Real, 3, 1 > &particle_spin, amrex::ParticleReal const tau, amrex::ParticleReal &zeval, T_Element const &element)
 
template<typename T_Real, typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void symp6_integrate_particle_spin_step (amrex::SmallVector< T_Real, 6, 1 > &particle, amrex::SmallVector< T_Real, 3, 1 > &particle_spin, amrex::ParticleReal const tau, amrex::ParticleReal &zeval, T_Element const &element)
 
template<typename T_Real, typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void symp_integrate_particle_spin (amrex::SmallVector< T_Real, 6, 1 > &particle, amrex::SmallVector< T_Real, 3, 1 > &particle_spin, amrex::ParticleReal const zin, amrex::ParticleReal const zout, int const nsteps, int int_order, T_Element const &element)
 

Function Documentation

◆ symp2_integrate()

template<typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::integrators::symp2_integrate ( RefPart & refpart,
amrex::ParticleReal const zin,
amrex::ParticleReal const zout,
int const nsteps,
T_Element const & element )

A second-order symplectic integrator based on a Hamiltonian splitting H = H_1 + H_2. This is a generalization of the second- order leapfrog algorithm. For a detailed overview:

E. Hairer et al, Geometric Numerical Integration: Structure- Preserving Algorithms for Ordinary Differential Equations, 2nd ed, Springer, Berlin, 2006.

Parameters
refpartReference particle data
zinInitial value of independent variable (z-location)
zoutFinal value of independent variable (z-location)
nstepsNumber of integration steps
elementElement defining the two maps associated with H_1 and H_2

◆ symp2_integrate_particle()

template<typename T_Real, typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::integrators::symp2_integrate_particle ( amrex::SmallVector< T_Real, 6, 1 > & particle,
amrex::ParticleReal const zin,
amrex::ParticleReal const zout,
int const nsteps,
T_Element const & element )

A second-order symplectic integrator based on a Hamiltonian splitting H = H_1 + H_2. This is a generalization of the second- order leapfrog algorithm. For a detailed overview:

E. Hairer et al, Geometric Numerical Integration: Structure- Preserving Algorithms for Ordinary Differential Equations, 2nd ed, Springer, Berlin, 2006.

Parameters
particleParticle phase space data in a 6-vector
zinInitial value of independent variable (z-location)
zoutFinal value of independent variable (z-location)
nstepsNumber of integration steps
elementElement defining the two maps associated with H_1 and H_2

◆ symp2_integrate_particle_spin_step()

template<typename T_Real, typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::integrators::symp2_integrate_particle_spin_step ( amrex::SmallVector< T_Real, 6, 1 > & particle,
amrex::SmallVector< T_Real, 3, 1 > & particle_spin,
amrex::ParticleReal const tau,
amrex::ParticleReal & zeval,
T_Element const & element )

A second-order symplectic integration step based on a Hamiltonian splitting H = H_1 + H_2, with spin included. The effect of spin is included by adding a third term in the splitting of the vector field, corresponding to the update from the Thomas-BMT equation. This results in a net 3-term splitting, where map3 applies the spin map.

The algorithm is correct to second-order in the stepsize, with respect to both orbit and spin data.

Parameters
particleParticle phase space data in a 6-vector
particle_spinParticle spin data in a 3-vector
tauSize of the step in s
zevalEvaluation point in s
elementElement defining the maps associated with H_1, H_2, and spin.

◆ symp2_integrate_split3()

template<typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::integrators::symp2_integrate_split3 ( RefPart & refpart,
amrex::ParticleReal const zin,
amrex::ParticleReal const zout,
int const nsteps,
T_Element const & element )

A second-order symplectic integrator based on a Hamiltonian splitting H = H_1 + H_2 + H_3. This is the result of applying the two-terms splitting of symp2_integrate twice in succession. The form shown here appears, for example, in:

R. D. Ryne, Computational Methods in Accelerator Physics, USPAS lecture notes, 2009.

Parameters
refpartReference particle data
zinInitial value of independent variable (z-location)
zoutFinal value of independent variable (z-location)
nstepsNumber of integration steps
elementElement defining the two maps associated with H_1 and H_2

◆ symp4_integrate()

template<typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::integrators::symp4_integrate ( RefPart & refpart,
amrex::ParticleReal const zin,
amrex::ParticleReal const zout,
int const nsteps,
T_Element const & element )

A fourth-order symplectic integrator based on a Hamiltonian splitting H = H_1 + H_2. This is the result of applying the two-terms splitting of symp2_integrate together with the method of Yoshida.

H. Yoshida, Phys. Lett. A 150, 292-268 (1990).

The form shown here appears, for example, in:

E. Forest and R. D. Ruth, Physica D 43, 105-117 (1990).

Parameters
refpartReference particle data
zinInitial value of independent variable (z-location)
zoutFinal value of independent variable (z-location)
nstepsNumber of integration steps
elementElement defining the two maps associated with H_1 and H_2

◆ symp4_integrate_particle()

template<typename T_Real, typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::integrators::symp4_integrate_particle ( amrex::SmallVector< T_Real, 6, 1 > & particle,
amrex::ParticleReal const zin,
amrex::ParticleReal const zout,
int const nsteps,
T_Element const & element )

A fourth-order symplectic integrator based on a Hamiltonian splitting H = H_1 + H_2. This is the result of applying the two-terms splitting of symp2_integrate together with the method of Yoshida.

H. Yoshida, Phys. Lett. A 150, 292-268 (1990).

The form shown here appears, for example, in:

E. Forest and R. D. Ruth, Physica D 43, 105-117 (1990).

Parameters
particleParticle phase space data in a 6-vector
zinInitial value of independent variable (z-location)
zoutFinal value of independent variable (z-location)
nstepsNumber of integration steps
elementElement defining the two maps associated with H_1 and H_2

◆ symp4_integrate_particle_spin_step()

template<typename T_Real, typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::integrators::symp4_integrate_particle_spin_step ( amrex::SmallVector< T_Real, 6, 1 > & particle,
amrex::SmallVector< T_Real, 3, 1 > & particle_spin,
amrex::ParticleReal const tau,
amrex::ParticleReal & zeval,
T_Element const & element )

A fourth-order symplectic integration step based on a Hamiltonian splitting H = H_1 + H_2, with spin included. The effect of spin is included by adding a third term in the splitting of the vector field, corresponding to the update from the Thomas-BMT equation. This results in a net 3-term splitting, where map3 applies the spin map.

The algorithm is correct to fourth-order in the stepsize, with respect to both orbit and spin data. Currently, this is obtained by using the Yoshida method.

Parameters
particleParticle phase space data in a 6-vector
particle_spinParticle spin data in a 3-vector
tauSize of the step in s
zevalEvaluation point in s
elementElement defining the maps associated with H_1, H_2, and spin.

◆ symp6_integrate_particle()

template<typename T_Real, typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::integrators::symp6_integrate_particle ( amrex::SmallVector< T_Real, 6, 1 > & particle,
amrex::ParticleReal const zin,
amrex::ParticleReal const zout,
int const nsteps,
T_Element const & element )

A sixth-order symplectic integrator based on a Hamiltonian splitting H = H_1 + H_2. The implementation below requires a reduced number of map evaluations (15 total) compared to direct use of the Yoshida construction, which requires three compositions of a fourth-order integrator step, each involving seven map evaluations (when expressed in the form obtained by Forest and Ruth, above). It is based on Section 5 of:

H. Yoshida, Phys. Lett. A 150, 292-268 (1990),

and appears also in Section V.3.2 (3.11) of:

E. Hairer et al, Geometric Numerical Integration, 2nd ed., Springer-Verlag, Berlin, 2006.

Parameters
particleParticle phase space data in a 6-vector
zinInitial value of independent variable (z-location)
zoutFinal value of independent variable (z-location)
nstepsNumber of integration steps
elementElement defining the two maps associated with H_1 and H_2

◆ symp6_integrate_particle_spin_step()

template<typename T_Real, typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::integrators::symp6_integrate_particle_spin_step ( amrex::SmallVector< T_Real, 6, 1 > & particle,
amrex::SmallVector< T_Real, 3, 1 > & particle_spin,
amrex::ParticleReal const tau,
amrex::ParticleReal & zeval,
T_Element const & element )

A sixth-order symplectic integration step based on a Hamiltonian splitting H = H_1 + H_2, with spin included. The effect of spin is included by adding a third term in the splitting of the vector field, corresponding to the update from the Thomas-BMT equation. This results in a net 3-term splitting, where map3 applies the spin map.

The algorithm is correct to sixth-order in the stepsize, with respect to both orbit and spin data. Currently, this is obtained by using the Yoshida method.

Parameters
particleParticle phase space data in a 6-vector
particle_spinParticle spin data in a 3-vector
tauSize of the step in s
zevalEvaluation point in s
elementElement defining the maps associated with H_1, H_2, and spin.

◆ symp_integrate_particle_spin()

template<typename T_Real, typename T_Element>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::integrators::symp_integrate_particle_spin ( amrex::SmallVector< T_Real, 6, 1 > & particle,
amrex::SmallVector< T_Real, 3, 1 > & particle_spin,
amrex::ParticleReal const zin,
amrex::ParticleReal const zout,
int const nsteps,
int int_order,
T_Element const & element )

A symplectic integrator based on a Hamiltonian splitting H = H_1 + H_2, with spin included. The effect of spin is included by adding a third term in the splitting of the vector field, corresponding to the update from the Thomas-BMT equation. This results in a net 3-term splitting, where map3 applies the spin map.

The algorithm is correct to second-order in the stepsize, with respect to both orbit and spin data.

Parameters
particleParticle phase space data in a 6-vector
particle_spinParticle spin data in a 3-vector
zinInitial value of independent variable (z-location)
zoutFinal value of independent variable (z-location)
nstepsNumber of integration steps
int_orderOrder of numerical integration (2, 4, or 6)
elementElement defining the maps associated with H_1, H_2, and spin.