diff --git a/bmad/code/create_element_slice.f90 b/bmad/code/create_element_slice.f90 index 13bbc2fb6e..f9c779375f 100644 --- a/bmad/code/create_element_slice.f90 +++ b/bmad/code/create_element_slice.f90 @@ -140,7 +140,7 @@ recursive subroutine create_element_slice (sliced_ele, ele_in, l_slice, offset, .not. include_downstream_end .and. ele0%value(l$) == sliced_ele%value(l$) .and. & (ele_in%tracking_method == bmad_standard$ .or. ele_in%field_calc == bmad_standard$)) then select case (ele_in%key) - case (sbend$, quadrupole$, sextupole$, octupole$) + case (sbend$, quadrupole$, sextupole$, octupole$, thick_multipole$) if (associated(sliced_ele%rad_map)) sliced_ele%rad_map%stale = .false. end select endif diff --git a/bmad/code/em_field_calc.f90 b/bmad/code/em_field_calc.f90 index f221e27fc8..7295faefca 100644 --- a/bmad/code/em_field_calc.f90 +++ b/bmad/code/em_field_calc.f90 @@ -329,7 +329,7 @@ recursive subroutine em_field_calc (ele, param, s_pos, orbit, local_ref_frame, f !------------------ ! Drift, et. al. Note that kicks get added at the end for all elements - case (drift$, ecollimator$, rcollimator$, instrument$, monitor$, pipe$, marker$, detector$) + case (drift$, ecollimator$, rcollimator$, instrument$, monitor$, pipe$, marker$, detector$, thick_multipole$) !------------------ ! E_Gun diff --git a/bmad/code/lat_sanity_check.f90 b/bmad/code/lat_sanity_check.f90 index a7ba4809be..c66e22c183 100644 --- a/bmad/code/lat_sanity_check.f90 +++ b/bmad/code/lat_sanity_check.f90 @@ -1080,7 +1080,7 @@ subroutine lat_sanity_check (lat, err_flag) if (l_stat == multipass_lord$ .and. .not. ele%field_master .and. ele%value(p0c$) == 0 .and. & ele%value(e_tot$) == 0 .and. ele%value(multipass_ref_energy$) == 0) then select case (ele%key) - case (quadrupole$, sextupole$, octupole$, solenoid$, sol_quad$, sbend$, rf_bend$, & + case (quadrupole$, sextupole$, octupole$, thick_multipole$, solenoid$, sol_quad$, sbend$, rf_bend$, & hkicker$, vkicker$, kicker$, elseparator$) call out_io (s_fatal$, r_name, & 'FOR MULTIPASS LORD: ' // ele_full_name(ele, '@N (&#)'), & diff --git a/bmad/code/multipole_ele_to_ab.f90 b/bmad/code/multipole_ele_to_ab.f90 index 7b818cc676..4163f69c1b 100644 --- a/bmad/code/multipole_ele_to_ab.f90 +++ b/bmad/code/multipole_ele_to_ab.f90 @@ -431,7 +431,7 @@ subroutine convert_this_ab (this_ele, p_type, a_pole, b_pole, this_a, this_b) const = this_ele%value(k3$) * this_ele%value(l$) ref_exp = 3 -case (ab_multipole$, sad_mult$) ! multipoles do not scale +case (ab_multipole$, sad_mult$, thick_multipole$) ! multipoles do not scale return case default diff --git a/bmad/code/offset_particle.f90 b/bmad/code/offset_particle.f90 index 0658666be3..725e4eb8f4 100644 --- a/bmad/code/offset_particle.f90 +++ b/bmad/code/offset_particle.f90 @@ -247,7 +247,7 @@ subroutine offset_particle (ele, set, orbit, set_tilt, set_hvkicks, drift_to_edg pz = rel_p**2 - orbit%vec(2)**2 - orbit%vec(4)**2 if (pz <= 0) then - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ else p_vec0 = [orbit%vec(2), orbit%vec(4), sign_z_vel * sqrt(pz)] p_vec = matmul(position%w, p_vec0) @@ -445,7 +445,7 @@ subroutine offset_particle (ele, set, orbit, set_tilt, set_hvkicks, drift_to_edg pz = rel_p**2 - orbit%vec(2)**2 - orbit%vec(4)**2 if (pz <= 0) then - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ else p_vec0 = [orbit%vec(2), orbit%vec(4), sign_z_vel * sqrt(pz)] p_vec = matmul(position%w, p_vec0) diff --git a/bmad/code/valid_mat6_calc_method.f90 b/bmad/code/valid_mat6_calc_method.f90 index 0001b8512a..90bd25b7d4 100644 --- a/bmad/code/valid_mat6_calc_method.f90 +++ b/bmad/code/valid_mat6_calc_method.f90 @@ -210,7 +210,7 @@ function valid_mat6_calc_method (ele, species, mat6_calc_method) result (is_vali case (null_ele$) ! Nothing to do -case (octupole$) +case (octupole$, thick_multipole$) select case (mat6_calc_method) case (auto$, bmad_standard$, symp_lie_ptc$, taylor$, tracking$, custom$) is_valid = .true. diff --git a/bmad/code/valid_tracking_method.f90 b/bmad/code/valid_tracking_method.f90 index f5fb190b3e..bb5d1fe38e 100644 --- a/bmad/code/valid_tracking_method.f90 +++ b/bmad/code/valid_tracking_method.f90 @@ -217,7 +217,7 @@ function valid_tracking_method (ele, species, tracking_method) result (is_valid) case (null_ele$) ! Nothing to do -case (octupole$) +case (octupole$, thick_multipole$) select case (method) case (bmad_standard$, symp_lie_ptc$, runge_kutta$, linear$, taylor$, time_runge_kutta$, custom$) is_valid = .true. diff --git a/bmad/code/write_lattice_in_foreign_format.f90 b/bmad/code/write_lattice_in_foreign_format.f90 index 8596d5c175..7ad1d931b9 100644 --- a/bmad/code/write_lattice_in_foreign_format.f90 +++ b/bmad/code/write_lattice_in_foreign_format.f90 @@ -293,7 +293,7 @@ subroutine write_lattice_in_foreign_format (out_type, out_file_name, lat, ref_or monopole = .false. if (out_type == 'ELEGANT') then select case (ele%key) - case (quadrupole$, sextupole$, octupole$) ! Elegant + case (quadrupole$, sextupole$, octupole$, thick_multipole$) ! Elegant call multipole_ele_to_kt(ele, .true., ix_pole_max, knl, tilts, magnetic$, include_kicks$) if (count(knl /= 0) == 1 .and. all(knl(0:3) == 0)) monopole = .true. end select @@ -668,7 +668,7 @@ subroutine write_lattice_in_foreign_format (out_type, out_file_name, lat, ref_or ! Special case where element is a pure thick N-pole of order greater than octupole. select case (ele%key) - case (quadrupole$, sextupole$, octupole$) ! Elegant + case (quadrupole$, sextupole$, octupole$, thick_multipole$) ! Elegant call multipole_ele_to_kt(ele, .true., ix_pole_max, knl, tilts, magnetic$, include_kicks$) if (count(knl /= 0) == 1 .and. all(knl(0:3) == 0)) then n = find_location(knl /= 0, .true.) - 1 diff --git a/bmad/doc/beam-init.tex b/bmad/doc/beam-init.tex index 79a0324dfa..09966f9b3f 100644 --- a/bmad/doc/beam-init.tex +++ b/bmad/doc/beam-init.tex @@ -406,3 +406,61 @@ \section{File Based Beam Initialization} When the particle coordinates are read in the centroid will be shifted by the setting of \vn{beam_init%center} (unless \vn{beam_init%use_particle_start} is set True) and \vn{beam_init%center_jitter}. + +%----------------------------------------------------------------- +\subsection{New Beam Initialization Format} + +2023/11: Note! The above ASCII format is in the process of being replaced. The new ASCII format is +still undergoing testing so caution must be used when using the new format. + +The new ASCII format describes a particle bunch with a \vn{header} section followed by a \vn{table} +of particle parameters. Multiple bunches that comprise a beam can be specified by multiple header +section / particle parameter table pairs, one pair for each bunch. An example header section: +\begin{example} +\# The header field lines all start with a pound "\#" sign. +\# Any line in the header field that does not start with a recognized parameter or +\# does not have an equal sign is ignored. +\# my_param = 1.23 ! Thus Custom parameters can be set an will be ignored by Bmad. +\# species = proton ! This parameter will be read by Bmad. +\# spin = 1, 0, 0 ! and this one too. +\# The last line in the header field starts with "\#!" and defines the table columns. +\#! index x px y py ... etc... +\end{example} +The header section lines all start with a pound ``\#'' sign. The last line in the header section +must start with ``\#!'' and this line defines the particle parameter table columns. With the +exception of the last line, all header lines will be ignored except ones that begin with a +recognized parameter followed by an equal sign. Recognized parameters are the components of the +\vn{coord_struct}, as documented in \sref{s:coord.struct}, that describes individual particles. In +addition, the following parameters are recognized: +\begin{example} + charge_tot ! Total bunch charge (including dead particles). + s_position ! Longitudinal position of bunch. Can be used in place of "s". + time ! Time particles of bunch are at. Can be used in place of "t". +\end{example} +These parameters, if present, will be used to set the corresponding particle parameter in all the +particles of the corresponding bunch. Possible \vn{location} and \vn{state} parameter settings are +documented in \sref{s:coord.struct}. The string equivalent to any setting is obtained by removing +the trailing ``\$'' from the variable name. For example, the variable \vn{alive\$} which is a +possible \vn{state} setting becomes the string \vn{alive}. Note: \vn{charge_tot} (total bunch +charge) will superceed \vn{charge} (the charge per particle). + +The particle parameter table follows the header section. Each row gives the parameters for one +particle. Not all particle parameters must be specified. If a particular parameter is not present, +its default value will be used or, if present, the value given in the header section. Column order +is irrelavent and what determines what particle parameter is associated with a given column is the +last line of the header section which starts with the characters \vn{\#!}. Except for vector +parameters, column names correspond to \vn{coord_struct} parameters the same as in the header +section. For parameters that are vectors, the mapping from column name to parameter is: +\begin{example} + Column Name Corresponding coord_struct components + ---------------------- ----------------------------------------- + x, px, y, py, z, pz vec(1), ..., vec(6) + spin_x, spin_y, spin_z spin(1), spin(2), spin(3) + field_x, field_y field(1), field(2) + phase_x, phase_y phase(1), phase(2) +\end{example} +Additionally, there can be (but is not required) an \vn{index} column giving the particle index in +the array of particles of a bunch. This column is ignored so, for example, values in the first line +of the table will always be used to set the particle with index 1 independent of the +value given in the index column. This behavior is implemented so that a beam file can be edited to add +or remove particles without worrying about reindexing. diff --git a/bmad/doc/cover-page.tex b/bmad/doc/cover-page.tex index 1d0667ab2b..81d71530be 100644 --- a/bmad/doc/cover-page.tex +++ b/bmad/doc/cover-page.tex @@ -3,7 +3,7 @@ \begin{flushright} \large - Revision: October 3, 2023 \\ + Revision: November 1, 2023 \\ \end{flushright} \pdfbookmark[0]{Preamble}{Preamble} diff --git a/bmad/doc/elements.tex b/bmad/doc/elements.tex index 562ed2de9e..eb24691014 100644 --- a/bmad/doc/elements.tex +++ b/bmad/doc/elements.tex @@ -10,35 +10,35 @@ \chapter{Lattice Elements} \centering {\tt \begin{tabular}{llll} \toprule - {\it Element} & {\it Section} & {\it Element} & {\it Section} \\ \midrule - AB_Multipole & \ref{s:ab.m} & Mask & \ref{s:mask} \\ - AC_Kicker & \ref{s:ac.kick} & Match & \ref{s:match} \\ - BeamBeam & \ref{s:beambeam} & Monitor & \ref{s:monitor} \\ - Beginning_Ele & \ref{s:begin.ele} & Multipole & \ref{s:mult} \\ - Converter & \ref{s:converter} & Null_Ele & \ref{s:null.ele} \\ - Crab_Cavity & \ref{s:crab} & Octupole & \ref{s:oct} \\ - Custom & \ref{s:custom} & Patch & \ref{s:patch} \\ - Drift & \ref{s:drift} & Photon_Fork & \ref{s:fork} \\ - E_Gun & \ref{s:e.gun} & Pipe & \ref{s:monitor} \\ - Ecollimator & \ref{s:col} & Quadrupole & \ref{s:quad} \\ - ElSeparator & \ref{s:elsep} & Rbend & \ref{s:bend} \\ - EM_Field & \ref{s:em.field} & Rcollimator & \ref{s:col} \\ - Fiducial & \ref{s:fiducial} & RF_bend & \ref{s:rf.bend} \\ - Floor_Shift & \ref{s:floor.ele} & RFcavity & \ref{s:rfcav} \\ - Foil & \ref{s:foil} & Sad_Mult & \ref{s:sad.mult} \\ - Fork & \ref{s:fork} & Sbend & \ref{s:bend} \\ - GKicker & \ref{s:gkicker} & Sextupole & \ref{s:sex} \\ - HKicker & \ref{s:hvkicker} & Sol_Quad & \ref{s:sq} \\ - Hybrid & \ref{s:hybrid} & Solenoid & \ref{s:sol} \\ - Instrument & \ref{s:monitor} & Taylor & \ref{s:taylor} \\ - Kicker & \ref{s:kicker} & Undulator & \ref{s:wiggler} \\ - Lcavity & \ref{s:lcav} & VKicker & \ref{s:hvkicker} \\ - Marker & \ref{s:mark} & Wiggler & \ref{s:wiggler} \\ + {\it Element} & {\it Section} & {\it Element} & {\it Section} \\ \midrule + AB_Multipole & \ref{s:ab.m} & Match & \ref{s:match} \\ + AC_Kicker & \ref{s:ac.kick} & Monitor & \ref{s:monitor} \\ + BeamBeam & \ref{s:beambeam} & Multipole & \ref{s:mult} \\ + Beginning_Ele & \ref{s:begin.ele} & Null_Ele & \ref{s:null.ele} \\ + Converter & \ref{s:converter} & Octupole & \ref{s:oct} \\ + Crab_Cavity & \ref{s:crab} & Patch & \ref{s:patch} \\ + Custom & \ref{s:custom} & Photon_Fork & \ref{s:fork} \\ + Drift & \ref{s:drift} & Pipe & \ref{s:monitor} \\ + E_Gun & \ref{s:e.gun} & Quadrupole & \ref{s:quad} \\ + Ecollimator & \ref{s:col} & Rbend & \ref{s:bend} \\ + ElSeparator & \ref{s:elsep} & Rcollimator & \ref{s:col} \\ + EM_Field & \ref{s:em.field} & RF_bend & \ref{s:rf.bend} \\ + Fiducial & \ref{s:fiducial} & RFcavity & \ref{s:rfcav} \\ + Floor_Shift & \ref{s:floor.ele} & Sad_Mult & \ref{s:sad.mult} \\ + Foil & \ref{s:foil} & Sbend & \ref{s:bend} \\ + Fork & \ref{s:fork} & Sextupole & \ref{s:sex} \\ + GKicker & \ref{s:gkicker} & Sol_Quad & \ref{s:sq} \\ + HKicker & \ref{s:hvkicker} & Solenoid & \ref{s:sol} \\ + Hybrid & \ref{s:hybrid} & Taylor & \ref{s:taylor} \\ + Instrument & \ref{s:monitor} & Thick_Multipole & \ref{s:thick.mult} \\ + Kicker & \ref{s:kicker} & Undulator & \ref{s:wiggler} \\ + Lcavity & \ref{s:lcav} & VKicker & \ref{s:hvkicker} \\ + Marker & \ref{s:mark} & Wiggler & \ref{s:wiggler} \\ + Mask & \ref{s:mask} & & \\ \bottomrule \end{tabular} -} -\caption{Table of element types suitable for use with charged particles. Also see Table~\ref{t:control.classes}} -\label{t:particle.classes} +} \caption{Table of element types suitable for use with charged particles. Also see +Table~\ref{t:control.classes}} \label{t:particle.classes} \end{table} \index{MAD} @@ -5047,6 +5047,46 @@ \section{Taylor} \newpage +%----------------------------------------------------------------- +\section{Thick_Multipole} +\label{s:thick.mult} +\index{thick_multipole|hyperbf} + +A \vn{thick_multipole} element is like a \vn{sextupole} or \vn{octupole} element except that the +\vn{thick_multipole} does not have a \vn{K2} sextupole like parameter nor a \vn{K3} octupole like +parameter. Rather, \vn{thick_multipoles}, like \vn{sextupole} or \vn{octupole} elements, have +\vn{a0}, \vn{a1}, \vn{a2}, etc. and \vn{b0}, \vn{b1}, \vn{b2}, etc. multipoles +(\sref{s:mag.field}). In terms of tracking, given equivalent multipole values, \vn{thick_multipoles} +are indistinguishable from \vn{sextupoles} or \vn{octupoles}. \vn{thick_multipole} elements are +useful for differentiating elements that only have higher order multipole moments. + +General \vn{thick_multipole} attributes are: +\begin{center} +\tt +\begin{tabular}{llll} \toprule + {\sl Attribute Class} & Section & {\sl Attribute Class} & Section \\ \midrule + Aperture limits & \ref{s:limit} & Mag \& Elec multipoles & \ref{s:multip} \\ + Chamber wall & \ref{s:wall} & Offsets, pitches \& tilt & \ref{s:offset} \\ + Custom Attributes & \ref{s:cust.att} & Overlapping Fields & \ref{s:overlap} \\ + Description strings & \ref{s:alias} & Reference energy & \ref{s:energy} \\ + Fringe Fields & \ref{s:fringe} & Superposition & \ref{s:super} \\ + Hkick \& Vkick & \ref{s:kick} & Symplectify & \ref{s:symp} \\ + Integration settings & \ref{s:integ} & Field Maps & \ref{s:fieldmap} \\ + Is_on & \ref{s:is.on} & Tracking \& transfer map & \ref{c:methods} \\ + Length & \ref{s:l} & & \\ + \bottomrule +\end{tabular} +\end{center} +\toffset +See \sref{s:list.thick.multipole} for a full list of element attributes along with a their units. + +Example: +\begin{example} + tm1: thick_multipole, l = 4.5, tilt, x_pitch = 0.34, a7 = 1.23e3, b8 = 7.54e5 +\end{example} + +\newpage + %----------------------------------------------------------------- \section{Wiggler and Undulator} \label{s:wiggler} diff --git a/bmad/doc/list-element-attributes.tex b/bmad/doc/list-element-attributes.tex index 430dad53c6..048a8fca80 100644 --- a/bmad/doc/list-element-attributes.tex +++ b/bmad/doc/list-element-attributes.tex @@ -1320,6 +1320,35 @@ \chapter{List of Element Attributes} \end{tabular} \vfill + %--------------------------------- + \section{Thick_Multipole Element Attributes} + \label{s:list.thick.multipole} + + \begin{tabular}{llll} \toprule +a0 - a20, b0 - b20 & fringe_at & ptc_canonical_coords & wall \\ +alias & fringe_type & ptc_integration_type & wrap_superimpose \\ +aperture [m] & gen_grad_map & ref_origin & x1_limit [m] \\ +aperture_at & grid_field & ref_time_start [sec] & x2_limit [m] \\ +aperture_type & hkick & reference & x_limit [m] \\ +bl_hkick [T*m] & integrator_order & scale_multipoles & x_offset [m] \\ +bl_vkick [T*m] & is_on & space_charge_method & x_offset_tot [m] \\ +cartesian_map & l [m] & spin_fringe_on & x_pitch [rad] \\ +create_jumbo_slave & lord_pad1 [m] & spin_tracking_method & x_pitch_tot [rad] \\ +csr_ds_step [m] & lord_pad2 [m] & sr_wake & y1_limit [m] \\ +csr_method & lr_freq_spread [Hz] & sr_wake_file & y2_limit [m] \\ +cylindrical_map & lr_self_wake_on & static_linear_map & y_limit [m] \\ +delta_ref_time [sec] & lr_wake & superimpose & y_offset [m] \\ +descrip & lr_wake_file & symplectify & y_offset_tot [m] \\ +ds_step [m] & mat6_calc_method & taylor_map_includes_offsets & y_pitch [rad] \\ +e_tot [eV] & multipoles_on & tilt [rad] & y_pitch_tot [rad] \\ +ele_origin & num_steps & tilt_tot [rad] & z_offset [m] \\ +field_calc & offset [m] & tracking_method & z_offset_tot [m] \\ +field_master & offset_moves_aperture & type & \\ +field_overlaps & p0c [eV] & vkick & \\ + \bottomrule + \end{tabular} + \vfill + %--------------------------------- \section{Wiggler and Undulator Element Attributes} \label{s:list.wiggler} diff --git a/bmad/doc/tracking.tex b/bmad/doc/tracking.tex index e8db196cf1..5af11d1fa6 100644 --- a/bmad/doc/tracking.tex +++ b/bmad/doc/tracking.tex @@ -19,7 +19,7 @@ \section{The coord_struct} real(rp) field(2) ! Photon (x, y) field intensity. real(rp) phase(2) ! Photon (x, y) phase. real(rp) charge ! charge in a particle (Coul). - real(rp) path_len ! path length (used by coherent photons). + real(rp) dt_dref ! path length (used by coherent photons). real(rp) r ! For general use. Not used by Bmad. real(rp) p0c ! For non-photons: Reference momentum. Negative -> going backwards. ! For photons: Photon momentum (not reference). @@ -28,7 +28,7 @@ \section{The coord_struct} ! May be -1 or -2 if element is not associated with a lattice. integer ix_branch ! Index of the lattice branch the particle is in. integer ix_user ! Not used by \bmad - integer state ! alive\$, lost\$, lost_neg_x_aperture\$, etc. + integer state ! alive\$, lost\$, lost_neg_x\$, etc. integer direction ! +1 or -1. Sign of longitudinal direction of motion (ds/dt). ! This is independent of the element orientation. integer time_dir ! +1 or -1. Time direction. -1 => Traveling backwards in time. @@ -133,26 +133,28 @@ \section{The coord_struct} The \vn{%state} component will be one of: \begin{example} not_set\$ + pre_born\$ alive\$ lost\$ - lost_neg_x_aperture\$ - lost_pos_x_aperture\$ - lost_neg_y_aperture\$ - lost_pos_y_aperture\$ - lost_z_aperture\$ + lost_neg_x\$ + lost_pos_x\$ + lost_neg_y\$ + lost_pos_y\$ + lost_z\$ + lost_pz\$ \end{example} The \vn{not_set\$} setting indicates that the \vn{coord_struct} has not yet been used in tracking. The \vn{alive\$} setting indicates that the particle is alive. If a particle is ``dead'', -the \vn{%state} component will be set to one of the other settings. The \vn{lost_neg_x_aperture\$} +the \vn{%state} component will be set to one of the other settings. The \vn{lost_neg_x\$} setting indicates that the particle was lost at an aperture on the $-x$ side of the element. The -\vn{lost_z_aperture\$} setting is used to indicate that the particle tried to ``turn around''. This +\vn{lost_z\$} setting is used to indicate that the particle tried to ``turn around''. This can happen, for example, with strong magnetic fields or when a particle has been decelerated too much. The reason why the particle is marked lost in this case is due to the fact that $s$-based tracking algorithms cannot handle particles that reverse direction. The exception is that the \vn{time_runge_kutta} (\sref{s:tkm}) tracking method can handle particle reversal so in this case, particles will not be declared lost if they reverse direction. -The \vn{lost\$} setting is used when neither of the other \vn{lost_*_aperture\$} settings are not +The \vn{lost\$} setting is used when neither of the other \vn{lost_*\$} settings are not appropriate. For example, \vn{lost\$} is used in Runge-Kutta tracking when the adaptive step size becomes too small (this may happen if the fields do not obey Maxwell's equations). diff --git a/bmad/low_level/apply_energy_kick.f90 b/bmad/low_level/apply_energy_kick.f90 index 1f146e717e..000d775ec1 100644 --- a/bmad/low_level/apply_energy_kick.f90 +++ b/bmad/low_level/apply_energy_kick.f90 @@ -16,7 +16,7 @@ ! Output: ! orbit -- coord_struct: coordinates with added dE energy kick. ! %vec(6) -- Set to -1 if particle energy becomes negative. -! %state -- Set to lost_pz_aperture$ is particle energy becomes negative. +! %state -- Set to lost_pz$ is particle energy becomes negative. ! mat6(6,6) -- real(rp), optional: Transfer matrix transfer matrix including energy kick. !- @@ -44,7 +44,7 @@ subroutine apply_energy_kick (dE, orbit, ddE_dr, mat6, make_matrix) if (E_new < mc2) then orbit%vec(6) = -1 orbit%beta = 0 - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ return endif diff --git a/bmad/low_level/check_aperture_limit.f90 b/bmad/low_level/check_aperture_limit.f90 index 4e7fe8fb74..9da95983e0 100644 --- a/bmad/low_level/check_aperture_limit.f90 +++ b/bmad/low_level/check_aperture_limit.f90 @@ -257,12 +257,12 @@ recursive subroutine check_aperture_limit (orb, ele, particle_at, param, old_orb endif if (abs(x_particle / x_width2) > abs(y_particle / y_width2)) then - if (x_particle > 0) then; orb%state = lost_pos_x_aperture$ - else; orb%state = lost_neg_x_aperture$ + if (x_particle > 0) then; orb%state = lost_pos_x$ + else; orb%state = lost_neg_x$ endif else - if (y_particle > 0) then; orb%state = lost_pos_y_aperture$ - else; orb%state = lost_neg_y_aperture$ + if (y_particle > 0) then; orb%state = lost_pos_y$ + else; orb%state = lost_neg_y$ endif endif @@ -272,7 +272,7 @@ recursive subroutine check_aperture_limit (orb, ele, particle_at, param, old_orb if (x1_lim /= 0 .and. x_particle < x1_lim) then f = abs((x_particle - x1_lim) / (x2_lim - x1_lim)) if (f > unstable_factor) then - orb%state = lost_neg_x_aperture$ + orb%state = lost_neg_x$ unstable_factor = f endif endif @@ -280,7 +280,7 @@ recursive subroutine check_aperture_limit (orb, ele, particle_at, param, old_orb if (x2_lim /= 0 .and. x_particle > x2_lim) then f = abs((x_particle - x2_lim) / (x2_lim - x1_lim)) if (f > unstable_factor) then - orb%state = lost_pos_x_aperture$ + orb%state = lost_pos_x$ unstable_factor = f endif endif @@ -288,7 +288,7 @@ recursive subroutine check_aperture_limit (orb, ele, particle_at, param, old_orb if (y1_lim /= 0 .and. y_particle < y1_lim) then f = abs((y_particle - y1_lim) / (y2_lim - y1_lim)) if (f > unstable_factor) then - orb%state = lost_neg_y_aperture$ + orb%state = lost_neg_y$ unstable_factor = f endif endif @@ -296,7 +296,7 @@ recursive subroutine check_aperture_limit (orb, ele, particle_at, param, old_orb if (y2_lim /= 0 .and. y_particle > y2_lim) then f = abs((y_particle - y2_lim) / (y2_lim - y1_lim)) if (f > unstable_factor) then - orb%state = lost_pos_y_aperture$ + orb%state = lost_pos_y$ unstable_factor = f endif endif diff --git a/bmad/low_level/make_mat6_bmad.f90 b/bmad/low_level/make_mat6_bmad.f90 index 0b9224ad99..48ef9cbe13 100644 --- a/bmad/low_level/make_mat6_bmad.f90 +++ b/bmad/low_level/make_mat6_bmad.f90 @@ -66,7 +66,7 @@ subroutine make_mat6_bmad (ele, param, start_orb, end_orb, err) select case (key) case (ab_multipole$, crab_cavity$, sad_mult$, beambeam$, sbend$, patch$, quadrupole$, drift$, & rcollimator$, ecollimator$, monitor$, instrument$, pipe$, kicker$, hkicker$, vkicker$, & - elseparator$, rfcavity$, lcavity$, match$, multipole$, octupole$, sextupole$, & + elseparator$, rfcavity$, lcavity$, match$, multipole$, octupole$, thick_multipole$, sextupole$, & sol_quad$, solenoid$, taylor$, wiggler$, undulator$, ac_kicker$, gkicker$, foil$) tm = ele%tracking_method field_ele => pointer_to_field_ele(ele, 1) diff --git a/bmad/low_level/orbit_too_large.f90 b/bmad/low_level/orbit_too_large.f90 index 58d633f274..371f13e3bc 100644 --- a/bmad/low_level/orbit_too_large.f90 +++ b/bmad/low_level/orbit_too_large.f90 @@ -44,21 +44,21 @@ function orbit_too_large (orbit, param, check_momentum) result (is_too_large) ! Test aperture if (orbit%vec(1) > bmad_com%max_aperture_limit) then - orbit%state = lost_pos_x_aperture$ + orbit%state = lost_pos_x$ if (present(param)) param%unstable_factor = (abs(orbit%vec(1)) - bmad_com%max_aperture_limit) / bmad_com%max_aperture_limit return elseif (-orbit%vec(1) > bmad_com%max_aperture_limit) then - orbit%state = lost_neg_x_aperture$ + orbit%state = lost_neg_x$ if (present(param)) param%unstable_factor = (abs(orbit%vec(1)) - bmad_com%max_aperture_limit) / bmad_com%max_aperture_limit return endif if (orbit%vec(3) > bmad_com%max_aperture_limit) then - orbit%state = lost_pos_y_aperture$ + orbit%state = lost_pos_y$ if (present(param)) param%unstable_factor = (abs(orbit%vec(3)) - bmad_com%max_aperture_limit) / bmad_com%max_aperture_limit return elseif (-orbit%vec(3) > bmad_com%max_aperture_limit) then - orbit%state = lost_neg_y_aperture$ + orbit%state = lost_neg_y$ if (present(param)) param%unstable_factor = (abs(orbit%vec(3)) - bmad_com%max_aperture_limit) / bmad_com%max_aperture_limit return endif @@ -74,7 +74,7 @@ function orbit_too_large (orbit, param, check_momentum) result (is_too_large) if (orbit%species == photon$) then if (abs(orbit%vec(6)) > 1) then - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ if (present(param)) param%unstable_factor = abs(orbit%vec(6)) - 1 return endif @@ -88,7 +88,7 @@ function orbit_too_large (orbit, param, check_momentum) result (is_too_large) rel_p = 1 + orbit%vec(6) if (rel_p < 0) then - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ if (present(param)) param%unstable_factor = abs(rel_p) + 1e-6_rp return endif @@ -99,16 +99,16 @@ function orbit_too_large (orbit, param, check_momentum) result (is_too_large) if (abs(orbit%vec(2)) > abs(orbit%vec(4))) then if (orbit%vec(2) > 0) then - orbit%state = lost_pos_x_aperture$ + orbit%state = lost_pos_x$ else - orbit%state = lost_neg_x_aperture$ + orbit%state = lost_neg_x$ endif else if (orbit%vec(4) > 0) then - orbit%state = lost_pos_y_aperture$ + orbit%state = lost_pos_y$ else - orbit%state = lost_neg_y_aperture$ + orbit%state = lost_neg_y$ endif endif diff --git a/bmad/low_level/solenoid_track_and_mat.f90 b/bmad/low_level/solenoid_track_and_mat.f90 index 290e6a951c..91796330dd 100644 --- a/bmad/low_level/solenoid_track_and_mat.f90 +++ b/bmad/low_level/solenoid_track_and_mat.f90 @@ -47,7 +47,7 @@ subroutine solenoid_track_and_mat (ele, length, param, start_orb, end_orb, mat6, yp = end_orb%vec(4) - kss0 * end_orb%vec(1) ff = rel_p**2 - xp**2 - yp**2 if (ff <= 0) then - end_orb%state = lost_pz_aperture$ + end_orb%state = lost_pz$ return endif pz = sqrt(ff) diff --git a/bmad/low_level/symp_lie_bmad.f90 b/bmad/low_level/symp_lie_bmad.f90 index 36eeafb842..58a248dc77 100644 --- a/bmad/low_level/symp_lie_bmad.f90 +++ b/bmad/low_level/symp_lie_bmad.f90 @@ -428,13 +428,13 @@ subroutine err_set (err, plane) if (plane == x_plane$) then orbit%vec(1) = sign(2 * bmad_com%max_aperture_limit, orbit%vec(1)) - if (orbit%vec(1) > 0) then ; orbit%state = lost_pos_x_aperture$ - else; orbit%state = lost_neg_x_aperture$ + if (orbit%vec(1) > 0) then ; orbit%state = lost_pos_x$ + else; orbit%state = lost_neg_x$ endif else orbit%vec(3) = sign(2 * bmad_com%max_aperture_limit, orbit%vec(3)) - if (orbit%vec(3) > 0) then ; orbit%state = lost_pos_y_aperture$ - else; orbit%state = lost_neg_y_aperture$ + if (orbit%vec(3) > 0) then ; orbit%state = lost_pos_y$ + else; orbit%state = lost_neg_y$ endif endif diff --git a/bmad/low_level/track1_bmad.f90 b/bmad/low_level/track1_bmad.f90 index 461851200d..db70b388d3 100644 --- a/bmad/low_level/track1_bmad.f90 +++ b/bmad/low_level/track1_bmad.f90 @@ -165,7 +165,7 @@ subroutine track1_bmad (orbit, ele, param, err_flag, track, mat6, make_matrix) ! octupole ! The octupole is modeled using kick-drift. -case (octupole$) +case (octupole$, thick_multipole$) call track_a_thick_multipole (orbit, ele, param, mat6, make_matrix) !----------------------------------------------- diff --git a/bmad/low_level/track_a_bend.f90 b/bmad/low_level/track_a_bend.f90 index 08ab105fba..c3e930ce76 100644 --- a/bmad/low_level/track_a_bend.f90 +++ b/bmad/low_level/track_a_bend.f90 @@ -164,7 +164,7 @@ subroutine track_a_bend (orbit, ele, param, mat6, make_matrix) sinc_a = sinc(angle) pt = sqrt(rel_p2 - py**2) if (abs(px) > pt) then - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ return endif g_p = g_tot / pt diff --git a/bmad/low_level/track_a_crab_cavity.f90 b/bmad/low_level/track_a_crab_cavity.f90 index 608a6696b2..7664710de6 100644 --- a/bmad/low_level/track_a_crab_cavity.f90 +++ b/bmad/low_level/track_a_crab_cavity.f90 @@ -82,7 +82,7 @@ subroutine track_a_crab_cavity (orbit, ele, param, mat6, make_matrix) E_new = E_old + voltage * cos(phase) * k_rf * orbit%vec(1) * orbit%p0c call convert_total_energy_to (E_new, orbit%species, beta = orbit%beta, pc = pc, err_flag = err, print_err = .false.) if (err) then - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ return endif diff --git a/bmad/low_level/track_a_drift.f90 b/bmad/low_level/track_a_drift.f90 index 7fd603aa24..01807aa1b9 100644 --- a/bmad/low_level/track_a_drift.f90 +++ b/bmad/low_level/track_a_drift.f90 @@ -51,7 +51,7 @@ subroutine track_a_drift (orb, length, mat6, make_matrix, ele_orientation, inclu py = rel_z_vel * orb%vec(4) / rel_pc pxy2 = px**2 + py**2 if (pxy2 >= 1) then - orb%state = lost_pz_aperture$ + orb%state = lost_pz$ return endif ps = sqrt(1 - pxy2) diff --git a/bmad/low_level/track_a_lcavity.f90 b/bmad/low_level/track_a_lcavity.f90 index 8f57b5d863..9991000958 100644 --- a/bmad/low_level/track_a_lcavity.f90 +++ b/bmad/low_level/track_a_lcavity.f90 @@ -123,7 +123,7 @@ subroutine track_a_lcavity (orbit, ele, param, mat6, make_matrix) ph_err(1) = phase_func(phase1, status) if (abs(dphase) > pi) then - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ return elseif (abs(dphase) < phase_abs_tol) then @@ -140,7 +140,7 @@ subroutine track_a_lcavity (orbit, ele, param, mat6, make_matrix) dph = phase2 - phase1 phase2 = phase1 + 2 * sign_of(dph) * max(abs(dph), 0.1) if (abs(phase2 - phase1) > pi) then - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ return endif ph_err(2) = phase_func(phase2, status) @@ -240,7 +240,7 @@ subroutine track_this_lcavity (rf_phase, orbit, make_matrix) dE = gradient_net * length E_end = E_start + dE if (E_end <= mass_of(orbit%species)) then - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ orbit%vec(6) = -1.01 ! Something less than -1 if (present(mat6)) mat6 = 0 return diff --git a/bmad/low_level/track_a_rfcavity.f90 b/bmad/low_level/track_a_rfcavity.f90 index 132fb6cbea..694283e9e3 100644 --- a/bmad/low_level/track_a_rfcavity.f90 +++ b/bmad/low_level/track_a_rfcavity.f90 @@ -117,7 +117,7 @@ subroutine track_a_rfcavity (orbit, ele, param, mat6, make_matrix) call apply_energy_kick (dE, orbit, [0.0_rp, 0.0_rp]) if (orbit%vec(6) == -1) then - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ return endif diff --git a/bmad/low_level/track_a_thick_multipole.f90 b/bmad/low_level/track_a_thick_multipole.f90 index 50c1491be6..2a26afe728 100644 --- a/bmad/low_level/track_a_thick_multipole.f90 +++ b/bmad/low_level/track_a_thick_multipole.f90 @@ -157,7 +157,7 @@ subroutine track_this_elsep (step_len) p_factor = (mc2 / ele%value(p0c$))**2 + px**2 + py**2 if (E_rel**2 < p_factor) then orbit = start_orb - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ return endif diff --git a/bmad/modules/attribute_mod.f90 b/bmad/modules/attribute_mod.f90 index 1f12debe2c..5343272797 100644 --- a/bmad/modules/attribute_mod.f90 +++ b/bmad/modules/attribute_mod.f90 @@ -803,7 +803,7 @@ subroutine init_attribute_name_array () select case (i) case (ac_kicker$, elseparator$, kicker$, octupole$, quadrupole$, sbend$, rbend$, & sextupole$, solenoid$, sol_quad$, ab_multipole$, wiggler$, undulator$, & - hkicker$, vkicker$, sad_mult$) + hkicker$, vkicker$, sad_mult$, thick_multipole$) attrib_array(i, a0$:a21$)%name = ['A0 ', & 'A1 ', 'A2 ', 'A3 ', 'A4 ', 'A5 ', & 'A6 ', 'A7 ', 'A8 ', 'A9 ', 'A10', & @@ -1384,6 +1384,13 @@ subroutine init_attribute_name_array () call init_attribute_name1 (octupole$, grid_field$, 'GRID_FIELD') call init_attribute_name1 (octupole$, ptc_canonical_coords$, 'PTC_CANONICAL_COORDS') +call init_attribute_name1 (thick_multipole$, field_master$, 'FIELD_MASTER') +call init_attribute_name1 (thick_multipole$, cartesian_map$, 'CARTESIAN_MAP') +call init_attribute_name1 (thick_multipole$, cylindrical_map$, 'CYLINDRICAL_MAP') +call init_attribute_name1 (thick_multipole$, gen_grad_map$, 'GEN_GRAD_MAP') +call init_attribute_name1 (thick_multipole$, grid_field$, 'GRID_FIELD') +call init_attribute_name1 (thick_multipole$, ptc_canonical_coords$, 'PTC_CANONICAL_COORDS') + call init_attribute_name1 (patch$, l$, 'L', quasi_free$) call init_attribute_name1 (patch$, user_sets_length$, 'USER_SETS_LENGTH') call init_attribute_name1 (patch$, t_offset$, 'T_OFFSET') @@ -3086,7 +3093,7 @@ function check_this_attribute_free (ele, attrib_name, lat, err_print_flag, excep if (.not. dep_attribs_free .and. ele%lord_status == multipass_lord$ .and. & .not. ele%field_master .and. nint(ele%value(multipass_ref_energy$)) == user_set$) then select case (ele%key) - case (quadrupole$, sextupole$, octupole$, solenoid$, sol_quad$, sbend$, rf_bend$, & + case (quadrupole$, sextupole$, octupole$, thick_multipole$, solenoid$, sol_quad$, sbend$, rf_bend$, & hkicker$, vkicker$, kicker$, ac_kicker$, elseparator$, lcavity$, rfcavity$) return ! Is free end select diff --git a/bmad/modules/bmad_struct.f90 b/bmad/modules/bmad_struct.f90 index d85c17ef87..7d3ad82fa0 100644 --- a/bmad/modules/bmad_struct.f90 +++ b/bmad/modules/bmad_struct.f90 @@ -494,14 +494,19 @@ module bmad_struct integer, parameter :: pre_born$ = 0 ! EG: before cathode emission. Conforms to OpenPMD standard. integer, parameter :: alive$ = 1 ! Conforms to OpenPMD standard. integer, parameter :: lost$ = 2 -integer, parameter :: lost_neg_x_aperture$ = 3, lost_pos_x_aperture$ = 4 +integer, parameter :: lost_neg_x$ = 3, lost_pos_x$ = 4 +integer, parameter :: lost_neg_y$ = 5, lost_pos_y$ = 6 +integer, parameter :: lost_z$ = 7 +integer, parameter :: lost_pz$ = 8 ! Particle "turned around" when not tracking with time_runge_kutta. + +integer, parameter :: lost_neg_x_aperture$ = 3, lost_pos_x_aperture$ = 4 ! old names. integer, parameter :: lost_neg_y_aperture$ = 5, lost_pos_y_aperture$ = 6 integer, parameter :: lost_z_aperture$ = 7 integer, parameter :: lost_pz_aperture$ = 8 ! Particle "turned around" when not tracking with time_runge_kutta. ! State_name is not the full list of coord%state possible settings! Missing is not_set$ -character(12), parameter ::state_name(0:8) = [character(12):: 'Pre_Born', 'Alive', 'Lost', 'Hit_Neg_X', & - 'Hit_Pos_X', 'Hit_Neg_Y', 'Hit_Pos_Y', 'Hit_Pz_Aper', 'Hit_Z_Aper'] +character(12), parameter ::state_name(0:8) = [character(12):: 'Pre_Born', 'Alive', 'Lost', 'Lost_Neg_X', & + 'Lost_Pos_X', 'Lost_Neg_Y', 'Lost_Pos_Y', 'Lost_Pz', 'Lost_Z'] real(rp), parameter :: vec0$(6) = 0 @@ -534,7 +539,7 @@ module bmad_struct ! May be -1 if element is not associated with a lattice. integer :: ix_branch = -1 ! Index of the lattice branch the particle is in. integer :: ix_user = -1 ! For general use, not used by Bmad. - integer :: state = not_set$ ! alive$, lost$, lost_neg_x_aperture$, lost_pz_aperture$, etc. + integer :: state = not_set$ ! alive$, lost$, lost_neg_x_aperture$, lost_pz$, etc. integer :: direction = 1 ! +1 or -1. Sign of longitudinal direction of motion (ds/dt). ! This is independent of the element orientation. integer :: time_dir = 1 ! +1 or -1. Time direction. -1 => Traveling backwards in time. @@ -1563,7 +1568,7 @@ module bmad_struct integer, parameter :: photon_init$ = 53, sample$ = 54, detector$ = 55, sad_mult$ = 56, mask$ = 57 integer, parameter :: ac_kicker$ = 58, lens$ = 59, def_space_charge_com$ = 60, crab_cavity$ = 61 integer, parameter :: ramper$ = 62, def_ptc_com$ = 63, rf_bend$ = 64, gkicker$ = 65, foil$ = 66 -integer, parameter :: n_key$ = 66 +integer, parameter :: thick_multipole$ = 67, n_key$ = 67 ! A "!" as the first character is to prevent name matching by the key_name_to_key_index routine. @@ -1581,7 +1586,7 @@ module bmad_struct 'Undulator ', 'Diffraction_Plate ', 'Photon_Init ', 'Sample ', 'Detector ', & 'Sad_Mult ', 'Mask ', 'AC_Kicker ', 'Lens ', '!Space_Charge_Com ', & 'Crab_Cavity ', 'Ramper ', '!PTC_Com ', 'RF_Bend ', 'GKicker ', & - 'Foil '] + 'Foil ', 'Thick_Multipole '] ! These logical arrays get set in init_attribute_name_array and are used ! to sort elements that have kick or orientation attributes from elements that do not. @@ -2420,13 +2425,12 @@ end function next_in_branch !------------------------------------------------------------------------------------------------------- !------------------------------------------------------------------------------------------------------- !+ -! Function coord_state_name (coord_state, one_word) result (state_str) +! Function coord_state_name (coord_state) result (state_str) ! ! Routine to return the string representation of a coord%state state. ! ! Input: ! coord_state -- integer: coord%state value -! one_word -- logical, optional. Default False. If True then output string will be one word (no blanks). ! ! ! Output: @@ -2443,36 +2447,19 @@ function coord_state_name (coord_state, one_word) result (state_str) ! -if (logic_option(.false., one_word)) then - select case (coord_state) - case (not_set$); state_str = 'Not_Set' - case (pre_born$); state_str = 'Pre_Born' - case (alive$); state_str = 'Alive' - case (lost$); state_str = 'Lost' - case (lost_neg_x_aperture$); state_str = 'Hit_Neg_X' - case (lost_pos_x_aperture$); state_str = 'Hit_Pos_X' - case (lost_neg_y_aperture$); state_str = 'Hit_Neg_Y' - case (lost_pos_y_aperture$); state_str = 'Hit_Pos_Y' - case (lost_pz_aperture$); state_str = 'Hit_Pz_Aper' - case (lost_z_aperture$); state_str = 'Hit_Z_Aper' - case default; state_str = 'UNKNOWN!' - end select - -else - select case (coord_state) - case (not_set$); state_str = 'Not_Set' - case (pre_born$); state_str = 'Pre_Born' - case (alive$); state_str = 'Alive' - case (lost$); state_str = 'Lost' - case (lost_neg_x_aperture$); state_str = 'Hit -X Side' - case (lost_pos_x_aperture$); state_str = 'Hit +X Side' - case (lost_neg_y_aperture$); state_str = 'Hit -Y Side' - case (lost_pos_y_aperture$); state_str = 'Hit +Y Side' - case (lost_z_aperture$); state_str = 'Hit Z Side' - case (lost_pz_aperture$); state_str = 'Hit Energy Aper' - case default; state_str = 'UNKNOWN!' - end select -endif +select case (coord_state) +case (not_set$); state_str = 'Not_Set' +case (pre_born$); state_str = 'Pre_Born' +case (alive$); state_str = 'Alive' +case (lost$); state_str = 'Lost' +case (lost_neg_x$); state_str = 'Lost_Neg_X' +case (lost_pos_x$); state_str = 'Lost_Pos_X' +case (lost_neg_y$); state_str = 'Lost_Neg_Y' +case (lost_pos_y$); state_str = 'Lost_Pos_Y' +case (lost_pz$); state_str = 'Lost_Pz' +case (lost_z$); state_str = 'Lost_Z' +case default; state_str = 'UNKNOWN!' +end select end function coord_state_name diff --git a/bmad/modules/fringe_mod.f90 b/bmad/modules/fringe_mod.f90 index 8313ad13f3..1259d6f903 100644 --- a/bmad/modules/fringe_mod.f90 +++ b/bmad/modules/fringe_mod.f90 @@ -1477,7 +1477,7 @@ subroutine exact_bend_edge_kick (ele, param, particle_at, orb, mat6, make_matrix ! Drift forward call ptc_wedger(edge_angle, 0.0_rp, beta0, X, err_flag, mat6_int, make_matrix) if (err_flag) then - orb%state = lost_pz_aperture$ + orb%state = lost_pz$ return endif if (logic_option(.false., make_matrix)) mat6 = matmul(mat6_int, mat6) @@ -1485,7 +1485,7 @@ subroutine exact_bend_edge_kick (ele, param, particle_at, orb, mat6, make_matrix ! Edge kick call ptc_fringe_dipoler(X, g_tot, beta0, orb%time_dir*fint, hgap, particle_at, err_flag, mat6_int, make_matrix) if (err_flag) then - orb%state = lost_pz_aperture$ + orb%state = lost_pz$ return endif if (logic_option(.false., make_matrix)) mat6 = matmul(mat6_int,mat6) @@ -1493,7 +1493,7 @@ subroutine exact_bend_edge_kick (ele, param, particle_at, orb, mat6, make_matrix ! Backtrack call ptc_wedger(-edge_angle, g_tot, beta0, X, err_flag, mat6_int, make_matrix) if (err_flag) then - orb%state = lost_pz_aperture$ + orb%state = lost_pz$ return endif if (logic_option(.false., make_matrix)) mat6 = matmul(mat6_int, mat6) @@ -1502,7 +1502,7 @@ subroutine exact_bend_edge_kick (ele, param, particle_at, orb, mat6, make_matrix ! Backtrack call ptc_wedger(-edge_angle, g_tot, beta0, X, err_flag, mat6_int, make_matrix) if (err_flag) then - orb%state = lost_pz_aperture$ + orb%state = lost_pz$ return endif if (logic_option(.false., make_matrix)) mat6 = matmul(mat6_int, mat6) @@ -1510,7 +1510,7 @@ subroutine exact_bend_edge_kick (ele, param, particle_at, orb, mat6, make_matrix ! Edge kick call ptc_fringe_dipoler(X, g_tot, beta0, orb%time_dir*fint, hgap, particle_at, err_flag, mat6_int, make_matrix) if (err_flag) then - orb%state = lost_pz_aperture$ + orb%state = lost_pz$ return endif if (logic_option(.false., make_matrix)) mat6 = matmul(mat6_int, mat6) @@ -1518,7 +1518,7 @@ subroutine exact_bend_edge_kick (ele, param, particle_at, orb, mat6, make_matrix ! Drift forward call ptc_wedger(edge_angle, 0.0_rp, beta0, X, err_flag, mat6_int, make_matrix) if (err_flag) then - orb%state = lost_pz_aperture$ + orb%state = lost_pz$ return endif if (logic_option(.false., make_matrix)) mat6 = matmul(mat6_int, mat6) @@ -1601,7 +1601,7 @@ end subroutine vec_bmad_to_ptc ! Output: ! vec_bmad(6) -- real(rp): Bmad coordinates. ! conversion_mat -- real(rp), optional: Jacobian matrix of PTC -> Bmad conversion map. -! state -- integer, optional: Set to lost_pz_aperture$ if energy is too low. Set to alive$ otherwise. +! state -- integer, optional: Set to lost_pz$ if energy is too low. Set to alive$ otherwise. !- subroutine vec_ptc_to_bmad (vec_ptc, beta0, vec_bmad, conversion_mat, state) @@ -1620,7 +1620,7 @@ subroutine vec_ptc_to_bmad (vec_ptc, beta0, vec_bmad, conversion_mat, state) factor1 = 1+2*vec_ptc(5)/beta0+vec_ptc(5)**2 if (factor1 <= 0) then - if (present(state)) state = lost_pz_aperture$ + if (present(state)) state = lost_pz$ return endif diff --git a/bmad/modules/multipole_mod.f90 b/bmad/modules/multipole_mod.f90 index 003010e542..0c313f0781 100644 --- a/bmad/modules/multipole_mod.f90 +++ b/bmad/modules/multipole_mod.f90 @@ -379,7 +379,7 @@ subroutine ab_multipole_kicks (an, bn, ix_pole_max, ele, orbit, pole_type, scale else ! Electric alpha = (kx_tot * (2*orb0%vec(2) + kx_tot) + ky_tot * (2*orb0%vec(4) + ky_tot)) / (1 + orb0%vec(6))**2 if (alpha < -1) then - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ return endif dk_dp = (mass_of(orb0%species) * orb0%beta / ((1 + orb0%vec(6)) * orb0%p0c))**2 / (1 + orb0%vec(6)) diff --git a/bmad/modules/radiation_mod.f90 b/bmad/modules/radiation_mod.f90 index 46db0c0ae8..63f21e7c0b 100644 --- a/bmad/modules/radiation_mod.f90 +++ b/bmad/modules/radiation_mod.f90 @@ -116,7 +116,7 @@ subroutine track1_radiation (orbit, ele, edge) if (orbit%vec(6) < -1.0_rp) then call out_io (s_warn$, r_name, 'Particle is kaput due to radiation loss!') - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ endif ! Sokolov-Ternov Spin flip diff --git a/bmad/modules/runge_kutta_mod.f90 b/bmad/modules/runge_kutta_mod.f90 index c70b710cd0..910abd758b 100644 --- a/bmad/modules/runge_kutta_mod.f90 +++ b/bmad/modules/runge_kutta_mod.f90 @@ -251,7 +251,7 @@ recursive subroutine odeint_bmad (orbit, ele, param, s1_body, s2_body, err_flag, ! error in how the field is calculated and we must warn the user of this. if (sqrt(orbit%vec(2)**2 + orbit%vec(4)**2) > 0.9_rp * (1.0_rp + orbit%vec(6)) .or. orbit%vec(6) < -0.99_rp) then - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ else call out_io (s_error$, r_name, 'STEP SIZE IS TOO SMALL OR TOO MANY STEPS WHILE TRACKING THROUGH: ' // ele%name, & 'AT (X,Y,Z) POSITION FROM ENTRANCE: \3F14.7\ ', & diff --git a/bmad/multiparticle/beam_file_io.f90 b/bmad/multiparticle/beam_file_io.f90 index 5a05bf3765..2639a36949 100644 --- a/bmad/multiparticle/beam_file_io.f90 +++ b/bmad/multiparticle/beam_file_io.f90 @@ -47,7 +47,7 @@ subroutine write_beam_file (file_name, beam, new_file, file_format, lat) ! if (file_format == ascii4$) then - call write_ascii4_beam_file(file_name, beam, new_file, lat) + call write_ascii4_beam_file(file_name, beam, new_file) return endif @@ -98,7 +98,7 @@ end subroutine write_beam_file !----------------------------------------------------------------------------- !----------------------------------------------------------------------------- !+ -! Subroutine write_ascii4_beam_file (file_name, beam, new_file, lat) +! Subroutine write_ascii4_beam_file (file_name, beam, new_file) ! ! Routine to write a beam file in ASCII::4 format. ! @@ -111,15 +111,13 @@ end subroutine write_beam_file ! file_name -- character(*): Name of file. ! beam -- beam_struct: Beam to write ! new_file -- logical, optional: New file or append? Default = True. -! lat -- lat_struct, optional: If present, lattice info will be writen to hdf5 files. !- -subroutine write_ascii4_beam_file (file_name, beam, new_file, lat) +subroutine write_ascii4_beam_file (file_name, beam, new_file) type (beam_struct), target :: beam type (bunch_struct), pointer :: bunch type (coord_struct), pointer :: p -type (lat_struct), optional :: lat integer j, iu, ib, ic, ip, ix, ix_ele, n, n0, n_col @@ -146,7 +144,7 @@ subroutine write_ascii4_beam_file (file_name, beam, new_file, lat) endif colvec = '' -colvec(1:15) = [character(12):: 'vec', 'p0c', 's-position', 'time', 'charge', 'spin', 'field', & +colvec(1:16) = [character(12):: 'index', 'vec', 'p0c', 's_position', 'time', 'charge', 'spin', 'field', & 'phase', 'state', 'ix_ele', 'ix_branch', 'location', 'species', 'direction', 'time_dir'] spin0 = .true.; field0 = .true.; phase0 = .true.; ix_branch0 = .true.; loc0 = .true.; dir0 = .true. tdir0 = .true.; charge0 = .true.; species0 = .true.; s0 = .true.; t0 = .true.; p0c0 = .true. @@ -171,15 +169,14 @@ subroutine write_ascii4_beam_file (file_name, beam, new_file, lat) if (any(bunch%particle%p0c /= p%p0c)) p0c0 = .false. enddo -if (.not. spin0) call remove_col('spin', colvec) -if (.not. field0) call remove_col('field', colvec) -if (.not. phase0) call remove_col('phase', colvec) -if (.not. dir0) call remove_col('direction', colvec) -if (.not. tdir0) call remove_col('time_dir', colvec) -if (.not. charge0) call remove_col('charge', colvec) -if (.not. species0) call remove_col('species', colvec) -if (.not. ix_branch0) call remove_col('ix_branch', colvec) -if (.not. loc0) call remove_col('location', colvec) +if (spin0) call remove_col('spin', colvec) +if (field0) call remove_col('field', colvec) +if (phase0) call remove_col('phase', colvec) +if (dir0) call remove_col('direction', colvec) +if (tdir0) call remove_col('time_dir', colvec) +if (charge0) call remove_col('charge', colvec) +if (species0) call remove_col('species', colvec) +if (ix_branch0) call remove_col('ix_branch', colvec) ! @@ -189,9 +186,6 @@ subroutine write_ascii4_beam_file (file_name, beam, new_file, lat) ! Write header p => bunch%particle(1) - write (iu, '(a, es22.14)') '# charge_tot =', bunch%charge_tot - write (iu, '(a, es22.14)') '# z_center =', bunch%z_center - write (iu, '(a, es22.14)') '# t_center =', bunch%t_center write (iu, '(a, i6)') '# ix_bunch =', ib write (iu, '(a, i6)') '# n_particle =', size(bunch%particle) write (iu, '(a, i6)') '# n_alive =', count(bunch%particle%state == alive$) @@ -216,14 +210,14 @@ subroutine write_ascii4_beam_file (file_name, beam, new_file, lat) select case (col) case ('index', 'ix_ele', 'ix_branch', 'direction', 'time_dir') write (line, '(a, a10)') trim(line), trim(col) - case ('s-position', 'time', 'charge', 'p0c'); write (line, '(a, a22)') trim(line), trim(col) + case ('s_position', 'time', 'charge', 'p0c'); write (line, '(a, a22)') trim(line), trim(col) case ('vec'); write (line, '(a, 6a22)') trim(line), 'x', 'px', 'y', 'py', 'z', 'pz' case ('spin'); write (line, '(a, 6a22)') trim(line), 'spin_x', 'spin_y', 'spin_z' case ('field'); write (line, '(a, 6a22)') trim(line), 'field_x', 'field_y' case ('phase'); write (line, '(a, 6a22)') trim(line), 'phase_x', 'phase_y' case ('state'); write (line, '(a, a14)') trim(line), 'state' - case ('species'); write (line, '(a, a12)') trim(line), 'spieces' - case ('location'); write (line, '(a, a12)') trim(line), 'location' + case ('species'); write (line, '(a, a14)') trim(line), 'species' + case ('location'); write (line, '(a, a14)') trim(line), 'location' case default call err_exit end select @@ -246,8 +240,8 @@ subroutine write_ascii4_beam_file (file_name, beam, new_file, lat) case ('ix_branch'); write (line, '(a, i10)') trim(line), p%ix_branch case ('direction'); write (line, '(a, i10)') trim(line), p%direction case ('time_dir'); write (line, '(a, i10)') trim(line), p%time_dir - case ('s'); write (line, '(a, es22.14)') trim(line), p%s - case ('t'); write (line, '(a, es22.14)') trim(line), p%t + case ('s_position'); write (line, '(a, es22.14)') trim(line), p%s + case ('time'); write (line, '(a, es22.14)') trim(line), p%t case ('charge'); write (line, '(a, es22.14)') trim(line), p%charge case ('p0c'); write (line, '(a, es22.14)') trim(line), p%p0c case ('vec'); write (line, '(a, 6es22.14)') trim(line), p%vec @@ -255,8 +249,8 @@ subroutine write_ascii4_beam_file (file_name, beam, new_file, lat) case ('field'); write (line, '(a, 2es22.14)') trim(line), p%field case ('phase'); write (line, '(a, 2es22.14)') trim(line), p%phase case ('state'); write (line, '(a, a14)') trim(line), trim(state_name(p%state)) - case ('species'); write (line, '(a, a12)') trim(line), trim(species_name(p%species)) - case ('location'); write (line, '(a, a12)') trim(line), trim(location_name(p%location)) + case ('species'); write (line, '(a, a14)') trim(line), trim(species_name(p%species)) + case ('location'); write (line, '(a, a14)') trim(line), trim(location_name(p%location)) end select enddo write (iu, '(a)') trim(line) @@ -343,7 +337,8 @@ end subroutine write_ascii4_beam_file ! If non_zero, the following components of beam_init are used to rescale the beam: ! %n_bunch ! %n_particle -! %charge_tot +! %bunch_charge -> charge_tot +! %species ! ! If the beam file has '.h5' or '.hdf5' suffix then the file is taken to be an HDF5 file. ! Otherwise the file is assumed to be ASCII. @@ -452,7 +447,7 @@ subroutine read_beam_file (file_name, beam, beam_init, err_flag, ele, print_mom_ if (line(1:1) == '#') then close (iu) - call read_beam_ascii4(file_name, beam, beam_init, err_flag, ele, print_mom_shift_warning, conserve_momentum) + call read_beam_ascii4(file_name, beam, beam_init, err_flag) return endif @@ -639,6 +634,8 @@ subroutine read_beam_file (file_name, beam, beam_init, err_flag, ele, print_mom_ enddo endif + !------------------------- + if (j < n_particle) then call out_io (s_error$, r_name, 'IN FILE: ' // trim(file_name), & 'NUMBER OF PARTICLES DEFINED IN THE FILE \i0\ IS LESS THAN THE NUMBER OF DESIRED PARTICLES \i0\.', & @@ -810,18 +807,17 @@ end subroutine read_beam_file ! err_flag -- Logical: Set True if there is an error. False otherwise. !+ -subroutine read_beam_ascii4 (file_name, beam, beam_init, err_flag, ele, print_mom_shift_warning, conserve_momentum) +subroutine read_beam_ascii4 (file_name, beam, beam_init, err_flag) type (beam_struct), target :: beam type (beam_init_struct) beam_init -type (ele_struct), optional :: ele type (bunch_struct), pointer :: bunch type (coord_struct), pointer :: p type (coord_struct) p0 -real(rp) charge_tot, z_center, t_center +real(rp) charge_tot -integer iu, ic, ip, ix, ios, n_particle, n_bunch, n_col +integer iu, ic, ip, np, ix, ios, n_particle, n_bunch, n_col character(*) file_name character(*), parameter :: r_name = 'read_beam_ascii4' @@ -830,7 +826,6 @@ subroutine read_beam_ascii4 (file_name, beam, beam_init, err_flag, ele, print_mo character(600) line, str logical err_flag, err, valid -logical, optional :: print_mom_shift_warning, conserve_momentum ! @@ -857,6 +852,7 @@ subroutine read_beam_ascii4 (file_name, beam, beam_init, err_flag, ele, print_mo call reallocate_beam(beam, n_bunch, save = .true.) call reallocate_bunch(beam%bunch(n_bunch), 1000) bunch => beam%bunch(n_bunch) + bunch = bunch_struct() p0 = coord_struct() @@ -886,12 +882,11 @@ subroutine read_beam_ascii4 (file_name, beam, beam_init, err_flag, ele, print_mo return endif + if (index(line, '=') == 0) cycle call string_trim(line(2:), line, ix) - select case (line(:ix)) + select case (downcase(line(:ix))) case ('charge_tot'); bunch%charge_tot = read_param(line) - case ('z_center'); bunch%z_center = read_param(line) - case ('t_center'); bunch%t_center = read_param(line) case ('location') str = read_string(line) @@ -908,19 +903,19 @@ subroutine read_beam_ascii4 (file_name, beam, beam_init, err_flag, ele, print_mo call read_switch(line(:ix), p0%species, str, err) if (err) return - case ('r'); p0%r = read_param(line) - case ('s_position'); p0%s = read_param(line) - case ('time'); p0%t = read_param(line) - case ('p0c'); p0%p0c = read_param(line) - case ('dt_ref'); p0%dt_ref = read_param(line) - case ('charge'); p0%charge = read_param(line) - case ('spin'); call read_params(line, p0%spin) - case ('field'); call read_params(line, p0%field) - case ('phase'); call read_params(line, p0%phase) - case ('time_dir'); p0%time_dir = nint(read_param(line)) - case ('direction'); p0%direction = nint(read_param(line)) - case ('ix_ele'); p0%ix_ele = nint(read_param(line)) - case ('ix_branch'); p0%ix_branch = nint(read_param(line)) + case ('r'); p0%r = read_param(line) + case ('s', 's_position'); p0%s = read_param(line) + case ('t', 'time'); p0%t = read_param(line) + case ('p0c'); p0%p0c = read_param(line) + case ('dt_ref'); p0%dt_ref = read_param(line) + case ('charge'); p0%charge = read_param(line) + case ('spin'); call read_params(line, p0%spin) + case ('field'); call read_params(line, p0%field) + case ('phase'); call read_params(line, p0%phase) + case ('time_dir'); p0%time_dir = nint(read_param(line)) + case ('direction'); p0%direction = nint(read_param(line)) + case ('ix_ele'); p0%ix_ele = nint(read_param(line)) + case ('ix_branch'); p0%ix_branch = nint(read_param(line)) end select enddo header_loop @@ -929,80 +924,141 @@ subroutine read_beam_ascii4 (file_name, beam, beam_init, err_flag, ele, print_mo ip = 0 do read (iu, '(a)', iostat = ios, end = 8000) line - if (line == '') cycle - if (line(1:1) == '#') exit ! Next bunch if (ios /= 0) then call out_io (s_error$, r_name, 'CANNOT READ BEAM FILE TABLE IN FILE: ' // file_name) return endif + if (line == '') cycle + + if (line(1:1) == '#') then + call bunch_finalizer(bunch, ip, beam_init) + exit ! Next bunch + endif + ip = ip + 1 if (ip > size(bunch%particle)) call reallocate_bunch (bunch, 2*ip, .true.) p => bunch%particle(ip) p = p0 + call string_trim(line, line, ix) do ic = 1, n_col - select case (col(ic)) - case ('x'); call read_component(p%vec(1), line, err); if (err) return - case ('px'); call read_component(p%vec(2), line, err); if (err) return - case ('y'); call read_component(p%vec(3), line, err); if (err) return - case ('py'); call read_component(p%vec(4), line, err); if (err) return - case ('z'); call read_component(p%vec(5), line, err); if (err) return - case ('pz'); call read_component(p%vec(6), line, err); if (err) return - case ('spin_x'); call read_component(p%spin(1), line, err); if (err) return - case ('spin_y'); call read_component(p%spin(2), line, err); if (err) return - case ('spin_z'); call read_component(p%spin(3), line, err); if (err) return - case ('field_x'); call read_component(p%field(1), line, err); if (err) return - case ('field_y'); call read_component(p%field(2), line, err); if (err) return - case ('phase_x'); call read_component(p%phase(1), line, err); if (err) return - case ('phase_y'); call read_component(p%phase(2), line, err); if (err) return - case ('s_position'); call read_component(p%s, line, err); if (err) return - case ('time'); call read_component(p%t, line, err); if (err) return - case ('charge'); call read_component(p%charge, line, err); if (err) return - case ('dt_ref'); call read_component(p%dt_ref, line, err); if (err) return - case ('r'); call read_component(p%r, line, err); if (err) return - case ('p0c'); call read_component(p%p0c, line, err); if (err) return - case ('E_potential'); call read_component(p%E_potential, line, err); if (err) return - case ('beta'); call read_component(p%beta, line, err); if (err) return - case ('ix_ele'); call read_component_int(p%ix_ele, line, err); if (err) return - case ('ix_branch'); call read_component_int(p%ix_branch, line, err); if (err) return - case ('ix_user'); call read_component_int(p%ix_user, line, err); if (err) return - case ('direction'); call read_component_int(p%direction, line, err); if (err) return - case ('time_dir'); call read_component_int(p%time_dir, line, err); if (err) return - case ('state'); call read_switch(col(ic), p%state, line, err); if (err) return - case ('species'); call read_switch(col(ic), p%species, line, err); if (err) return - case ('location'); call read_switch(col(ic), p%location, line, err); if (err) return - + select case (downcase(col(ic))) + case ('x'); call read_component(p%vec(1), line, ix, err); if (err) return + case ('px'); call read_component(p%vec(2), line, ix, err); if (err) return + case ('y'); call read_component(p%vec(3), line, ix, err); if (err) return + case ('py'); call read_component(p%vec(4), line, ix, err); if (err) return + case ('z'); call read_component(p%vec(5), line, ix, err); if (err) return + case ('pz'); call read_component(p%vec(6), line, ix, err); if (err) return + case ('spin_x'); call read_component(p%spin(1), line, ix, err); if (err) return + case ('spin_y'); call read_component(p%spin(2), line, ix, err); if (err) return + case ('spin_z'); call read_component(p%spin(3), line, ix, err); if (err) return + case ('field_x'); call read_component(p%field(1), line, ix, err); if (err) return + case ('field_y'); call read_component(p%field(2), line, ix, err); if (err) return + case ('phase_x'); call read_component(p%phase(1), line, ix, err); if (err) return + case ('phase_y'); call read_component(p%phase(2), line, ix, err); if (err) return + case ('s', 's_position'); call read_component(p%s, line, ix, err); if (err) return + case ('t', 'time'); call read_component(p%t, line, ix, err); if (err) return + case ('charge'); call read_component(p%charge, line, ix, err); if (err) return + case ('dt_ref'); call read_component(p%dt_ref, line, ix, err); if (err) return + case ('r'); call read_component(p%r, line, ix, err); if (err) return + case ('p0c'); call read_component(p%p0c, line, ix, err); if (err) return + case ('E_potential'); call read_component(p%E_potential, line, ix, err); if (err) return + case ('beta'); call read_component(p%beta, line, ix, err); if (err) return + case ('ix_ele'); call read_component_int(p%ix_ele, line, ix, err); if (err) return + case ('ix_branch'); call read_component_int(p%ix_branch, line, ix, err); if (err) return + case ('ix_user'); call read_component_int(p%ix_user, line, ix, err); if (err) return + case ('direction'); call read_component_int(p%direction, line, ix, err); if (err) return + case ('time_dir'); call read_component_int(p%time_dir, line, ix, err); if (err) return + case ('state'); call read_switch(col(ic), p%state, line, err, ix); if (err) return + case ('species'); call read_switch(col(ic), p%species, line, err, ix); if (err) return + case ('location'); call read_switch(col(ic), p%location, line, err, ix); if (err) return + case ('index') ! Ignored case default err = .true. - call out_io(s_error$, r_name, 'COLUMN NAME NOT RECOGNIZED: ' // col) + call out_io(s_error$, r_name, 'COLUMN NAME NOT RECOGNIZED: ' // col(ic)) return end select enddo enddo - - call reallocate_bunch(bunch, ip, .true.) enddo ! 8000 continue -call reallocate_bunch(bunch, ip, .true.) +call bunch_finalizer(bunch, ip, beam_init) err_flag = .false. !--------------------------------------------------------------------------------------------------- contains -subroutine read_switch(who, switch, line, err) +subroutine bunch_finalizer (bunch, n_part, beam_init) + +type (bunch_struct), target :: bunch +type (beam_init_struct) beam_init +type (coord_struct), pointer :: p(:) + +real(rp) sum_charge +integer np, n_part + +! Particle number bookkeeping + +np = beam_init%n_particle +if (np > 0) then + if (np > n_part) then + call out_io (s_warn$, r_name, & + 'Number of particles ' // int_str(n_part) // ' defined in beam file: ' // full_name, & + 'is less than the number of particles wanted which is set by beam_init%n_particle: ' // int_str(np), & + 'The setting of beam_init%n_particle will be ignored.') + endif + n_part = min(n_part, np) +endif + +call reallocate_bunch(bunch, n_part, .true.) +p => bunch%particle + +bunch%n_live = count(p%state == alive$) + +! Charge bookkeeping + +if (beam_init%bunch_charge /= 0) bunch%charge_tot = beam_init%bunch_charge + +sum_charge = sum(p(:)%charge) +if (bunch%charge_tot == 0) then + bunch%charge_tot = sum_charge +elseif (sum_charge == 0) then + p%charge = bunch%charge_tot / n_part +else + p%charge = p%charge * bunch%charge_tot / sum_charge +endif + +bunch%charge_live = sum(p%charge, (p%state == alive$)) + +! Species + +if (beam_init%species /= '') p%species = species_id(beam_init%species) + +end subroutine bunch_finalizer + +!--------------------------------------------------------------------------------------------------- +! contains + +subroutine read_switch(who, switch, line, err, ix_in) integer switch, ix +integer, optional :: ix_in character(*) who, line logical err ! -call string_trim(line, line, ix) +if (present(ix_in)) then + ix = ix_in +else + call string_trim(line, line, ix) +endif + if (ix == 0) err = .true. select case (who) @@ -1026,14 +1082,17 @@ subroutine read_switch(who, switch, line, err) if (switch == invalid$) err = .true. end select -line = line(ix+1:) +if (present(ix_in)) then + call string_trim(line(ix+1:), line, ix) + ix_in = ix +endif end subroutine read_switch !--------------------------------------------------------------------------------------------------- ! contains -subroutine read_component(component, line, err) +subroutine read_component(component, line, ix, err) real(rp) component integer ix @@ -1042,18 +1101,18 @@ subroutine read_component(component, line, err) ! -call string_trim(line, line, ix) if (ix == 0) err = .true. if (err) return read (line, *, iostat = ios) component err = (ios /= 0) +call string_trim(line(ix+1:), line, ix) end subroutine read_component !--------------------------------------------------------------------------------------------------- ! contains -subroutine read_component_int(component, line, err) +subroutine read_component_int(component, line, ix, err) integer component integer ix @@ -1062,11 +1121,11 @@ subroutine read_component_int(component, line, err) ! -call string_trim(line, line, ix) if (ix == 0) err = .true. if (err) return read (line, *, iostat = ios) component err = (ios /= 0) +call string_trim(line(ix+1:), line, ix) end subroutine read_component_int diff --git a/bmad/multiparticle/track_bunch_time.f90 b/bmad/multiparticle/track_bunch_time.f90 index 01a2581684..0e5bbf262d 100644 --- a/bmad/multiparticle/track_bunch_time.f90 +++ b/bmad/multiparticle/track_bunch_time.f90 @@ -108,7 +108,7 @@ function pointer_to_next_track_ele(orbit, branch, drift_ele) result (ele_here) if (ele_here%ix_ele == 1) then do ie = 1, branch%n_ele_track if (branch%ele(ie)%key == e_gun$) then - orbit%state = lost_z_aperture$ + orbit%state = lost_z$ return endif if (branch%ele(ie)%key == drift$) exit diff --git a/bmad/photon/track1_bmad_photon.f90 b/bmad/photon/track1_bmad_photon.f90 index e43ccefefe..4d1a0bbe5c 100644 --- a/bmad/photon/track1_bmad_photon.f90 +++ b/bmad/photon/track1_bmad_photon.f90 @@ -92,7 +92,7 @@ subroutine track1_bmad_photon (orbit, ele, param, err_flag) case (drift$, rcollimator$, ecollimator$, monitor$, instrument$, pipe$) if (orbit%vec(6) * orbit%direction < 0) then ! Heading backwards - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ return endif diff --git a/bmad/photon/track1_photon_mod.f90 b/bmad/photon/track1_photon_mod.f90 index 9620bef0ee..77741a67d8 100644 --- a/bmad/photon/track1_photon_mod.f90 +++ b/bmad/photon/track1_photon_mod.f90 @@ -655,7 +655,7 @@ subroutine track1_mosaic_crystal (ele, param, orbit) if (ele%value(bragg_angle_in$) == 0) then call out_io (s_fatal$, r_name, 'REFERENCE ENERGY TOO SMALL TO SATISFY BRAGG CONDITION! FOR ELEMENT: ' // ele%name) - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ if (global_com%exit_on_error) call err_exit return endif @@ -667,7 +667,7 @@ subroutine track1_mosaic_crystal (ele, param, orbit) if (ele%value(mosaic_thickness$) == 0) then call out_io (s_error$, r_name, 'A MOSAIC CRYSTAL MUST HAVE A FINITE MOSAIC_THICKNESS PARAMETER. FOR ELEMENT: ' // ele%name) - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ if (global_com%exit_on_error) call err_exit return endif @@ -675,7 +675,7 @@ subroutine track1_mosaic_crystal (ele, param, orbit) if (ele%value(mosaic_angle_rms_out_plane$) < 0) then call out_io (s_error$, r_name, 'MOSAIC CRYSTAL WITH MOSAIC_ANGLE_RMS_OUT_PLANE PARAMETER NOT', & 'SET (OR SET NEGATIVE). FOR ELEMENT:' // ele%name) - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ if (global_com%exit_on_error) call err_exit return endif @@ -860,7 +860,7 @@ subroutine track1_crystal (ele, param, orbit) if (ele%value(bragg_angle_in$) == 0) then call out_io (s_fatal$, r_name, 'REFERENCE ENERGY TOO SMALL TO SATISFY BRAGG CONDITION!') - orbit%state = lost_pz_aperture$ + orbit%state = lost_pz$ if (global_com%exit_on_error) call err_exit return endif diff --git a/bmad/ptc/ele_to_fibre.f90 b/bmad/ptc/ele_to_fibre.f90 index 1157753bed..7c93f60e8a 100644 --- a/bmad/ptc/ele_to_fibre.f90 +++ b/bmad/ptc/ele_to_fibre.f90 @@ -328,7 +328,7 @@ subroutine ele_to_fibre (ele, ptc_fibre, param, use_offsets, err_flag, integ_ord ptc_key%list%usethin = .false. ! So zero length element is not treated as a multipole !------------------------------ -case (octupole$) +case (octupole$, thick_multipole$) ptc_key%magnet = 'octupole' ptc_key%list%usethin = .false. ! So zero length element is not treated as a multipole diff --git a/bmad/ptc/ptc_interface_mod.f90 b/bmad/ptc/ptc_interface_mod.f90 index 6fdc867a72..d9fc4f8530 100644 --- a/bmad/ptc/ptc_interface_mod.f90 +++ b/bmad/ptc/ptc_interface_mod.f90 @@ -3070,7 +3070,7 @@ subroutine ele_to_ptc_magnetic_an_bn (ele, bn, an, n_max) bn(1) = 1d-9 * e_accel_field(ele, voltage$) / leng endif -case (drift$, rfcavity$, lcavity$, ab_multipole$, multipole$, beambeam$, wiggler$, undulator$) +case (drift$, rfcavity$, lcavity$, ab_multipole$, multipole$, beambeam$, wiggler$, undulator$, thick_multipole$) ! Nothing to be done case (octupole$) diff --git a/bmad/ptc/ptc_layout_mod.f90 b/bmad/ptc/ptc_layout_mod.f90 index 1b7e5df8cf..6534e79424 100644 --- a/bmad/ptc/ptc_layout_mod.f90 +++ b/bmad/ptc/ptc_layout_mod.f90 @@ -1508,7 +1508,7 @@ end subroutine ptc_layouts_resplit ! do_reset -- logical: If True then reset ptc flags. ! ! Output: -! state -- integer: Same as coord_struct%state. alive$, lost$, lost_neg_x_aperture$, etc. +! state -- integer: Same as coord_struct%state. alive$, lost$, lost_neg_x$, etc. ! ptc_fibre -- fibre, pointer: Pointer to fibre where particle lost. Nullified if particle alive. !- diff --git a/bmad/space_charge/space_charge_mod.f90 b/bmad/space_charge/space_charge_mod.f90 index 6dd4ca84e7..642cd36060 100644 --- a/bmad/space_charge/space_charge_mod.f90 +++ b/bmad/space_charge/space_charge_mod.f90 @@ -304,7 +304,7 @@ subroutine sc_adaptive_step(bunch, ele, include_image, t_now, dt_step, dt_next, do i = 1, size(bunch%particle) ! If going backwards then particle is considered dead. if (bunch_half%particle(i)%direction == -1 .or. & - bunch_full%particle(i)%direction == -1) bunch_half%particle(i)%state = lost_z_aperture$ + bunch_full%particle(i)%direction == -1) bunch_half%particle(i)%state = lost_z$ if (bunch_half%particle(i)%state /= alive$) cycle ! Only count living particles r_err(:) = r_err(:) + abs(bunch_full%particle(i)%vec(:)-bunch_half%particle(i)%vec(:)) N = N +1 diff --git a/bmad/spin/sprint_spin_taylor_map.f90 b/bmad/spin/sprint_spin_taylor_map.f90 index 8d216bae61..501676e66a 100644 --- a/bmad/spin/sprint_spin_taylor_map.f90 +++ b/bmad/spin/sprint_spin_taylor_map.f90 @@ -97,7 +97,7 @@ subroutine sprint_spin_taylor_map (ele, start_orbit) ! Note: Kicks are put in at the end by offset_particle. case (drift$, rcollimator$, ecollimator$, monitor$, instrument$, pipe$, & - kicker$, hkicker$, vkicker$, sextupole$, octupole$, rfcavity$) + kicker$, hkicker$, vkicker$, sextupole$, octupole$, thick_multipole$, rfcavity$) map_ele%spin_q(0,0) = 1 ! Quadrupole diff --git a/bmad/spin/valid_spin_tracking_method.f90 b/bmad/spin/valid_spin_tracking_method.f90 index ac7ac16776..82563ec2f8 100644 --- a/bmad/spin/valid_spin_tracking_method.f90 +++ b/bmad/spin/valid_spin_tracking_method.f90 @@ -66,7 +66,7 @@ function valid_spin_tracking_method (ele, spin_tracking_method) result (is_valid case (group$, overlay$, girder$, ramper$, null_ele$) ! No valid methods -case (sbend$, quadrupole$, solenoid$, sextupole$, octupole$, drift$, & +case (sbend$, quadrupole$, solenoid$, sextupole$, octupole$, drift$, thick_multipole$, & rcollimator$, ecollimator$, monitor$, instrument$, pipe$, kicker$, hkicker$, vkicker$) select case (spin_tracking_method) case (custom$, symp_lie_ptc$, tracking$, sprint$) diff --git a/regression_tests/bookkeeper_test/output.correct b/regression_tests/bookkeeper_test/output.correct index e64375e85a..dfcbf425fc 100644 --- a/regression_tests/bookkeeper_test/output.correct +++ b/regression_tests/bookkeeper_test/output.correct @@ -144,10 +144,10 @@ "Next-3" ABS 0 2 "Next-4" ABS 0 1 "Aperture-1" STR "Alive" -"Aperture-2" STR "Hit +X Side" -"Aperture-3" STR "Hit -X Side" -"Aperture-4" STR "Hit +Y Side" -"Aperture-5" STR "Hit -Y Side" -"Aperture-6" STR "Hit +Y Side" -"Aperture-7" STR "Hit -X Side" +"Aperture-2" STR "Lost_Pos_X" +"Aperture-3" STR "Lost_Neg_X" +"Aperture-4" STR "Lost_Pos_Y" +"Aperture-5" STR "Lost_Neg_Y" +"Aperture-6" STR "Lost_Pos_Y" +"Aperture-7" STR "Lost_Neg_X" "N_Quad_Loc" ABS 0 9 diff --git a/regression_tests/mat6_calc_method_test/mat6_calc_method_test.bmad b/regression_tests/mat6_calc_method_test/mat6_calc_method_test.bmad index 51935413fb..bfcb81553c 100644 --- a/regression_tests/mat6_calc_method_test/mat6_calc_method_test.bmad +++ b/regression_tests/mat6_calc_method_test/mat6_calc_method_test.bmad @@ -112,6 +112,7 @@ taylor1: taylor, l = 0.5, {s1: 0.6|}, {sx: 0.7|}, {sy: 0.8|}, {sz: 0.2 {6: 3.6954232986861E-07 | 13}, {6: 1.1765753082019E-06 | 23}, {6: 1.6057156163853E-05 | 33}, {6: 1.1766022575118E-06 | 14}, {6: 4.782914122933E-07 | 24}, {6: 0.0014203210587175 | 34}, {6: 1.504474955002 | 44}, {6: -5.3002411118529E-07 | 15}, {6: 3.2952059293287E-05 | 26}, {6: -4.6831132007123E-08 | 46} +thick_multipole1: thick_multipole, l = 4.5, a2 = 1, b2 = 20, x_offset = 0.02, tilt = 0.1 vkicker1: vkicker, l = 4.5, kick = 0.005, num_steps = 10, x_offset = 0.05, y_pitch = 0.001, tilt = 0.1 wiggler_map1: wiggler, l = 1.6, num_steps = 10, field_calc = fieldmap, cartesian_map = { term = {3e-4, 3, 4, 5, 0.002, 3e-4, 0.63, x}, term = {3e-4, 3, 4, 5, 0.002, 3e-4, 0.63, y}, @@ -133,8 +134,8 @@ l2: line = (ab_multipole1, ac_kicker1, beambeam1, crab_cavity1, drift1, ecollima em_field1, em_field2, fiducial1, floor_shift1, gkicker1, hkicker1, instrument1, kicker1, match1, monitor1, multipole1, octupole1, patch1, quadrupole1, quadrupole2, quadrupole3, quadrupole4, quadrupole5, rcollimator1, rfcavity1, rfcavity2, sad_mult1, sad_mult2, sad_mult3, sbend1, rbend2, sbend3, - rbend4, sbend5, rbend6, sbend7, sextupole1, solenoid1, solenoid2, sol_quad1, sol_quad2, taylor1, vkicker1, - wiggler_map1, wiggler_periodic1, lcavity1, lcavity2, lcavity3) + rbend4, sbend5, rbend6, sbend7, sextupole1, solenoid1, solenoid2, sol_quad1, sol_quad2, taylor1, thick_multipole1, + vkicker1, wiggler_map1, wiggler_periodic1, lcavity1, lcavity2, lcavity3) l2[e_tot] = 1e6 l2[geometry] = open diff --git a/regression_tests/mat6_calc_method_test/output.correct b/regression_tests/mat6_calc_method_test/output.correct index 3a0ee18892..a177e504b4 100644 --- a/regression_tests/mat6_calc_method_test/output.correct +++ b/regression_tests/mat6_calc_method_test/output.correct @@ -603,7 +603,7 @@ "KICKER1:Bmad_Standard:Symp_Err" ABS 1E-11 2.2204460492503E-16 "KICKER1:Symp_Lie_PTC:Symp_Err" ABS 1E-11 4.9167552082681E-16 -"KICKER1:Tracking:Symp_Err" ABS 1E-11 1.6598233204546E-11 +"KICKER1:Tracking:Symp_Err" ABS 5e-11 1.6598233204546E-11 "KICKER1:Taylor:Symp_Err" ABS 1E-11 4.9167552082681E-16 "MATCH1:Bmad_Standard:MatrixRow1" ABS 1E-11 1.5649723207597E+00 -7.3484692283495E-02 3.5194410650326E-01 -3.8270799604654E-02 0.0000000000000E+00 0.0000000000000E+00 @@ -1059,7 +1059,7 @@ "RCOLLIMATOR1:Bmad_Standard:Symp_Err" ABS 1E-11 4.4408920985006E-16 "RCOLLIMATOR1:Symp_Lie_PTC:Symp_Err" ABS 1E-11 4.4408920985006E-16 -"RCOLLIMATOR1:Tracking:Symp_Err" ABS 1E-11 3.3827688913912E-11 +"RCOLLIMATOR1:Tracking:Symp_Err" ABS 5e-11 3.3827688913912E-11 "RCOLLIMATOR1:Taylor:Symp_Err" ABS 1E-11 4.4408920985006E-16 "RFCAVITY1:Bmad_Standard:MatrixRow1" ABS 1E-11 1.0000000000000E+00 3.6161545313375E+00 -8.9594187646899E-06 2.8467317740385E-05 -8.3277498015507E-03 -6.4650933092475E-03 @@ -1264,37 +1264,37 @@ "SBEND1:Bmad_Standard:MatrixRow1" ABS 1E-11 9.4777891321151E-01 5.8606657858757E-01 -1.0180415474701E-02 -1.9878060553359E-03 0.0000000000000E+00 -3.0272145032095E-03 "SBEND1:Symp_Lie_PTC:MatrixRow1" ABS 1E-11 9.4776614771511E-01 5.8606459064252E-01 -1.0180407281665E-02 -1.9878354627492E-03 0.0000000000000E+00 -3.0281799751010E-03 -"SBEND1:Tracking:MatrixRow1" ABS 1E-11 9.4777891321159E-01 5.8606657861175E-01 -1.0180415470698E-02 -1.9878060017030E-03 0.0000000000000E+00 -3.0272145037230E-03 +"SBEND1:Tracking:MatrixRow1" ABS 1E-11 9.4777891321159E-01 5.8606657861175E-01 -1.0180415470698E-02 -1.9878060013561E-03 0.0000000000000E+00 -3.0272145037230E-03 "SBEND1:Taylor:MatrixRow1" ABS 1E-11 9.4776614771511E-01 5.8606459064252E-01 -1.0180407281665E-02 -1.9878354627492E-03 0.0000000000000E+00 -3.0281799751010E-03 "SBEND1:Bmad_Standard:MatrixRow2" ABS 1E-11 -1.7351479645155E-01 9.4776551508016E-01 -3.4174871782779E-02 -1.0196975366088E-02 0.0000000000000E+00 6.7240445671137E-04 "SBEND1:Symp_Lie_PTC:MatrixRow2" ABS 1E-11 -1.7356181186056E-01 9.4775342138350E-01 -3.4174585019931E-02 -1.0196734671049E-02 0.0000000000000E+00 6.7074674351754E-04 -"SBEND1:Tracking:MatrixRow2" ABS 1E-11 -1.7351479645157E-01 9.4776551507808E-01 -3.4174871783432E-02 -1.0196975374580E-02 0.0000000000000E+00 6.7240445694033E-04 +"SBEND1:Tracking:MatrixRow2" ABS 1E-11 -1.7351479645157E-01 9.4776551507808E-01 -3.4174871783258E-02 -1.0196975374407E-02 0.0000000000000E+00 6.7240445702707E-04 "SBEND1:Taylor:MatrixRow2" ABS 1E-11 -1.7356181186056E-01 9.4775342138350E-01 -3.4174585019931E-02 -1.0196734671049E-02 0.0000000000000E+00 6.7074674351754E-04 "SBEND1:Bmad_Standard:MatrixRow3" ABS 1E-11 -1.0185324677424E-02 -1.9891138366608E-03 1.0531811418972E+00 6.0680566276170E-01 0.0000000000000E+00 -3.0125242647254E-03 "SBEND1:Symp_Lie_PTC:MatrixRow3" ABS 1E-11 -1.0185271019244E-02 -1.9891536684501E-03 1.0531679453904E+00 6.0680336498796E-01 0.0000000000000E+00 -3.0124000519847E-03 -"SBEND1:Tracking:MatrixRow3" ABS 1E-11 -1.0185324677680E-02 -1.9891138387015E-03 1.0531811419003E+00 6.0680566282968E-01 0.0000000000000E+00 -3.0125242651141E-03 +"SBEND1:Tracking:MatrixRow3" ABS 1E-11 -1.0185324677680E-02 -1.9891138387015E-03 1.0531811419003E+00 6.0680566282972E-01 0.0000000000000E+00 -3.0125242650707E-03 "SBEND1:Taylor:MatrixRow3" ABS 1E-11 -1.0185271019244E-02 -1.9891536684501E-03 1.0531679453904E+00 6.0680336498796E-01 0.0000000000000E+00 -3.0124000519847E-03 "SBEND1:Bmad_Standard:MatrixRow4" ABS 1E-11 -3.4172482986724E-02 -1.0195964185698E-02 1.7998658348295E-01 1.0531720778386E+00 0.0000000000000E+00 -1.4393825564406E-04 "SBEND1:Symp_Lie_PTC:MatrixRow4" ABS 1E-11 -3.4172282337776E-02 -1.0195833438861E-02 1.7993692883005E-01 1.0531590238357E+00 0.0000000000000E+00 -1.4363720165235E-04 -"SBEND1:Tracking:MatrixRow4" ABS 1E-11 -3.4172482986025E-02 -1.0195964184143E-02 1.7998658347865E-01 1.0531720778052E+00 0.0000000000000E+00 -1.4393825562876E-04 +"SBEND1:Tracking:MatrixRow4" ABS 1E-11 -3.4172482986025E-02 -1.0195964184187E-02 1.7998658347865E-01 1.0531720778051E+00 0.0000000000000E+00 -1.4393825562876E-04 "SBEND1:Taylor:MatrixRow4" ABS 1E-11 -3.4172282337776E-02 -1.0195833438861E-02 1.7993692883005E-01 1.0531590238357E+00 0.0000000000000E+00 -1.4363720165235E-04 -"SBEND1:Bmad_Standard:MatrixRow5" ABS 1E-11 -9.5215860944352E-06 -3.2325080393751E-03 -2.8021620881829E-04 -3.0531371476616E-03 9.9999983355276E-01 1.5458627471481E-01 +"SBEND1:Bmad_Standard:MatrixRow5" ABS 1E-11 -9.5215860944349E-06 -3.2325080393751E-03 -2.8021620881829E-04 -3.0531371476616E-03 9.9999983355276E-01 1.5458627471481E-01 "SBEND1:Symp_Lie_PTC:MatrixRow5" ABS 1E-11 -1.0499902074666E-05 -3.2332353822169E-03 -2.8023645852702E-04 -3.0530892650826E-03 1.0000000000000E+00 1.5458610911602E-01 "SBEND1:Tracking:MatrixRow5" ABS 1E-11 -9.5215597559206E-06 -3.2325079273032E-03 -2.8021638755031E-04 -3.0531393047876E-03 9.9999983355302E-01 1.5458627473488E-01 "SBEND1:Taylor:MatrixRow5" ABS 1E-11 -1.0499902074666E-05 -3.2332353822169E-03 -2.8023645852702E-04 -3.0530892650826E-03 1.0000000000000E+00 1.5458610911602E-01 -"SBEND1:Bmad_Standard:MatrixRow6" ABS 1E-11 1.3445436731162E-05 4.2490265070888E-06 1.3546865820235E-06 4.5602304812959E-07 0.0000000000000E+00 1.0000007899270E+00 +"SBEND1:Bmad_Standard:MatrixRow6" ABS 1E-11 1.3445436731163E-05 4.2490265070888E-06 1.3546865820235E-06 4.5602304812959E-07 0.0000000000000E+00 1.0000007899270E+00 "SBEND1:Symp_Lie_PTC:MatrixRow6" ABS 1E-11 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 1.0000000000000E+00 "SBEND1:Tracking:MatrixRow6" ABS 1E-11 1.3446036471743E-05 4.2510102209181E-06 1.3503935816783E-06 4.1952608921536E-07 0.0000000000000E+00 1.0000007899655E+00 "SBEND1:Taylor:MatrixRow6" ABS 1E-11 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 1.0000000000000E+00 "SBEND1:Bmad_Standard:Vector" ABS 1E-11 2.1514950918641E-03 7.0875103483507E-03 4.5502000982287E-04 1.4490470198566E-03 2.7854466991455E-05 -6.7953418696198E-07 "SBEND1:Symp_Lie_PTC:Vector" ABS 1E-11 2.1520237866618E-03 7.0894410823785E-03 4.5501255048894E-04 1.4490200868332E-03 2.7907485533630E-05 0.0000000000000E+00 -"SBEND1:Tracking:Vector" ABS 1E-11 2.1514950915922E-03 7.0875103483894E-03 4.5502000954814E-04 1.4490470199992E-03 2.7854475783924E-05 -6.7938011841500E-07 +"SBEND1:Tracking:Vector" ABS 1E-11 2.1514950915908E-03 7.0875103483877E-03 4.5502000954770E-04 1.4490470199995E-03 2.7854475783924E-05 -6.7938011841500E-07 "SBEND1:Taylor:Vector" ABS 1E-11 2.1520237866618E-03 7.0894410823785E-03 4.5501255048894E-04 1.4490200868332E-03 2.7907485533630E-05 0.0000000000000E+00 "SBEND1:Bmad_Standard:Symp_Err" ABS 1E-11 1.3445434493207E-05 @@ -1309,17 +1309,17 @@ "RBEND2:Bmad_Standard:MatrixRow2" ABS 1E-11 8.2139077959150E-02 1.0243224946238E+00 3.4503844569155E-02 1.0405023494154E-02 0.0000000000000E+00 3.5606311756991E-04 "RBEND2:Symp_Lie_PTC:MatrixRow2" ABS 1E-11 8.2116961258165E-02 1.0243177198373E+00 3.4504466351098E-02 1.0401633074890E-02 0.0000000000000E+00 3.5552587293304E-04 -"RBEND2:Tracking:MatrixRow2" ABS 1E-11 8.2139077975916E-02 1.0243224946255E+00 3.4503844569087E-02 1.0405023494263E-02 0.0000000000000E+00 3.5606311771632E-04 +"RBEND2:Tracking:MatrixRow2" ABS 1E-11 8.2139077975895E-02 1.0243224946254E+00 3.4503844569098E-02 1.0405023494295E-02 0.0000000000000E+00 3.5606311771632E-04 "RBEND2:Taylor:MatrixRow2" ABS 1E-11 8.2116961258165E-02 1.0243177198373E+00 3.4504466351098E-02 1.0401633074890E-02 0.0000000000000E+00 3.5552587293304E-04 "RBEND2:Bmad_Standard:MatrixRow3" ABS 1E-11 1.0178274955579E-02 2.0283378122998E-03 9.7580441923177E-01 5.9159876112170E-01 0.0000000000000E+00 -1.9556205498801E-03 "RBEND2:Symp_Lie_PTC:MatrixRow3" ABS 1E-11 1.0178359093483E-02 2.0273313918679E-03 9.7580398075674E-01 5.9159811775024E-01 0.0000000000000E+00 -1.9556333369828E-03 -"RBEND2:Tracking:MatrixRow3" ABS 1E-11 1.0178274955763E-02 2.0283378125100E-03 9.7580441923402E-01 5.9159876115303E-01 0.0000000000000E+00 -1.9556205501335E-03 +"RBEND2:Tracking:MatrixRow3" ABS 1E-11 1.0178274955763E-02 2.0283378125100E-03 9.7580441923402E-01 5.9159876115294E-01 0.0000000000000E+00 -1.9556205501335E-03 "RBEND2:Taylor:MatrixRow3" ABS 1E-11 1.0178359093483E-02 2.0273313918679E-03 9.7580398075674E-01 5.9159811775024E-01 0.0000000000000E+00 -1.9556333369828E-03 "RBEND2:Bmad_Standard:MatrixRow4" ABS 1E-11 3.4526576754775E-02 1.0414311266836E-02 -8.0578266765586E-02 9.7590666932632E-01 0.0000000000000E+00 1.3929472622573E-04 "RBEND2:Symp_Lie_PTC:MatrixRow4" ABS 1E-11 3.4526901470193E-02 1.0411020549115E-02 -8.0579861076062E-02 9.7590507387275E-01 0.0000000000000E+00 1.3925994339217E-04 -"RBEND2:Tracking:MatrixRow4" ABS 1E-11 3.4526576754741E-02 1.0414311267396E-02 -8.0578266749721E-02 9.7590666932369E-01 0.0000000000000E+00 1.3929472625265E-04 +"RBEND2:Tracking:MatrixRow4" ABS 1E-11 3.4526576754741E-02 1.0414311267396E-02 -8.0578266749721E-02 9.7590666932367E-01 0.0000000000000E+00 1.3929472623096E-04 "RBEND2:Taylor:MatrixRow4" ABS 1E-11 3.4526901470193E-02 1.0411020549115E-02 -8.0579861076062E-02 9.7590507387275E-01 0.0000000000000E+00 1.3925994339217E-04 "RBEND2:Bmad_Standard:MatrixRow5" ABS 1E-11 -4.3671419873053E-04 -2.6626624765837E-04 1.6849785917707E-05 -1.9919787630856E-03 1.0000000400438E+00 1.5455819829218E-01 @@ -1334,7 +1334,7 @@ "RBEND2:Bmad_Standard:Vector" ABS 1E-11 -1.1236564241428E-03 -3.7934511625208E-03 -2.9490518784746E-04 -1.0247355582622E-03 3.1551509831301E-05 1.7493071526823E-07 "RBEND2:Symp_Lie_PTC:Vector" ABS 1E-11 -1.1235125300093E-03 -3.7929105617341E-03 -2.9489421761077E-04 -1.0246965559444E-03 3.1537000135889E-05 0.0000000000000E+00 -"RBEND2:Tracking:Vector" ABS 1E-11 -1.1236564242114E-03 -3.7934511625419E-03 -2.9490518797863E-04 -1.0247355583005E-03 3.1551510851168E-05 1.7493682472232E-07 +"RBEND2:Tracking:Vector" ABS 1E-11 -1.1236564242114E-03 -3.7934511625420E-03 -2.9490518797828E-04 -1.0247355583003E-03 3.1551510851168E-05 1.7493682472232E-07 "RBEND2:Taylor:Vector" ABS 1E-11 -1.1235125300093E-03 -3.7929105617341E-03 -2.9489421761077E-04 -1.0246965559444E-03 3.1537000135889E-05 0.0000000000000E+00 "RBEND2:Bmad_Standard:Symp_Err" ABS 1E-11 6.6170224919419E-06 @@ -1349,7 +1349,7 @@ "SBEND3:Bmad_Standard:MatrixRow2" ABS 1E-11 -9.5720189194697E-02 9.7102927767677E-01 -1.2705017209440E-03 -2.7188404958735E-04 0.0000000000000E+00 5.1102007793224E-04 "SBEND3:Symp_Lie_PTC:MatrixRow2" ABS 1E-11 -9.5705414304674E-02 9.7103651599949E-01 -1.2702413955800E-03 -2.7658233208004E-04 0.0000000000000E+00 5.1115117260867E-04 -"SBEND3:Tracking:MatrixRow2" ABS 1E-11 -9.5720189178909E-02 9.7102927767738E-01 -1.2705017210599E-03 -2.7188405355219E-04 0.0000000000000E+00 5.1102007798953E-04 +"SBEND3:Tracking:MatrixRow2" ABS 1E-11 -9.5720189178996E-02 9.7102927767746E-01 -1.2705017210599E-03 -2.7188405355219E-04 0.0000000000000E+00 5.1102007798953E-04 "SBEND3:Taylor:MatrixRow2" ABS 1E-11 -9.5705414304674E-02 9.7103651599949E-01 -1.2702413955800E-03 -2.7658233208004E-04 0.0000000000000E+00 5.1115117260867E-04 "SBEND3:Bmad_Standard:MatrixRow3" ABS 1E-11 -4.9053915346225E-04 -9.3454946524945E-05 1.0286632823562E+00 6.0213967445793E-01 0.0000000000000E+00 -2.7157134153065E-03 @@ -1357,9 +1357,9 @@ "SBEND3:Tracking:MatrixRow3" ABS 1E-11 -4.9053915335100E-04 -9.3454947816887E-05 1.0286632823595E+00 6.0213967447808E-01 0.0000000000000E+00 -2.7157134159517E-03 "SBEND3:Taylor:MatrixRow3" ABS 1E-11 -4.9181532583961E-04 -6.3679103069487E-05 1.0286567024724E+00 6.0204900409265E-01 0.0000000000000E+00 -2.7151113384889E-03 -"SBEND3:Bmad_Standard:MatrixRow4" ABS 1E-11 -1.2921142428680E-03 -2.7647277837749E-04 9.7553581978050E-02 1.0292394972248E+00 0.0000000000000E+00 -6.4846497758423E-05 +"SBEND3:Bmad_Standard:MatrixRow4" ABS 1E-11 -1.2921142428680E-03 -2.7647277837747E-04 9.7553581978050E-02 1.0292394972248E+00 0.0000000000000E+00 -6.4846497758423E-05 "SBEND3:Symp_Lie_PTC:MatrixRow4" ABS 1E-11 -1.2914573088822E-03 -2.7837653435975E-04 9.7542020398384E-02 1.0292235969733E+00 0.0000000000000E+00 -6.4668276106321E-05 -"SBEND3:Tracking:MatrixRow4" ABS 1E-11 -1.2921142429449E-03 -2.7647277709396E-04 9.7553581993428E-02 1.0292394972019E+00 0.0000000000000E+00 -6.4846497746171E-05 +"SBEND3:Tracking:MatrixRow4" ABS 1E-11 -1.2921142429449E-03 -2.7647277705059E-04 9.7553581993428E-02 1.0292394972019E+00 0.0000000000000E+00 -6.4846497746171E-05 "SBEND3:Taylor:MatrixRow4" ABS 1E-11 -1.2914573088822E-03 -2.7837653435975E-04 9.7542020398384E-02 1.0292235969733E+00 0.0000000000000E+00 -6.4668276106321E-05 "SBEND3:Bmad_Standard:MatrixRow5" ABS 1E-11 -2.5454243506807E-04 -2.7266297935978E-03 -1.9493705995775E-04 -2.7553805827517E-03 1.0000000386086E+00 1.5457675745253E-01 @@ -1374,7 +1374,7 @@ "SBEND3:Bmad_Standard:Vector" ABS 1E-11 1.5183289652038E-03 5.0149002563548E-03 2.4876284311897E-04 7.6918921673447E-04 3.0515017745577E-05 1.6874312030058E-07 "SBEND3:Symp_Lie_PTC:Vector" ABS 1E-11 1.5185045662338E-03 5.0148136946509E-03 2.4881436835918E-04 7.6916484088546E-04 3.0518637137154E-05 0.0000000000000E+00 -"SBEND3:Tracking:Vector" ABS 1E-11 1.5183289650901E-03 5.0149002563536E-03 2.4876284303494E-04 7.6918921677714E-04 3.0515023314224E-05 1.6883674437088E-07 +"SBEND3:Tracking:Vector" ABS 1E-11 1.5183289650901E-03 5.0149002563535E-03 2.4876284303494E-04 7.6918921677706E-04 3.0515023314224E-05 1.6883674437088E-07 "SBEND3:Taylor:Vector" ABS 1E-11 1.5185045662338E-03 5.0148136946509E-03 2.4881436835918E-04 7.6916484088546E-04 3.0518637137154E-05 0.0000000000000E+00 "SBEND3:Bmad_Standard:Symp_Err" ABS 1E-11 6.3672563869130E-06 @@ -1429,7 +1429,7 @@ "SBEND5:Bmad_Standard:MatrixRow2" ABS 1E-11 -1.1174164956555E-02 9.9689903556139E-01 6.4531725618544E-02 1.9279464551517E-02 0.0000000000000E+00 6.3270379307197E-03 "SBEND5:Symp_Lie_PTC:MatrixRow2" ABS 1E-11 -1.1199717687160E-02 9.9689871237375E-01 6.4485653412197E-02 1.9264007439196E-02 0.0000000000000E+00 6.3263391691009E-03 -"SBEND5:Tracking:MatrixRow2" ABS 1e-10 -1.1174164978923E-02 9.9689903556260E-01 6.4531725564110E-02 1.9279464533520E-02 0.0000000000000E+00 6.3270379273240E-03 +"SBEND5:Tracking:MatrixRow2" ABS 1e-10 -1.1174164978923E-02 9.9689903556260E-01 6.4531725564110E-02 1.9279464533509E-02 0.0000000000000E+00 6.3270379273240E-03 "SBEND5:Taylor:MatrixRow2" ABS 1E-11 -1.1199717687160E-02 9.9689871237375E-01 6.4485653412197E-02 1.9264007439196E-02 0.0000000000000E+00 6.3263391691009E-03 "SBEND5:Bmad_Standard:MatrixRow3" ABS 1E-11 1.9193169620430E-02 3.7082069981803E-03 1.0039622709375E+00 5.9722213893055E-01 0.0000000000000E+00 -1.2214288572109E-03 @@ -1439,7 +1439,7 @@ "SBEND5:Bmad_Standard:MatrixRow4" ABS 1E-11 6.4462462193455E-02 1.9283195661921E-02 1.2541748440175E-02 1.0033834413346E+00 0.0000000000000E+00 6.6463623852128E-04 "SBEND5:Symp_Lie_PTC:MatrixRow4" ABS 1E-11 6.4448199905910E-02 1.9277163241293E-02 1.2799593927245E-02 1.0034911518204E+00 0.0000000000000E+00 6.6355066465035E-04 -"SBEND5:Tracking:MatrixRow4" ABS 5e-10 6.4462462247733E-02 1.9283195666116E-02 1.2541748415317E-02 1.0033834413285E+00 0.0000000000000E+00 6.6463623821147E-04 +"SBEND5:Tracking:MatrixRow4" ABS 5e-10 6.4462462247722E-02 1.9283195666143E-02 1.2541748415317E-02 1.0033834413285E+00 0.0000000000000E+00 6.6463623818978E-04 "SBEND5:Taylor:MatrixRow4" ABS 1E-11 6.4448199905910E-02 1.9277163241293E-02 1.2799593927245E-02 1.0034911518204E+00 0.0000000000000E+00 6.6355066465035E-04 "SBEND5:Bmad_Standard:MatrixRow5" ABS 1E-11 -6.4057184064146E-03 -2.8520253689501E-03 -7.4325411747570E-04 -1.6277335763554E-03 9.9999999194832E-01 1.5455312335209E-01 @@ -1454,12 +1454,12 @@ "SBEND5:Bmad_Standard:Vector" ABS 1E-11 -3.1320828564932E-04 -1.1388701583314E-03 -9.9483305793442E-04 -3.3806076754206E-03 3.3055135770755E-05 -1.1179717109532E-08 "SBEND5:Symp_Lie_PTC:Vector" ABS 1E-11 -3.1322109738318E-04 -1.1382943174538E-03 -9.9498294192479E-04 -3.3809784171317E-03 3.3038384559175E-05 0.0000000000000E+00 -"SBEND5:Tracking:Vector" ABS 1e-10 -3.1320828564171E-04 -1.1388701580558E-03 -9.9483305804973E-04 -3.3806076753826E-03 3.3055335946536E-05 -1.1165515520842E-08 +"SBEND5:Tracking:Vector" ABS 1e-10 -3.1320828564171E-04 -1.1388701580557E-03 -9.9483305804973E-04 -3.3806076753824E-03 3.3055335946536E-05 -1.1165515520842E-08 "SBEND5:Taylor:Vector" ABS 1E-11 -3.1322109738318E-04 -1.1382943174538E-03 -9.9498294192479E-04 -3.3809784171317E-03 3.3038384559175E-05 0.0000000000000E+00 "SBEND5:Bmad_Standard:Symp_Err" ABS 1E-11 3.0247729133477E-05 "SBEND5:Symp_Lie_PTC:Symp_Err" ABS 1E-11 4.7737167174766E-07 -"SBEND5:Tracking:Symp_Err" ABS 4e-09 3.0247620174319E-05 +"SBEND5:Tracking:Symp_Err" ABS 4e-09 3.0247620185199E-05 "SBEND5:Taylor:Symp_Err" ABS 1E-11 4.7737167174766E-07 "RBEND6:Bmad_Standard:MatrixRow1" ABS 1E-11 9.9992584108126E-01 5.9636644824680E-01 4.7435554836909E-04 9.5401525085251E-05 0.0000000000000E+00 -5.9230993860444E-04 @@ -1474,17 +1474,17 @@ "RBEND6:Bmad_Standard:MatrixRow3" ABS 1E-11 5.0158286903596E-04 1.1175789433032E-04 1.0000987439600E+00 5.9640157232841E-01 0.0000000000000E+00 -2.2530637115776E-03 "RBEND6:Symp_Lie_PTC:MatrixRow3" ABS 3e-08 5.0130700923924E-04 1.1157832651264E-04 1.0001024481031E+00 5.9640247502716E-01 0.0000000000000E+00 -2.2531035788727E-03 -"RBEND6:Tracking:MatrixRow3" ABS 1E-11 5.0158287115756E-04 1.1175789412822E-04 1.0000987439604E+00 5.9640157237151E-01 0.0000000000000E+00 -2.2530637117275E-03 +"RBEND6:Tracking:MatrixRow3" ABS 1E-11 5.0158287107083E-04 1.1175789412822E-04 1.0000987439604E+00 5.9640157237151E-01 0.0000000000000E+00 -2.2530637117275E-03 "RBEND6:Taylor:MatrixRow3" ABS 3e-08 5.0130700923924E-04 1.1157832651264E-04 1.0001024481031E+00 5.9640247502716E-01 0.0000000000000E+00 -2.2531035788727E-03 "RBEND6:Bmad_Standard:MatrixRow4" ABS 1E-11 1.5833682840124E-03 4.7021737047933E-04 3.2164317931945E-04 1.0000930156333E+00 0.0000000000000E+00 6.5884796663960E-04 "RBEND6:Symp_Lie_PTC:MatrixRow4" ABS 1E-11 1.5827982922565E-03 4.7019379163193E-04 3.3248488848188E-04 1.0000957779603E+00 0.0000000000000E+00 6.5879841206652E-04 -"RBEND6:Tracking:MatrixRow4" ABS 1E-11 1.5833682813233E-03 4.7021737102984E-04 3.2164317914814E-04 1.0000930156093E+00 0.0000000000000E+00 6.5884796663501E-04 +"RBEND6:Tracking:MatrixRow4" ABS 1E-11 1.5833682812799E-03 4.7021737102984E-04 3.2164317914814E-04 1.0000930156093E+00 0.0000000000000E+00 6.5884796663501E-04 "RBEND6:Taylor:MatrixRow4" ABS 1E-11 1.5827982922565E-03 4.7019379163193E-04 3.3248488848188E-04 1.0000957779603E+00 0.0000000000000E+00 6.5879841206652E-04 "RBEND6:Bmad_Standard:MatrixRow5" ABS 1E-11 -6.3804682108970E-03 -4.3965431770951E-03 -6.6360348900799E-04 -2.6470841197564E-03 1.0000000000989E+00 1.5456652825848E-01 "RBEND6:Symp_Lie_PTC:MatrixRow5" ABS 2e-07 -6.3804794980087E-03 -4.3964879819066E-03 -6.6356312978711E-04 -2.6470963763591E-03 1.0000000000000E+00 1.5456654588173E-01 -"RBEND6:Tracking:MatrixRow5" ABS 2e-11 -6.3804683941675E-03 -4.3965431520236E-03 -6.6360352195954E-04 -2.6470853555123E-03 1.0000000000994E+00 1.5456652827880E-01 +"RBEND6:Tracking:MatrixRow5" ABS 4e-11 -6.3804683941675E-03 -4.3965431520236E-03 -6.6360352195954E-04 -2.6470853555123E-03 1.0000000000994E+00 1.5456652827880E-01 "RBEND6:Taylor:MatrixRow5" ABS 2e-07 -6.3804794980087E-03 -4.3964879819066E-03 -6.6356312978711E-04 -2.6470963763591E-03 1.0000000000000E+00 1.5456654588173E-01 "RBEND6:Bmad_Standard:MatrixRow6" ABS 1E-11 -5.4851761422878E-09 -4.9254117629079E-09 -5.3660035643404E-10 2.8920331412920E-08 0.0000000000000E+00 9.9999999950935E-01 @@ -1494,12 +1494,12 @@ "RBEND6:Bmad_Standard:Vector" ABS 1E-11 1.3185291591377E-03 4.3718235475852E-03 9.1567274365732E-05 2.5826766427194E-04 2.8245968414544E-05 2.8876276023104E-10 "RBEND6:Symp_Lie_PTC:Vector" ABS 2e-07 1.3184758895737E-03 4.3715648695112E-03 9.1578768885290E-05 2.5828743235740E-04 2.8276144589548E-05 0.0000000000000E+00 -"RBEND6:Tracking:Vector" ABS 1E-11 1.3185291590141E-03 4.3718235477905E-03 9.1567274191258E-05 2.5826766436979E-04 2.8245973465531E-05 3.6548926905799E-10 +"RBEND6:Tracking:Vector" ABS 1E-11 1.3185291590141E-03 4.3718235477905E-03 9.1567274191345E-05 2.5826766436984E-04 2.8245973465531E-05 3.6548926905799E-10 "RBEND6:Taylor:Vector" ABS 4e-08 1.3184758895737E-03 4.3715648695112E-03 9.1578768885290E-05 2.5828743235740E-04 2.8276144589548E-05 0.0000000000000E+00 "RBEND6:Bmad_Standard:Symp_Err" ABS 1E-11 9.9521895621029E-07 "RBEND6:Symp_Lie_PTC:Symp_Err" ABS 2e-07 1.0536012677326E-08 -"RBEND6:Tracking:Symp_Err" ABS 1e-10 9.9522173258979E-07 +"RBEND6:Tracking:Symp_Err" ABS 1e-10 9.9522177593439E-07 "RBEND6:Taylor:Symp_Err" ABS 2e-07 1.0536012677326E-08 "SBEND7:Bmad_Standard:MatrixRow1" ABS 1E-11 9.9630252883074E-01 5.9550747639474E-01 1.9180812393221E-02 3.6926125902190E-03 0.0000000000000E+00 9.4473791599109E-04 @@ -1509,7 +1509,7 @@ "SBEND7:Bmad_Standard:MatrixRow2" ABS 1E-11 -1.1178742284167E-02 9.9689721170782E-01 6.4585378148775E-02 1.9298346916048E-02 0.0000000000000E+00 6.3275003322357E-03 "SBEND7:Symp_Lie_PTC:MatrixRow2" ABS 1E-11 -1.1172459075542E-02 9.9690002770638E-01 6.4555547253469E-02 1.9289639919887E-02 0.0000000000000E+00 6.3273126101872E-03 -"SBEND7:Tracking:MatrixRow2" ABS 1e-10 -1.1178742309809E-02 9.9689721170666E-01 6.4585378093372E-02 1.9298346898462E-02 0.0000000000000E+00 6.3275003323732E-03 +"SBEND7:Tracking:MatrixRow2" ABS 1e-10 -1.1178742309831E-02 9.9689721170666E-01 6.4585378093383E-02 1.9298346898484E-02 0.0000000000000E+00 6.3275003323732E-03 "SBEND7:Taylor:MatrixRow2" ABS 1E-11 -1.1172459075542E-02 9.9690002770638E-01 6.4555547253469E-02 1.9289639919887E-02 0.0000000000000E+00 6.3273126101872E-03 "SBEND7:Bmad_Standard:MatrixRow3" ABS 1E-11 1.9209742933436E-02 3.7081806995788E-03 1.0037935271160E+00 5.9722464384100E-01 0.0000000000000E+00 -1.2214284076221E-03 @@ -1519,7 +1519,7 @@ "SBEND7:Bmad_Standard:MatrixRow4" ABS 1E-11 6.4515584830141E-02 1.9301860905716E-02 1.1949531502289E-02 1.0031993156720E+00 0.0000000000000E+00 6.6002612326004E-04 "SBEND7:Symp_Lie_PTC:MatrixRow4" ABS 1E-11 6.4515924198747E-02 1.9302426540348E-02 1.1946114286152E-02 1.0031981173340E+00 0.0000000000000E+00 6.5923521784909E-04 -"SBEND7:Tracking:MatrixRow4" ABS 4e-10 6.4515584884155E-02 1.9301860909658E-02 1.1949531477333E-02 1.0031993156660E+00 0.0000000000000E+00 6.6002612323615E-04 +"SBEND7:Tracking:MatrixRow4" ABS 4e-10 6.4515584884145E-02 1.9301860909674E-02 1.1949531477349E-02 1.0031993156659E+00 0.0000000000000E+00 6.6002612326326E-04 "SBEND7:Taylor:MatrixRow4" ABS 1E-11 6.4515924198747E-02 1.9302426540348E-02 1.1946114286152E-02 1.0031981173340E+00 0.0000000000000E+00 6.5923521784909E-04 "SBEND7:Bmad_Standard:MatrixRow5" ABS 1E-11 -6.4061620133859E-03 -2.8522984154574E-03 -7.3783934218118E-04 -1.6247361540798E-03 9.9999999194925E-01 1.5455308263267E-01 @@ -1534,12 +1534,12 @@ "SBEND7:Bmad_Standard:Vector" ABS 1E-11 -3.1312482352648E-04 -1.1386391678702E-03 -9.9573512729044E-04 -3.3832373216883E-03 3.3052868407540E-05 -1.1177253466527E-08 "SBEND7:Symp_Lie_PTC:Vector" ABS 1E-11 -3.1313753088092E-04 -1.1387439469917E-03 -9.9568068067653E-04 -3.3830621211742E-03 3.3041708008373E-05 0.0000000000000E+00 -"SBEND7:Tracking:Vector" ABS 1e-10 -3.1312482351862E-04 -1.1386391676065E-03 -9.9573512740721E-04 -3.3832373216511E-03 3.3052844504838E-05 -1.1163084288543E-08 +"SBEND7:Tracking:Vector" ABS 1e-10 -3.1312482351862E-04 -1.1386391676066E-03 -9.9573512740721E-04 -3.3832373216511E-03 3.3052844504838E-05 -1.1163084288543E-08 "SBEND7:Taylor:Vector" ABS 1E-11 -3.1313753088092E-04 -1.1387439469917E-03 -9.9568068067653E-04 -3.3830621211742E-03 3.3041708008373E-05 0.0000000000000E+00 -"SBEND7:Bmad_Standard:Symp_Err" ABS 1E-11 3.0244922514174E-05 +"SBEND7:Bmad_Standard:Symp_Err" ABS 1E-11 3.0244922514160E-05 "SBEND7:Symp_Lie_PTC:Symp_Err" ABS 1E-11 4.7709530726081E-07 -"SBEND7:Tracking:Symp_Err" ABS 5e-09 3.0244813059821E-05 +"SBEND7:Tracking:Symp_Err" ABS 5e-09 3.0244813082234E-05 "SBEND7:Taylor:Symp_Err" ABS 1E-11 4.7709530726081E-07 "SEXTUPOLE1:Bmad_Standard:MatrixRow1" ABS 1E-11 9.9932291751818E-01 5.9628515256830E-01 8.6961822603589E-03 1.7087515966023E-03 0.0000000000000E+00 -1.2252454215422E-03 @@ -1704,7 +1704,7 @@ "SOL_QUAD1:Bmad_Standard:MatrixRow5" ABS 1E-11 1.1281513365842E-01 2.6634971449192E-02 -2.8373348079594E-02 -8.3603437038551E-02 1.0000000000000E+00 6.7208827868130E-01 "SOL_QUAD1:Symp_Lie_PTC:MatrixRow5" ABS 1E-11 1.1450400042913E-01 2.5919978527173E-02 -2.7218916120654E-02 -8.3582127013404E-02 1.0000000000000E+00 6.7222603859622E-01 -"SOL_QUAD1:Tracking:MatrixRow5" ABS 2e-11 1.1281513366212E-01 2.6634971441201E-02 -2.8373348097540E-02 -8.3603437034006E-02 9.9999999999996E-01 6.7208827877071E-01 +"SOL_QUAD1:Tracking:MatrixRow5" ABS 4e-11 1.1281513366212E-01 2.6634971441201E-02 -2.8373348097540E-02 -8.3603437034006E-02 9.9999999999996E-01 6.7208827877071E-01 "SOL_QUAD1:Taylor:MatrixRow5" ABS 1E-11 1.1450400042913E-01 2.5919978527173E-02 -2.7218916120654E-02 -8.3582127013404E-02 1.0000000000000E+00 6.7222603859622E-01 "SOL_QUAD1:Symp_Lie_Bmad:MatrixRow5" ABS 1E-11 1.1690425921685E-01 2.4969484666538E-02 -2.5030525058111E-02 -8.3455547552994E-02 1.0000000000000E+00 6.7246075280676E-01 @@ -1798,6 +1798,46 @@ "TAYLOR1:Symp_Lie_PTC:Symp_Err" ABS 1E-11 1.1609757051975E-02 "TAYLOR1:Taylor:Symp_Err" ABS 1E-11 1.1609918886095E-02 +"THICK_MULTIPOLE1:Bmad_Standard:MatrixRow1" ABS 1E-11 2.9202317620023E+00 6.9276514271494E+00 9.5108532767557E-01 1.6269487849781E+00 0.0000000000000E+00 -6.7560923784438E-03 +"THICK_MULTIPOLE1:Symp_Lie_PTC:MatrixRow1" ABS 1E-11 2.9176435676733E+00 6.9358165417537E+00 9.5252583491236E-01 1.6299878266193E+00 0.0000000000000E+00 -6.8319200502251E-03 +"THICK_MULTIPOLE1:Tracking:MatrixRow1" ABS 1E-11 2.9202319346914E+00 6.9276519377381E+00 9.5108531084406E-01 1.6269487717364E+00 0.0000000000000E+00 -6.7560923798157E-03 +"THICK_MULTIPOLE1:Taylor:MatrixRow1" ABS 1E-11 2.9176435676733E+00 6.9358165417537E+00 9.5252583491236E-01 1.6299878266193E+00 0.0000000000000E+00 -6.8319200502251E-03 + +"THICK_MULTIPOLE1:Bmad_Standard:MatrixRow2" ABS 1E-11 1.1271216349512E+00 2.9014780155227E+00 4.6366854197981E-01 1.1457252935754E+00 0.0000000000000E+00 -3.7462642320055E-03 +"THICK_MULTIPOLE1:Symp_Lie_PTC:MatrixRow2" ABS 1E-11 1.1229975790678E+00 2.8977255505823E+00 4.6365831402730E-01 1.1444647896445E+00 0.0000000000000E+00 -3.7652834950870E-03 +"THICK_MULTIPOLE1:Tracking:MatrixRow2" ABS 1E-11 1.1271218640369E+00 2.9014789691752E+00 4.6366851645388E-01 1.1457252614072E+00 0.0000000000000E+00 -3.7462642322713E-03 +"THICK_MULTIPOLE1:Taylor:MatrixRow2" ABS 1E-11 1.1229975790678E+00 2.8977255505823E+00 4.6365831402730E-01 1.1444647896445E+00 0.0000000000000E+00 -3.7652834950870E-03 + +"THICK_MULTIPOLE1:Bmad_Standard:MatrixRow3" ABS 1E-11 1.0982207484411E+00 1.6925032403485E+00 5.8737559422220E-02 2.9031588818515E+00 0.0000000000000E+00 -1.8747412146037E-03 +"THICK_MULTIPOLE1:Symp_Lie_PTC:MatrixRow3" ABS 1E-11 1.0981190986353E+00 1.6965831059538E+00 6.0083785705444E-02 2.9020353684713E+00 0.0000000000000E+00 -1.8897686063540E-03 +"THICK_MULTIPOLE1:Tracking:MatrixRow3" ABS 1E-11 1.0982207344308E+00 1.6925032335044E+00 5.8737591679403E-02 2.9031590737556E+00 0.0000000000000E+00 -1.8747412147864E-03 +"THICK_MULTIPOLE1:Taylor:MatrixRow3" ABS 1E-11 1.0981190986353E+00 1.6965831059538E+00 6.0083785705444E-02 2.9020353684713E+00 0.0000000000000E+00 -1.8897686063540E-03 + +"THICK_MULTIPOLE1:Bmad_Standard:MatrixRow4" ABS 1E-11 5.6467591893070E-01 1.1755681811961E+00 -2.2660568818587E-01 1.1594180065359E-01 0.0000000000000E+00 7.5773329017580E-04 +"THICK_MULTIPOLE1:Symp_Lie_PTC:MatrixRow4" ABS 1E-11 5.6428642348716E-01 1.1763147424731E+00 -2.2693442512594E-01 1.1739274031073E-01 0.0000000000000E+00 7.4641047728331E-04 +"THICK_MULTIPOLE1:Tracking:MatrixRow4" ABS 1E-11 5.6467589935169E-01 1.1755681685345E+00 -2.2660566933947E-01 1.1594207721057E-01 0.0000000000000E+00 7.5773329008891E-04 +"THICK_MULTIPOLE1:Taylor:MatrixRow4" ABS 1E-11 5.6428642348716E-01 1.1763147424731E+00 -2.2693442512594E-01 1.1739274031073E-01 0.0000000000000E+00 7.4641047728331E-04 + +"THICK_MULTIPOLE1:Bmad_Standard:MatrixRow5" ABS 1E-11 1.4342422725138E-03 2.8638070776293E-03 8.1074906101009E-04 -4.0628268868757E-03 1.0000000000000E+00 1.1595582721066E+00 +"THICK_MULTIPOLE1:Symp_Lie_PTC:MatrixRow5" ABS 1E-11 1.4275071244955E-03 2.8289761831609E-03 8.0285965792137E-04 -4.0694804021135E-03 1.0000000000000E+00 1.1595582983788E+00 +"THICK_MULTIPOLE1:Tracking:MatrixRow5" ABS 1E-11 1.4342490419275E-03 2.8638610267973E-03 8.1074849013138E-04 -4.0628361243009E-03 9.9999999999996E-01 1.1595582722216E+00 +"THICK_MULTIPOLE1:Taylor:MatrixRow5" ABS 1E-11 1.4275071244955E-03 2.8289761831609E-03 8.0285965792137E-04 -4.0694804021135E-03 1.0000000000000E+00 1.1595582983788E+00 + +"THICK_MULTIPOLE1:Bmad_Standard:MatrixRow6" ABS 1E-11 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 1.0000000000000E+00 +"THICK_MULTIPOLE1:Symp_Lie_PTC:MatrixRow6" ABS 1E-11 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 1.0000000000000E+00 +"THICK_MULTIPOLE1:Tracking:MatrixRow6" ABS 1E-11 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 9.9999999999996E-01 +"THICK_MULTIPOLE1:Taylor:MatrixRow6" ABS 1E-11 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 0.0000000000000E+00 1.0000000000000E+00 + +"THICK_MULTIPOLE1:Bmad_Standard:Vector" ABS 1E-11 -2.4797730338989E-02 -1.4392197101125E-02 -8.8415426343475E-03 -5.2125929710213E-03 4.0477600336649E-05 0.0000000000000E+00 +"THICK_MULTIPOLE1:Symp_Lie_PTC:Vector" ABS 1E-11 -2.4793309182796E-02 -1.4358331994577E-02 -8.8508716157489E-03 -5.2136376826140E-03 4.0579741111942E-05 0.0000000000000E+00 +"THICK_MULTIPOLE1:Tracking:Vector" ABS 1E-11 -2.4797731429386E-02 -1.4392199032264E-02 -8.8415434710358E-03 -5.2125940888857E-03 4.0477523641586E-05 2.4546337185072E-16 +"THICK_MULTIPOLE1:Taylor:Vector" ABS 1E-11 -2.4793309182796E-02 -1.4358331994577E-02 -8.8508716157489E-03 -5.2136376826140E-03 4.0579741111942E-05 0.0000000000000E+00 + +"THICK_MULTIPOLE1:Bmad_Standard:Symp_Err" ABS 1E-11 1.4155343563971E-15 +"THICK_MULTIPOLE1:Symp_Lie_PTC:Symp_Err" ABS 1E-11 3.5527136788005E-15 +"THICK_MULTIPOLE1:Tracking:Symp_Err" ABS 1E-11 1.1300455429186E-06 +"THICK_MULTIPOLE1:Taylor:Symp_Err" ABS 1E-11 3.5527136788005E-15 + "VKICKER1:Bmad_Standard:MatrixRow1" ABS 1E-11 1.0000000000000E+00 4.4732790150304E+00 -4.9614674546920E-07 4.8180627083559E-05 0.0000000000000E+00 -7.7837091894700E-03 "VKICKER1:Symp_Lie_PTC:MatrixRow1" ABS 1E-11 1.0000000000000E+00 4.4732791559290E+00 -4.9614674553500E-07 4.8153193875365E-05 0.0000000000000E+00 -7.7837094489757E-03 "VKICKER1:Tracking:MatrixRow1" ABS 1E-11 9.9999999999996E-01 4.4732790152507E+00 -4.9614713379387E-07 4.8180627456457E-05 0.0000000000000E+00 -7.7837091897771E-03 @@ -1953,7 +1993,7 @@ "LCAVITY1:Bmad_Standard:MatrixRow6" ABS 1E-11 0.0000000000000E+00 -1.1404543842030E-07 -1.3989850267304E-02 -1.7072656902278E-07 -1.3989762994321E+01 2.0978305377550E-01 "LCAVITY1:Symp_Lie_PTC:MatrixRow6" ABS 1E-11 7.7607450143769E-02 4.1615243804695E-02 -1.4075900386697E-02 -9.7107389446315E-04 -3.1782643220010E+00 -2.0085199306768E-01 -"LCAVITY1:Tracking:MatrixRow6" ABS 4e-10 -2.5105214279675E-02 7.8979228756992E-02 -7.6724202671685E-03 6.4381333264585E-03 -5.7992593014172E+00 -3.3995793457114E-01 +"LCAVITY1:Tracking:MatrixRow6" ABS 6e-10 -2.5105214279675E-02 7.8979228756992E-02 -7.6724202671685E-03 6.4381333264585E-03 -5.7992593014172E+00 -3.3995793457114E-01 "LCAVITY1:Taylor:MatrixRow6" ABS 1E-11 7.7607450143769E-02 4.1615243804695E-02 -1.4075900386697E-02 -9.7107389446315E-04 -3.1782643220010E+00 -2.0085199306768E-01 "LCAVITY1:Bmad_Standard:Vector" ABS 1E-11 4.6000164379271E-02 5.4627930158967E-03 4.1666834339679E-04 4.4137558201654E-04 -3.0872779672802E-02 -9.3154444954101E-02 @@ -1988,12 +2028,12 @@ "LCAVITY2:Bmad_Standard:MatrixRow5" ABS 1E-11 3.9683700764436E-10 -8.8930367585639E-03 8.0252695567908E-10 -1.7786124507225E-02 1.0000000054742E+00 9.5370530960495E-05 "LCAVITY2:Symp_Lie_PTC:MatrixRow5" ABS 1E-11 -4.7980619681379E-09 -8.8932326915161E-03 8.8587626797082E-10 -1.7786446269474E-02 9.9999952487605E-01 7.4498682677939E-02 -"LCAVITY2:Tracking:MatrixRow5" ABS 1e-10 3.9634094617380E-10 -8.8930346161739E-03 2.8414770536500E-10 -1.7786121191696E-02 9.9999952422611E-01 7.4498677233789E-02 +"LCAVITY2:Tracking:MatrixRow5" ABS 2e-10 3.9634094617380E-10 -8.8930346161739E-03 2.8414770536500E-10 -1.7786121191696E-02 9.9999952422611E-01 7.4498677233789E-02 "LCAVITY2:Taylor:MatrixRow5" ABS 1E-11 -4.7980619681379E-09 -8.8932326915161E-03 8.8587626797082E-10 -1.7786446269474E-02 9.9999952487605E-01 7.4498682677939E-02 "LCAVITY2:Bmad_Standard:MatrixRow6" ABS 1E-11 0.0000000000000E+00 -1.0550203378004E-13 -1.2941838585770E-08 -1.5793705124629E-13 -1.2941757850605E-05 9.9999923542286E-01 "LCAVITY2:Symp_Lie_PTC:MatrixRow6" ABS 1E-11 -1.2662848982755E-08 3.1327939148250E-07 -3.2063318853825E-08 -3.2769451629932E-08 -1.2940473139373E-05 9.9999875298966E-01 -"LCAVITY2:Tracking:MatrixRow6" ABS 1E-11 0.0000000000000E+00 5.7539346551283E-08 -1.2948106128952E-08 8.6148059172397E-08 -1.2941757908391E-05 9.9999875351458E-01 +"LCAVITY2:Tracking:MatrixRow6" ABS 2e-11 0.0000000000000E+00 5.7539346551283E-08 -1.2948106128952E-08 8.6148059172397E-08 -1.2941757908391E-05 9.9999875351458E-01 "LCAVITY2:Taylor:MatrixRow6" ABS 1E-11 -1.2662848982755E-08 3.1327939148250E-07 -3.2063318853825E-08 -3.2769451629932E-08 -1.2940473139373E-05 9.9999875298966E-01 "LCAVITY2:Bmad_Standard:Vector" ABS 1E-11 5.3334062797261E-05 6.8009893723631E-11 1.0660325518111E-04 3.7200720802433E-10 4.9430029571620E-04 -2.8570800774709E-07 @@ -2073,7 +2113,7 @@ "LCAVITY1_ABS_TIME:Bmad_Standard:MatrixRow6" ABS 1E-11 0.0000000000000E+00 -1.1404543842030E-07 -1.3989850267304E-02 -1.7072656902278E-07 -1.3989762994321E+01 2.0978305377550E-01 "LCAVITY1_ABS_TIME:Symp_Lie_PTC:MatrixRow6" ABS 1E-11 7.7607450143769E-02 4.1615243804695E-02 -1.4075900386697E-02 -9.7107389446315E-04 -3.1782643220010E+00 -2.0085199306768E-01 -"LCAVITY1_ABS_TIME:Tracking:MatrixRow6" ABS 4e-10 -2.5105214279675E-02 7.8979228756992E-02 -7.6724202671685E-03 6.4381333264585E-03 -5.7992593014172E+00 -3.3995793457114E-01 +"LCAVITY1_ABS_TIME:Tracking:MatrixRow6" ABS 6e-10 -2.5105214279675E-02 7.8979228756992E-02 -7.6724202671685E-03 6.4381333264585E-03 -5.7992593014172E+00 -3.3995793457114E-01 "LCAVITY1_ABS_TIME:Taylor:MatrixRow6" ABS 1E-11 7.7607450143769E-02 4.1615243804695E-02 -1.4075900386697E-02 -9.7107389446315E-04 -3.1782643220010E+00 -2.0085199306768E-01 "LCAVITY1_ABS_TIME:Bmad_Standard:Vector" ABS 1E-11 4.6000164379271E-02 5.4627930158967E-03 4.1666834339679E-04 4.4137558201654E-04 -3.0872779672802E-02 -9.3154444954101E-02 @@ -2108,12 +2148,12 @@ "LCAVITY2_ABS_TIME:Bmad_Standard:MatrixRow5" ABS 1E-11 3.9683700764436E-10 -8.8930367585639E-03 8.0252695567908E-10 -1.7786124507225E-02 1.0000000054742E+00 9.5370530960495E-05 "LCAVITY2_ABS_TIME:Symp_Lie_PTC:MatrixRow5" ABS 1E-11 -4.7980619681379E-09 -8.8932326915161E-03 8.8587626797082E-10 -1.7786446269474E-02 9.9999952487605E-01 7.4498682677939E-02 -"LCAVITY2_ABS_TIME:Tracking:MatrixRow5" ABS 1e-10 3.9634094617380E-10 -8.8930346161739E-03 2.8414770536500E-10 -1.7786121191696E-02 9.9999952422611E-01 7.4498677233789E-02 +"LCAVITY2_ABS_TIME:Tracking:MatrixRow5" ABS 2e-10 3.9634094617380E-10 -8.8930346161739E-03 2.8414770536500E-10 -1.7786121191696E-02 9.9999952422611E-01 7.4498677233789E-02 "LCAVITY2_ABS_TIME:Taylor:MatrixRow5" ABS 1E-11 -4.7980619681379E-09 -8.8932326915161E-03 8.8587626797082E-10 -1.7786446269474E-02 9.9999952487605E-01 7.4498682677939E-02 "LCAVITY2_ABS_TIME:Bmad_Standard:MatrixRow6" ABS 1E-11 0.0000000000000E+00 -1.0550203378004E-13 -1.2941838585770E-08 -1.5793705124629E-13 -1.2941757850605E-05 9.9999923542286E-01 "LCAVITY2_ABS_TIME:Symp_Lie_PTC:MatrixRow6" ABS 1E-11 -1.2662848982755E-08 3.1327939148250E-07 -3.2063318853825E-08 -3.2769451629932E-08 -1.2940473139373E-05 9.9999875298966E-01 -"LCAVITY2_ABS_TIME:Tracking:MatrixRow6" ABS 1E-11 0.0000000000000E+00 5.7539346551283E-08 -1.2948106128952E-08 8.6148059172397E-08 -1.2941757908391E-05 9.9999875351458E-01 +"LCAVITY2_ABS_TIME:Tracking:MatrixRow6" ABS 2e-11 0.0000000000000E+00 5.7539346551283E-08 -1.2948106128952E-08 8.6148059172397E-08 -1.2941757908391E-05 9.9999875351458E-01 "LCAVITY2_ABS_TIME:Taylor:MatrixRow6" ABS 1E-11 -1.2662848982755E-08 3.1327939148250E-07 -3.2063318853825E-08 -3.2769451629932E-08 -1.2940473139373E-05 9.9999875298966E-01 "LCAVITY2_ABS_TIME:Bmad_Standard:Vector" ABS 1E-11 5.3334062797261E-05 6.8009893723631E-11 1.0660325518111E-04 3.7200720802433E-10 4.9430029571620E-04 -2.8570800774709E-07 @@ -2153,7 +2193,7 @@ "LCAVITY3_ABS_TIME:Bmad_Standard:MatrixRow6" ABS 1E-11 -7.3575068802133E-02 -1.5210129804671E-01 -1.4622382754331E-02 -1.5285294260777E-02 -7.2414721082152E+00 5.6872042820983E-01 "LCAVITY3_ABS_TIME:Symp_Lie_PTC:MatrixRow6" ABS 1E-11 -8.3969997467743E-03 1.4199171086668E-01 -1.4723228865636E-02 -1.0865612977451E-02 -6.5034107924155E+00 3.9582183561637E-01 -"LCAVITY3_ABS_TIME:Tracking:MatrixRow6" ABS 2e-10 -6.6440527930756E-02 -8.4611468055551E-02 -1.4266097503324E-02 1.5807413478175E-02 -6.4992711102482E+00 4.2485753644211E-01 +"LCAVITY3_ABS_TIME:Tracking:MatrixRow6" ABS 5e-10 -6.6440527930756E-02 -8.4611468055551E-02 -1.4266097503324E-02 1.5807413478175E-02 -6.4992711102482E+00 4.2485753644211E-01 "LCAVITY3_ABS_TIME:Taylor:MatrixRow6" ABS 1E-11 -8.3969997467743E-03 1.4199171086668E-01 -1.4723228865636E-02 -1.0865612977451E-02 -6.5034107924155E+00 3.9582183561637E-01 "LCAVITY3_ABS_TIME:Bmad_Standard:Vector" ABS 1E-11 1.9874534804795E-02 3.1326121977477E-03 1.2472769703264E-03 5.8064184895003E-04 -3.5076654631577E-03 -1.4117858954319E-01 diff --git a/regression_tests/tracking_method_test/output.correct b/regression_tests/tracking_method_test/output.correct index d6cee51aa1..403268166d 100644 --- a/regression_tests/tracking_method_test/output.correct +++ b/regression_tests/tracking_method_test/output.correct @@ -108,21 +108,21 @@ "ELSEPARATOR2: Time_Runge_Kutta dSpin" ABS 1E-8 -0.000144600 0.001416424 -0.001049508 -0.000000000 "ELSEPARATOR2: Taylor dSpin" ABS 1E-8 -0.000144600 0.001416424 -0.001049508 0.000000000 -"EM_FIELD1: Symp_Lie_PTC" ABS 2E-9 3.6230985240E-03 1.7670112177E-03 8.8483166548E-03 4.0000821892E-03 9.3205421894E-03 6.0000000000E-03 1.9489618253E-15 +"EM_FIELD1: Symp_Lie_PTC" ABS 4E-9 3.6230985240E-03 1.7670112177E-03 8.8483166548E-03 4.0000821892E-03 9.3205421894E-03 6.0000000000E-03 1.9489618253E-15 "EM_FIELD1: Symp_Lie_PTC-OD" ABS 1e-10 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 -"EM_FIELD1: Runge_Kutta" ABS 2E-9 3.6220394523E-03 1.7682490958E-03 8.8487125006E-03 3.9994226786E-03 7.1641977956E-03 6.0000000000E-03 -1.0195130330E-12 -"EM_FIELD1: Time_Runge_Kutta" ABS 2E-9 3.6220402316E-03 1.7682495307E-03 8.8487121865E-03 3.9994223745E-03 7.1641977956E-03 6.0000000000E-03 -9.7341796082E-13 -"EM_FIELD1: Taylor" ABS 2E-9 3.6230996833E-03 1.7670118667E-03 8.8483188627E-03 4.0000822656E-03 9.3205478476E-03 6.0000000000E-03 2.1579960041E-15 +"EM_FIELD1: Runge_Kutta" ABS 4E-9 3.6220394523E-03 1.7682490958E-03 8.8487125006E-03 3.9994226786E-03 7.1641977956E-03 6.0000000000E-03 -1.0195130330E-12 +"EM_FIELD1: Time_Runge_Kutta" ABS 4E-9 3.6220402316E-03 1.7682495307E-03 8.8487121865E-03 3.9994223745E-03 7.1641977956E-03 6.0000000000E-03 -9.7341796082E-13 +"EM_FIELD1: Taylor" ABS 4E-9 3.6230996833E-03 1.7670118667E-03 8.8483188627E-03 4.0000822656E-03 9.3205478476E-03 6.0000000000E-03 2.1579960041E-15 "EM_FIELD1: Symp_Lie_PTC dSpin" ABS 1E-8 -0.000114010 -0.000001375 0.000069488 0.000000000 "EM_FIELD1: Runge_Kutta dSpin" ABS 1E-8 -0.000117762 0.000001444 0.000069483 0.000000000 "EM_FIELD1: Time_Runge_Kutta dSpin" ABS 1E-8 -0.000117761 0.000001444 0.000069483 0.000000000 "EM_FIELD1: Taylor dSpin" ABS 1E-8 -0.000114009 -0.000001375 0.000069488 -0.000000000 -"EM_FIELD2: Symp_Lie_PTC" ABS 2E-9 3.6289584091E-03 1.7585390672E-03 8.8455780636E-03 4.0035300880E-03 9.3111330530E-03 6.0000000000E-03 1.1778772402E-15 +"EM_FIELD2: Symp_Lie_PTC" ABS 4E-9 3.6289584091E-03 1.7585390672E-03 8.8455780636E-03 4.0035300880E-03 9.3111330530E-03 6.0000000000E-03 1.1778772402E-15 "EM_FIELD2: Symp_Lie_PTC-OD" ABS 1e-10 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 -"EM_FIELD2: Runge_Kutta" ABS 2E-9 3.6220394523E-03 1.7682490958E-03 8.8487125006E-03 3.9994226786E-03 7.1641977956E-03 6.0000000000E-03 -1.0195130330E-12 -"EM_FIELD2: Time_Runge_Kutta" ABS 2E-9 3.6220402316E-03 1.7682495307E-03 8.8487121865E-03 3.9994223745E-03 7.1641977956E-03 6.0000000000E-03 -9.7341796082E-13 -"EM_FIELD2: Taylor" ABS 2E-9 3.6289594388E-03 1.7585391350E-03 8.8455802363E-03 4.0035300883E-03 9.3111405372E-03 6.0000000000E-03 8.7343327015E-16 +"EM_FIELD2: Runge_Kutta" ABS 4E-9 3.6220394523E-03 1.7682490958E-03 8.8487125006E-03 3.9994226786E-03 7.1641977956E-03 6.0000000000E-03 -1.0195130330E-12 +"EM_FIELD2: Time_Runge_Kutta" ABS 4E-9 3.6220402316E-03 1.7682495307E-03 8.8487121865E-03 3.9994223745E-03 7.1641977956E-03 6.0000000000E-03 -9.7341796082E-13 +"EM_FIELD2: Taylor" ABS 4E-9 3.6289594388E-03 1.7585391350E-03 8.8455802363E-03 4.0035300883E-03 9.3111405372E-03 6.0000000000E-03 8.7343327015E-16 "EM_FIELD2: Symp_Lie_PTC dSpin" ABS 1E-8 -0.000117250 -0.000000424 0.000070670 0.000000000 "EM_FIELD2: Runge_Kutta dSpin" ABS 1E-8 -0.000117762 0.000001444 0.000069483 0.000000000 "EM_FIELD2: Time_Runge_Kutta dSpin" ABS 1E-8 -0.000117761 0.000001444 0.000069483 0.000000000 @@ -544,6 +544,19 @@ "SOL_QUAD2: Time_Runge_Kutta dSpin" ABS 1E-8 -0.342705599 -0.906914459 -0.008864618 0.000000000 "SOL_QUAD2: Taylor dSpin" ABS 1E-8 -0.342704206 -0.906917191 -0.008867317 0.000000000 +"THICK_MULTIPOLE1: Bmad_Standard" ABS 2e-14 9.1638426462E-03 1.5729336151E-03 2.1269151573E-02 3.9985316225E-03 1.1959075903E-02 6.0000000000E-03 2.6255039809E-15 +"THICK_MULTIPOLE1: Symp_Lie_PTC" ABS 2e-14 9.1624791680E-03 1.5727170522E-03 2.1267666222E-02 3.9988308999E-03 1.1959084065E-02 6.0000000000E-03 -1.1622647289E-14 +"THICK_MULTIPOLE1: Symp_Lie_PTC-OD" ABS 1e-10 -5.2041704279E-18 -4.3368086899E-19 0.0000000000E+00 -8.6736173799E-19 0.0000000000E+00 0.0000000000E+00 +"THICK_MULTIPOLE1: Runge_Kutta" ABS 1e-13 9.1629024491E-03 1.5727738552E-03 2.1268184627E-02 3.9987473258E-03 1.1959081458E-02 6.0000000000E-03 -3.3827107782E-15 +"THICK_MULTIPOLE1: Linear" ABS 2e-14 9.1624791680E-03 1.5727170522E-03 2.1267666222E-02 3.9988308999E-03 1.1959084065E-02 6.0000000000E-03 2.1120258320E-15 +"THICK_MULTIPOLE1: Time_Runge_Kutta" ABS 1e-13 9.1629024374E-03 1.5727738557E-03 2.1268184631E-02 3.9987473258E-03 1.1959081458E-02 6.0000000000E-03 -2.6411164922E-14 +"THICK_MULTIPOLE1: Taylor" ABS 2e-14 9.1644058352E-03 1.5744640293E-03 2.1267063727E-02 3.9976170411E-03 1.1959314457E-02 6.0000000000E-03 -5.8069868358E-15 +"THICK_MULTIPOLE1: Bmad_Standard dSpin" ABS 1E-8 -0.000213093 -0.000000659 0.000128321 0.000000000 +"THICK_MULTIPOLE1: Symp_Lie_PTC dSpin" ABS 1E-8 -0.000212866 -0.000000593 0.000128133 0.000000000 +"THICK_MULTIPOLE1: Runge_Kutta dSpin" ABS 1E-8 -0.000212838 -0.000000635 0.000128149 0.000000000 +"THICK_MULTIPOLE1: Time_Runge_Kutta dSpin" ABS 1E-8 -0.000212838 -0.000000635 0.000128149 0.000000000 +"THICK_MULTIPOLE1: Taylor dSpin" ABS 1E-8 -0.000211791 -0.000001152 0.000127935 0.000000000 + "TAYLOR1: Symp_Lie_PTC" ABS 2e-14 8.9974028112E-03 2.2760823735E-03 2.8346981097E-03 3.9980996224E-03 4.8641435695E-03 6.0478434012E-03 -2.3398980236E-15 "TAYLOR1: Symp_Lie_PTC-OD" ABS 1e-10 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 "TAYLOR1: Linear" ABS 2e-14 8.9974024849E-03 2.2760823731E-03 2.8346981557E-03 3.9980996217E-03 4.8641436623E-03 6.0478431988E-03 2.2626215138E-15 @@ -737,18 +750,18 @@ "ELSEPARATOR2-Anti_D: Runge_Kutta dSpin" ABS 1E-8 -0.000139194 0.001412298 -0.001049437 0.000000000 "ELSEPARATOR2-Anti_D: Time_Runge_Kutta dSpin" ABS 1E-8 -0.000139194 0.001412298 -0.001049437 0.000000000 -"EM_FIELD1-Anti_D: Symp_Lie_PTC" ABS 2E-9 3.6209634721E-03 1.7696753615E-03 8.2843425496E-03 3.9988542722E-03 9.3227855199E-03 6.0000000000E-03 2.8043577993E+00 +"EM_FIELD1-Anti_D: Symp_Lie_PTC" ABS 4E-9 3.6209634721E-03 1.7696753615E-03 8.2843425496E-03 3.9988542722E-03 9.3227855199E-03 6.0000000000E-03 2.8043577993E+00 "EM_FIELD1-Anti_D: Symp_Lie_PTC-OD" ABS 1e-10 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 -"EM_FIELD1-Anti_D: Runge_Kutta" ABS 2E-9 3.6220563426E-03 1.7681942455E-03 8.2838720299E-03 3.9995468026E-03 -2.7971913558E+00 6.0000000000E-03 1.0480505352E-12 -"EM_FIELD1-Anti_D: Time_Runge_Kutta" ABS 2E-9 3.6220550482E-03 1.7681918873E-03 8.2838725806E-03 3.9995478034E-03 -2.7971913558E+00 6.0000000000E-03 1.0249578963E-12 +"EM_FIELD1-Anti_D: Runge_Kutta" ABS 4E-9 3.6220563426E-03 1.7681942455E-03 8.2838720299E-03 3.9995468026E-03 -2.7971913558E+00 6.0000000000E-03 1.0480505352E-12 +"EM_FIELD1-Anti_D: Time_Runge_Kutta" ABS 4E-9 3.6220550482E-03 1.7681918873E-03 8.2838725806E-03 3.9995478034E-03 -2.7971913558E+00 6.0000000000E-03 1.0249578963E-12 "EM_FIELD1-Anti_D: Symp_Lie_PTC dSpin" ABS 1E-8 0.000108788 0.000004886 -0.000069198 -0.000000000 "EM_FIELD1-Anti_D: Runge_Kutta dSpin" ABS 1E-8 0.000113937 0.000001371 -0.000069477 0.000000000 "EM_FIELD1-Anti_D: Time_Runge_Kutta dSpin" ABS 1E-8 0.000113939 0.000001371 -0.000069478 0.000000000 -"EM_FIELD2-Anti_D: Symp_Lie_PTC" ABS 2E-9 3.5798283998E-03 1.7925649850E-03 8.2936952515E-03 4.0200579434E-03 9.3171653705E-03 6.0000000000E-03 2.8043577993E+00 +"EM_FIELD2-Anti_D: Symp_Lie_PTC" ABS 4E-9 3.5798283998E-03 1.7925649850E-03 8.2936952515E-03 4.0200579434E-03 9.3171653705E-03 6.0000000000E-03 2.8043577993E+00 "EM_FIELD2-Anti_D: Symp_Lie_PTC-OD" ABS 1e-10 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 -"EM_FIELD2-Anti_D: Runge_Kutta" ABS 2E-9 3.6220563426E-03 1.7681942455E-03 8.2838720299E-03 3.9995468026E-03 -2.7971913558E+00 6.0000000000E-03 1.0480505352E-12 -"EM_FIELD2-Anti_D: Time_Runge_Kutta" ABS 2E-9 3.6220550482E-03 1.7681918873E-03 8.2838725806E-03 3.9995478034E-03 -2.7971913558E+00 6.0000000000E-03 1.0249578963E-12 +"EM_FIELD2-Anti_D: Runge_Kutta" ABS 4E-9 3.6220563426E-03 1.7681942455E-03 8.2838720299E-03 3.9995468026E-03 -2.7971913558E+00 6.0000000000E-03 1.0480505352E-12 +"EM_FIELD2-Anti_D: Time_Runge_Kutta" ABS 4E-9 3.6220550482E-03 1.7681918873E-03 8.2838725806E-03 3.9995478034E-03 -2.7971913558E+00 6.0000000000E-03 1.0249578963E-12 "EM_FIELD2-Anti_D: Symp_Lie_PTC dSpin" ABS 1E-8 0.000093592 -0.000002833 -0.000053901 -0.000000000 "EM_FIELD2-Anti_D: Runge_Kutta dSpin" ABS 1E-8 0.000113937 0.000001371 -0.000069477 0.000000000 "EM_FIELD2-Anti_D: Time_Runge_Kutta dSpin" ABS 1E-8 0.000113939 0.000001371 -0.000069478 0.000000000 @@ -1068,13 +1081,23 @@ "SOL_QUAD2-Anti_D: Symp_Lie_PTC" ABS 2e-14 3.7653707000E-02 6.0867641948E-03 -7.7715736970E-03 2.2326974142E-02 8.5470560669E-03 6.0000000000E-03 5.2080930559E+00 "SOL_QUAD2-Anti_D: Symp_Lie_PTC-OD" ABS 1e-10 0.0000000000E+00 1.1275702594E-17 -2.6888213878E-17 0.0000000000E+00 -4.4235448637E-16 0.0000000000E+00 "SOL_QUAD2-Anti_D: Runge_Kutta" ABS 1e-13 3.7653704303E-02 6.0867634260E-03 -7.7715730177E-03 2.2326973756E-02 -5.1995459996E+00 6.0000000000E-03 9.9920072216E-13 -"SOL_QUAD2-Anti_D: Time_Runge_Kutta" ABS 1e-13 3.7653704291E-02 6.0867634231E-03 -7.7715730117E-03 2.2326973749E-02 -5.1995459996E+00 6.0000000004E-03 1.0000889006E-12 +"SOL_QUAD2-Anti_D: Time_Runge_Kutta" ABS 2e-13 3.7653704291E-02 6.0867634231E-03 -7.7715730117E-03 2.2326973749E-02 -5.1995459996E+00 6.0000000004E-03 1.0000889006E-12 "SOL_QUAD2-Anti_D: Symp_Lie_Bmad" ABS 2e-14 3.7728443543E-02 6.0713683142E-03 -7.7407834798E-03 2.2364343416E-02 8.5402895172E-03 6.0000000000E-03 -3.3089850304E-15 "SOL_QUAD2-Anti_D: Bmad_Standard dSpin" ABS 1E-8 -0.770341466 -0.594696040 -0.009212513 0.000000000 "SOL_QUAD2-Anti_D: Symp_Lie_PTC dSpin" ABS 1E-8 -0.760000675 -0.568193712 0.010010053 0.000000000 "SOL_QUAD2-Anti_D: Runge_Kutta dSpin" ABS 1E-8 -0.770340341 -0.594701707 -0.009213683 0.000000000 "SOL_QUAD2-Anti_D: Time_Runge_Kutta dSpin" ABS 1E-8 -0.770340341 -0.594701707 -0.009213682 0.000000000 +"THICK_MULTIPOLE1-Anti_D: Bmad_Standard" ABS 2e-14 9.1638426462E-03 1.5729336151E-03 2.1269151573E-02 3.9985316225E-03 -9.0020481361E+00 6.0000000000E-03 5.3290705182E-15 +"THICK_MULTIPOLE1-Anti_D: Symp_Lie_PTC" ABS 2e-14 9.1624791680E-03 1.5727170522E-03 2.1267666222E-02 3.9988308999E-03 1.1959084065E-02 6.0000000000E-03 9.0140072120E+00 +"THICK_MULTIPOLE1-Anti_D: Symp_Lie_PTC-OD" ABS 1e-10 -3.9898639947E-17 0.0000000000E+00 -3.4694469520E-18 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 +"THICK_MULTIPOLE1-Anti_D: Runge_Kutta" ABS 1e-13 9.1629024491E-03 1.5727738552E-03 2.1268184627E-02 3.9987473258E-03 -9.0020481306E+00 6.0000000000E-03 -1.7763568394E-15 +"THICK_MULTIPOLE1-Anti_D: Time_Runge_Kutta" ABS 1e-13 9.1629024374E-03 1.5727738557E-03 2.1268184631E-02 3.9987473258E-03 -9.0020481306E+00 6.0000000000E-03 -2.6645352591E-14 +"THICK_MULTIPOLE1-Anti_D: Bmad_Standard dSpin" ABS 1E-8 0.000213067 0.000000637 -0.000128412 0.000000000 +"THICK_MULTIPOLE1-Anti_D: Symp_Lie_PTC dSpin" ABS 1E-8 0.000212840 0.000000572 -0.000128223 0.000000000 +"THICK_MULTIPOLE1-Anti_D: Runge_Kutta dSpin" ABS 1E-8 0.000212812 0.000000613 -0.000128240 0.000000000 +"THICK_MULTIPOLE1-Anti_D: Time_Runge_Kutta dSpi" ABS 1E-8 0.000212812 0.000000613 -0.000128240 0.000000000 + "TAYLOR1-Anti_D: Symp_Lie_PTC" ABS 2e-14 8.9974028112E-03 2.2760823735E-03 2.8346981097E-03 3.9980996224E-03 4.8641435695E-03 6.0478434012E-03 1.0015686843E+00 "TAYLOR1-Anti_D: Symp_Lie_PTC-OD" ABS 1e-10 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 "TAYLOR1-Anti_D: Symp_Lie_PTC dSpin" ABS 1E-8 0.365100671 -0.319463086 -0.726174495 0.000000000 @@ -1102,7 +1125,7 @@ "WIGGLER_FLAT1-Anti_D: Symp_Lie_PTC" ABS 2e-14 -1.5714240268E-02 -3.5606420322E-02 8.1279477398E-03 6.3133316876E-03 6.2281523755E-03 6.0000000000E-03 2.0031128681E+00 "WIGGLER_FLAT1-Anti_D: Symp_Lie_PTC-OD" ABS 1e-10 -6.9388939039E-18 -6.9388939039E-18 3.4694469520E-18 6.9388939039E-18 1.7347234760E-18 0.0000000000E+00 "WIGGLER_FLAT1-Anti_D: Runge_Kutta" ABS 2e-13 2.9891920669E-03 2.0004284531E-03 6.9749698857E-03 3.9957298000E-03 -1.9965663999E+00 6.0000000000E-03 1.0014211682E-12 -"WIGGLER_FLAT1-Anti_D: Time_Runge_Kutta" ABS 1e-13 2.9891920704E-03 2.0004284526E-03 6.9749698860E-03 3.9957297999E-03 -1.9965663999E+00 6.0000000000E-03 1.0258460748E-12 +"WIGGLER_FLAT1-Anti_D: Time_Runge_Kutta" ABS 4e-13 2.9891920704E-03 2.0004284526E-03 6.9749698860E-03 3.9957297999E-03 -1.9965663999E+00 6.0000000000E-03 1.0258460748E-12 "WIGGLER_FLAT1-Anti_D: Symp_Lie_Bmad" ABS 2e-14 -1.5702675280E-02 -3.5606390498E-02 8.1255250163E-03 6.3133115623E-03 6.2284707118E-03 6.0000000000E-03 3.1203338524E-16 "WIGGLER_FLAT1-Anti_D: Bmad_Standard dSpin" ABS 1E-8 0.000070732 -0.000051002 -0.000001645 0.000000000 "WIGGLER_FLAT1-Anti_D: Symp_Lie_PTC dSpin" ABS 1E-8 0.018214682 0.001814793 -0.012881649 -0.000000000 @@ -1230,18 +1253,18 @@ "ELSEPARATOR2-Anti_O: Runge_Kutta dSpin" ABS 1E-8 -0.000139194 0.001412298 -0.001049437 0.000000000 "ELSEPARATOR2-Anti_O: Time_Runge_Kutta dSpin" ABS 1E-8 -0.000139194 0.001412298 -0.001049437 0.000000000 -"EM_FIELD1-Anti_O: Symp_Lie_PTC" ABS 2E-9 3.6209634721E-03 1.7696753615E-03 8.2843425496E-03 3.9988542722E-03 9.3227855199E-03 6.0000000000E-03 2.2516710718E-15 +"EM_FIELD1-Anti_O: Symp_Lie_PTC" ABS 4E-9 3.6209634721E-03 1.7696753615E-03 8.2843425496E-03 3.9988542722E-03 9.3227855199E-03 6.0000000000E-03 2.2516710718E-15 "EM_FIELD1-Anti_O: Symp_Lie_PTC-OD" ABS 1e-10 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 -"EM_FIELD1-Anti_O: Runge_Kutta" ABS 2E-9 3.6220563426E-03 1.7681942455E-03 8.2838720299E-03 3.9995468026E-03 7.1664435047E-03 6.0000000000E-03 -9.5531395294E-13 -"EM_FIELD1-Anti_O: Time_Runge_Kutta" ABS 2E-9 3.6220550482E-03 1.7681918873E-03 8.2838725806E-03 3.9995478034E-03 7.1664435049E-03 6.0000000000E-03 -9.8184698219E-13 +"EM_FIELD1-Anti_O: Runge_Kutta" ABS 4E-9 3.6220563426E-03 1.7681942455E-03 8.2838720299E-03 3.9995468026E-03 7.1664435047E-03 6.0000000000E-03 -9.5531395294E-13 +"EM_FIELD1-Anti_O: Time_Runge_Kutta" ABS 4E-9 3.6220550482E-03 1.7681918873E-03 8.2838725806E-03 3.9995478034E-03 7.1664435049E-03 6.0000000000E-03 -9.8184698219E-13 "EM_FIELD1-Anti_O: Symp_Lie_PTC dSpin" ABS 1E-8 0.000108788 0.000004886 -0.000069198 -0.000000000 "EM_FIELD1-Anti_O: Runge_Kutta dSpin" ABS 1E-8 0.000113937 0.000001371 -0.000069477 0.000000000 "EM_FIELD1-Anti_O: Time_Runge_Kutta dSpin" ABS 1E-8 0.000113939 0.000001371 -0.000069478 0.000000000 -"EM_FIELD2-Anti_O: Symp_Lie_PTC" ABS 2E-9 3.5798283998E-03 1.7925649850E-03 8.2936952515E-03 4.0200579434E-03 9.3171653705E-03 6.0000000000E-03 2.6229018957E-15 +"EM_FIELD2-Anti_O: Symp_Lie_PTC" ABS 4E-9 3.5798283998E-03 1.7925649850E-03 8.2936952515E-03 4.0200579434E-03 9.3171653705E-03 6.0000000000E-03 2.6229018957E-15 "EM_FIELD2-Anti_O: Symp_Lie_PTC-OD" ABS 1e-10 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 -"EM_FIELD2-Anti_O: Runge_Kutta" ABS 2E-9 3.6220563426E-03 1.7681942455E-03 8.2838720299E-03 3.9995468026E-03 7.1664435047E-03 6.0000000000E-03 -9.5531395294E-13 -"EM_FIELD2-Anti_O: Time_Runge_Kutta" ABS 2E-9 3.6220550482E-03 1.7681918873E-03 8.2838725806E-03 3.9995478034E-03 7.1664435049E-03 6.0000000000E-03 -9.8184698219E-13 +"EM_FIELD2-Anti_O: Runge_Kutta" ABS 4E-9 3.6220563426E-03 1.7681942455E-03 8.2838720299E-03 3.9995468026E-03 7.1664435047E-03 6.0000000000E-03 -9.5531395294E-13 +"EM_FIELD2-Anti_O: Time_Runge_Kutta" ABS 4E-9 3.6220550482E-03 1.7681918873E-03 8.2838725806E-03 3.9995478034E-03 7.1664435049E-03 6.0000000000E-03 -9.8184698219E-13 "EM_FIELD2-Anti_O: Symp_Lie_PTC dSpin" ABS 1E-8 0.000093592 -0.000002833 -0.000053901 -0.000000000 "EM_FIELD2-Anti_O: Runge_Kutta dSpin" ABS 1E-8 0.000113937 0.000001371 -0.000069477 0.000000000 "EM_FIELD2-Anti_O: Time_Runge_Kutta dSpin" ABS 1E-8 0.000113939 0.000001371 -0.000069478 0.000000000 @@ -1561,13 +1584,23 @@ "SOL_QUAD2-Anti_O: Symp_Lie_PTC" ABS 2e-14 3.7653707000E-02 6.0867641948E-03 -7.7715736970E-03 2.2326974142E-02 8.5470560669E-03 6.0000000000E-03 2.8384412876E-15 "SOL_QUAD2-Anti_O: Symp_Lie_PTC-OD" ABS 1e-10 0.0000000000E+00 1.1275702594E-17 -2.6888213878E-17 0.0000000000E+00 -4.4235448637E-16 0.0000000000E+00 "SOL_QUAD2-Anti_O: Runge_Kutta" ABS 1e-13 3.7653704303E-02 6.0867634260E-03 -7.7715730177E-03 2.2326973756E-02 8.5470562146E-03 6.0000000000E-03 -1.0049574020E-12 -"SOL_QUAD2-Anti_O: Time_Runge_Kutta" ABS 1e-13 3.7653704291E-02 6.0867634231E-03 -7.7715730117E-03 2.2326973749E-02 8.5470562150E-03 6.0000000004E-03 -1.0048806405E-12 +"SOL_QUAD2-Anti_O: Time_Runge_Kutta" ABS 2e-13 3.7653704291E-02 6.0867634231E-03 -7.7715730117E-03 2.2326973749E-02 8.5470562150E-03 6.0000000004E-03 -1.0048806405E-12 "SOL_QUAD2-Anti_O: Symp_Lie_Bmad" ABS 2e-14 3.7728443543E-02 6.0713683142E-03 -7.7407834798E-03 2.2364343416E-02 8.5402895172E-03 6.0000000000E-03 9.6103680569E-16 "SOL_QUAD2-Anti_O: Bmad_Standard dSpin" ABS 1E-8 -0.770341466 -0.594696040 -0.009212513 0.000000000 "SOL_QUAD2-Anti_O: Symp_Lie_PTC dSpin" ABS 1E-8 -0.760000675 -0.568193712 0.010010053 0.000000000 "SOL_QUAD2-Anti_O: Runge_Kutta dSpin" ABS 1E-8 -0.770340341 -0.594701707 -0.009213683 0.000000000 "SOL_QUAD2-Anti_O: Time_Runge_Kutta dSpin" ABS 1E-8 -0.770340341 -0.594701707 -0.009213682 0.000000000 +"THICK_MULTIPOLE1-Anti_O: Bmad_Standard" ABS 2e-14 9.1638426462E-03 1.5729336151E-03 2.1269151573E-02 3.9985316225E-03 1.1959075903E-02 6.0000000000E-03 2.6255039809E-15 +"THICK_MULTIPOLE1-Anti_O: Symp_Lie_PTC" ABS 2e-14 9.1624791680E-03 1.5727170522E-03 2.1267666222E-02 3.9988308999E-03 1.1959084065E-02 6.0000000000E-03 -1.1622647289E-14 +"THICK_MULTIPOLE1-Anti_O: Symp_Lie_PTC-OD" ABS 1e-10 -3.9898639947E-17 0.0000000000E+00 -3.4694469520E-18 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 +"THICK_MULTIPOLE1-Anti_O: Runge_Kutta" ABS 1e-13 9.1629024491E-03 1.5727738552E-03 2.1268184627E-02 3.9987473258E-03 1.1959081458E-02 6.0000000000E-03 -3.2751579226E-15 +"THICK_MULTIPOLE1-Anti_O: Time_Runge_Kutta" ABS 1e-13 9.1629024374E-03 1.5727738557E-03 2.1268184631E-02 3.9987473258E-03 1.1959081458E-02 6.0000000000E-03 -2.6411164922E-14 +"THICK_MULTIPOLE1-Anti_O: Bmad_Standard dSpin" ABS 1E-8 0.000213067 0.000000637 -0.000128412 0.000000000 +"THICK_MULTIPOLE1-Anti_O: Symp_Lie_PTC dSpin" ABS 1E-8 0.000212840 0.000000572 -0.000128223 0.000000000 +"THICK_MULTIPOLE1-Anti_O: Runge_Kutta dSpin" ABS 1E-8 0.000212812 0.000000613 -0.000128240 0.000000000 +"THICK_MULTIPOLE1-Anti_O: Time_Runge_Kutta dSpi" ABS 1E-8 0.000212812 0.000000613 -0.000128240 0.000000000 + "TAYLOR1-Anti_O: Symp_Lie_PTC" ABS 2e-14 8.9974028112E-03 2.2760823735E-03 2.8346981097E-03 3.9980996224E-03 4.8641435695E-03 6.0478434012E-03 -2.3398980236E-15 "TAYLOR1-Anti_O: Symp_Lie_PTC-OD" ABS 1e-10 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 "TAYLOR1-Anti_O: Symp_Lie_PTC dSpin" ABS 1E-8 0.365100671 -0.319463086 -0.726174495 0.000000000 @@ -1595,7 +1628,7 @@ "WIGGLER_FLAT1-Anti_O: Symp_Lie_PTC" ABS 2e-14 -1.5714240268E-02 -3.5606420322E-02 8.1279477398E-03 6.3133316876E-03 6.2281523755E-03 6.0000000000E-03 -1.8273143415E-15 "WIGGLER_FLAT1-Anti_O: Symp_Lie_PTC-OD" ABS 1e-10 -6.9388939039E-18 -6.9388939039E-18 3.4694469520E-18 6.9388939039E-18 1.7347234760E-18 0.0000000000E+00 "WIGGLER_FLAT1-Anti_O: Runge_Kutta" ABS 2e-13 2.9891920669E-03 2.0004284531E-03 6.9749698857E-03 3.9957298000E-03 6.5464681994E-03 6.0000000000E-03 -1.0045631861E-12 -"WIGGLER_FLAT1-Anti_O: Time_Runge_Kutta" ABS 2e-13 2.9891920704E-03 2.0004284526E-03 6.9749698860E-03 3.9957297999E-03 6.5464681994E-03 6.0000000000E-03 -9.7719814011E-13 +"WIGGLER_FLAT1-Anti_O: Time_Runge_Kutta" ABS 4e-13 2.9891920704E-03 2.0004284526E-03 6.9749698860E-03 3.9957297999E-03 6.5464681994E-03 6.0000000000E-03 -9.7719814011E-13 "WIGGLER_FLAT1-Anti_O: Symp_Lie_Bmad" ABS 2e-14 -1.5702675280E-02 -3.5606390498E-02 8.1255250163E-03 6.3133115623E-03 6.2284707118E-03 6.0000000000E-03 3.1203338524E-16 "WIGGLER_FLAT1-Anti_O: Bmad_Standard dSpin" ABS 1E-8 0.000070732 -0.000051002 -0.000001645 0.000000000 "WIGGLER_FLAT1-Anti_O: Symp_Lie_PTC dSpin" ABS 1E-8 0.018214682 0.001814793 -0.012881649 -0.000000000 @@ -1720,18 +1753,18 @@ "ELSEPARATOR2-Anti_OD: Runge_Kutta dSpin" ABS 1E-8 -0.000144600 0.001416424 -0.001049508 0.000000000 "ELSEPARATOR2-Anti_OD: Time_Runge_Kutta dSpin" ABS 1E-8 -0.000144600 0.001416424 -0.001049508 -0.000000000 -"EM_FIELD1-Anti_OD: Symp_Lie_PTC" ABS 2E-9 3.6230985240E-03 1.7670112177E-03 8.8483166548E-03 4.0000821892E-03 9.3205421894E-03 6.0000000000E-03 2.8043577993E+00 +"EM_FIELD1-Anti_OD: Symp_Lie_PTC" ABS 4E-9 3.6230985240E-03 1.7670112177E-03 8.8483166548E-03 4.0000821892E-03 9.3205421894E-03 6.0000000000E-03 2.8043577993E+00 "EM_FIELD1-Anti_OD: Symp_Lie_PTC-OD" ABS 1e-10 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 -"EM_FIELD1-Anti_OD: Runge_Kutta" ABS 2E-9 3.6220394523E-03 1.7682490958E-03 8.8487125006E-03 3.9994226786E-03 -2.7971936015E+00 6.0000000000E-03 9.8143715377E-13 -"EM_FIELD1-Anti_OD: Time_Runge_Kutta" ABS 2E-9 3.6220402316E-03 1.7682495307E-03 8.8487121865E-03 3.9994223745E-03 -2.7971936015E+00 6.0000000000E-03 1.0311751453E-12 +"EM_FIELD1-Anti_OD: Runge_Kutta" ABS 4E-9 3.6220394523E-03 1.7682490958E-03 8.8487125006E-03 3.9994226786E-03 -2.7971936015E+00 6.0000000000E-03 9.8143715377E-13 +"EM_FIELD1-Anti_OD: Time_Runge_Kutta" ABS 4E-9 3.6220402316E-03 1.7682495307E-03 8.8487121865E-03 3.9994223745E-03 -2.7971936015E+00 6.0000000000E-03 1.0311751453E-12 "EM_FIELD1-Anti_OD: Symp_Lie_PTC dSpin" ABS 1E-8 -0.000114010 -0.000001375 0.000069488 0.000000000 "EM_FIELD1-Anti_OD: Runge_Kutta dSpin" ABS 1E-8 -0.000117762 0.000001444 0.000069483 0.000000000 "EM_FIELD1-Anti_OD: Time_Runge_Kutta dSpin" ABS 1E-8 -0.000117761 0.000001444 0.000069483 0.000000000 -"EM_FIELD2-Anti_OD: Symp_Lie_PTC" ABS 2E-9 3.6289584091E-03 1.7585390672E-03 8.8455780636E-03 4.0035300880E-03 9.3111330530E-03 6.0000000000E-03 2.8043577993E+00 +"EM_FIELD2-Anti_OD: Symp_Lie_PTC" ABS 4E-9 3.6289584091E-03 1.7585390672E-03 8.8455780636E-03 4.0035300880E-03 9.3111330530E-03 6.0000000000E-03 2.8043577993E+00 "EM_FIELD2-Anti_OD: Symp_Lie_PTC-OD" ABS 1e-10 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 -"EM_FIELD2-Anti_OD: Runge_Kutta" ABS 2E-9 3.6220394523E-03 1.7682490958E-03 8.8487125006E-03 3.9994226786E-03 -2.7971936015E+00 6.0000000000E-03 9.8143715377E-13 -"EM_FIELD2-Anti_OD: Time_Runge_Kutta" ABS 2E-9 3.6220402316E-03 1.7682495307E-03 8.8487121865E-03 3.9994223745E-03 -2.7971936015E+00 6.0000000000E-03 1.0311751453E-12 +"EM_FIELD2-Anti_OD: Runge_Kutta" ABS 4E-9 3.6220394523E-03 1.7682490958E-03 8.8487125006E-03 3.9994226786E-03 -2.7971936015E+00 6.0000000000E-03 9.8143715377E-13 +"EM_FIELD2-Anti_OD: Time_Runge_Kutta" ABS 4E-9 3.6220402316E-03 1.7682495307E-03 8.8487121865E-03 3.9994223745E-03 -2.7971936015E+00 6.0000000000E-03 1.0311751453E-12 "EM_FIELD2-Anti_OD: Symp_Lie_PTC dSpin" ABS 1E-8 -0.000117250 -0.000000424 0.000070670 0.000000000 "EM_FIELD2-Anti_OD: Runge_Kutta dSpin" ABS 1E-8 -0.000117762 0.000001444 0.000069483 0.000000000 "EM_FIELD2-Anti_OD: Time_Runge_Kutta dSpin" ABS 1E-8 -0.000117761 0.000001444 0.000069483 0.000000000 @@ -2058,6 +2091,16 @@ "SOL_QUAD2-Anti_OD: Runge_Kutta dSpin" ABS 1E-8 -0.342705599 -0.906914459 -0.008864618 0.000000000 "SOL_QUAD2-Anti_OD: Time_Runge_Kutta dSpin" ABS 1E-8 -0.342705599 -0.906914459 -0.008864618 0.000000000 +"THICK_MULTIPOLE1-Anti_OD: Bmad_Standard" ABS 2e-14 9.1638426462E-03 1.5729336151E-03 2.1269151573E-02 3.9985316225E-03 -9.0020481361E+00 6.0000000000E-03 5.3290705182E-15 +"THICK_MULTIPOLE1-Anti_OD: Symp_Lie_PTC" ABS 2e-14 9.1624791680E-03 1.5727170522E-03 2.1267666222E-02 3.9988308999E-03 1.1959084065E-02 6.0000000000E-03 9.0140072120E+00 +"THICK_MULTIPOLE1-Anti_OD: Symp_Lie_PTC-OD" ABS 1e-10 -5.2041704279E-18 -4.3368086899E-19 0.0000000000E+00 -8.6736173799E-19 0.0000000000E+00 0.0000000000E+00 +"THICK_MULTIPOLE1-Anti_OD: Runge_Kutta" ABS 1e-13 9.1629024491E-03 1.5727738552E-03 2.1268184627E-02 3.9987473258E-03 -9.0020481306E+00 6.0000000000E-03 -3.5527136788E-15 +"THICK_MULTIPOLE1-Anti_OD: Time_Runge_Kutta" ABS 1e-13 9.1629024374E-03 1.5727738557E-03 2.1268184631E-02 3.9987473258E-03 -9.0020481306E+00 6.0000000000E-03 -2.6645352591E-14 +"THICK_MULTIPOLE1-Anti_OD: Bmad_Standard dSpin" ABS 1E-8 -0.000213093 -0.000000659 0.000128321 0.000000000 +"THICK_MULTIPOLE1-Anti_OD: Symp_Lie_PTC dSpin" ABS 1E-8 -0.000212866 -0.000000593 0.000128133 0.000000000 +"THICK_MULTIPOLE1-Anti_OD: Runge_Kutta dSpin" ABS 1E-8 -0.000212838 -0.000000635 0.000128149 0.000000000 +"THICK_MULTIPOLE1-Anti_OD: Time_Runge_Kutta dSp" ABS 1E-8 -0.000212838 -0.000000635 0.000128149 0.000000000 + "TAYLOR1-Anti_OD: Symp_Lie_PTC" ABS 2e-14 8.9974028112E-03 2.2760823735E-03 2.8346981097E-03 3.9980996224E-03 4.8641435695E-03 6.0478434012E-03 1.0015686843E+00 "TAYLOR1-Anti_OD: Symp_Lie_PTC-OD" ABS 1e-10 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 "TAYLOR1-Anti_OD: Symp_Lie_PTC dSpin" ABS 1E-8 0.365100671 -0.319463086 -0.726174495 0.000000000 @@ -2085,7 +2128,7 @@ "WIGGLER_FLAT1-Anti_OD: Symp_Lie_PTC" ABS 2e-14 -1.5714597134E-02 -3.5606387890E-02 8.1273245658E-03 6.3120325361E-03 6.2281506539E-03 6.0000000000E-03 2.0031128681E+00 "WIGGLER_FLAT1-Anti_OD: Symp_Lie_PTC-OD" ABS 1e-10 0.0000000000E+00 0.0000000000E+00 1.7347234760E-18 1.7347234760E-18 0.0000000000E+00 0.0000000000E+00 "WIGGLER_FLAT1-Anti_OD: Runge_Kutta" ABS 2E-13 2.9887901947E-03 2.0004042343E-03 6.9748760779E-03 3.9959712111E-03 -1.9965663982E+00 6.0000000000E-03 9.6678220984E-13 -"WIGGLER_FLAT1-Anti_OD: Time_Runge_Kutta" ABS 1e-13 2.9887901974E-03 2.0004042346E-03 6.9748760781E-03 3.9959712112E-03 -1.9965663982E+00 6.0000000000E-03 9.4013685725E-13 +"WIGGLER_FLAT1-Anti_OD: Time_Runge_Kutta" ABS 2E-13 2.9887901974E-03 2.0004042346E-03 6.9748760781E-03 3.9959712112E-03 -1.9965663982E+00 6.0000000000E-03 9.4013685725E-13 "WIGGLER_FLAT1-Anti_OD: Symp_Lie_Bmad" ABS 2e-14 -1.5703257742E-02 -3.5606380373E-02 8.1256231300E-03 6.3120294792E-03 6.2284603438E-03 6.0000000000E-03 -7.1036926341E-16 "WIGGLER_FLAT1-Anti_OD: Bmad_Standard dSpin" ABS 1E-8 0.000040925 -0.000032606 0.000001527 0.000000000 "WIGGLER_FLAT1-Anti_OD: Symp_Lie_PTC dSpin" ABS 1E-8 -0.018676975 -0.001861674 0.012194522 0.000000000 diff --git a/regression_tests/tracking_method_test/tracking_method_test.bmad b/regression_tests/tracking_method_test/tracking_method_test.bmad index 4cd56cc508..70fe71d7ac 100644 --- a/regression_tests/tracking_method_test/tracking_method_test.bmad +++ b/regression_tests/tracking_method_test/tracking_method_test.bmad @@ -111,6 +111,7 @@ taylor1: taylor, l = 0.5, {s1: 0.6|}, {sx: 0.7|}, {sy: 0.8|}, {sz: 0.2 {6: 3.6954232986861E-07 | 13}, {6: 1.1765753082019E-06 | 23}, {6: 1.6057156163853E-05 | 33}, {6: 1.1766022575118E-06 | 14}, {6: 4.782914122933E-07 | 24}, {6: 0.0014203210587175 | 34}, {6: 1.504474955002 | 44}, {6: -5.3002411118529E-07 | 15}, {6: 3.2952059293287E-05 | 26}, {6: -4.6831132007123E-08 | 46} +thick_multipole1: thick_multipole, l = 4.5, a2 = 1, b3 = 20, x_offset = 0.02, tilt = 0.1 vkicker1: vkicker, l = 4.5, kick = 0.005, num_steps = 10, x_offset = 0.05, y_pitch = 0.001, tilt = 0.1 wiggler_map1: wiggler, l = 1.6, num_steps = 10, field_calc = fieldmap, cartesian_map = { term = {3e-4, 3, 4, 5, 0.002, 3e-4, 0.63, x}, term = {3e-4, 3, 4, 5, 0.002, 3e-4, 0.63, y}, @@ -127,7 +128,7 @@ l1: line = (ab_multipole1, ac_kicker1, ac_kicker2, ac_kicker3, beambeam1, crab_c match1, monitor1, multipole1, octupole1, patch1, quadrupole1, quadrupole2, quadrupole3, quadrupole4, quadrupole5, rcollimator1, rfcavity1, rfcavity2, rfcavity3, sad_mult1, sad_mult2, sbend1, rbend2, sbend3, rbend4, sbend5, rbend6, sbend7, sextupole1, solenoid1, solenoid2, sol_quad1, sol_quad2, - taylor1, vkicker1, wiggler_map1, wiggler_flat1, wiggler_heli1, lcavity1, lcavity2, lcavity3) + thick_multipole1, taylor1, vkicker1, wiggler_map1, wiggler_flat1, wiggler_heli1, lcavity1, lcavity2, lcavity3) l1[e_tot] = 1e6 l1[geometry] = open l1[beta_a] = 10 diff --git a/tao/version/tao_version_mod.f90 b/tao/version/tao_version_mod.f90 index c14e50ebe1..dc420aa039 100644 --- a/tao/version/tao_version_mod.f90 +++ b/tao/version/tao_version_mod.f90 @@ -6,5 +6,5 @@ !- module tao_version_mod -character(*), parameter :: tao_version_date = "2023/10/29 18:44:34" +character(*), parameter :: tao_version_date = "2023/10/30 14:13:28" end module