Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various small code tweaks. #1035

Merged
merged 3 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions bmad/modules/complex_taylor_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ function complex_taylor_coef2 (complex_taylor, i1, i2, i3, &
! out_type -- character(*), optional: Determins the string to be used for the output type column.
! '' (default) -> '1', '2', '3', etc.
! 'PHASE' -> 'X', 'Px, 'Y', 'Py', 'Z', 'Pz'
! 'SPIN' -> 'S1', 'Sx', 'Sy', 'Sz' (quaternion representation)
! 'SPIN' -> 'S1', 'Sx', 'Sy', 'Sz' ! If size = 4: quaternion representation
! 'SPIN' -> 'Sx', 'Sy', 'Sz' ! If size = 3:
! 'NONE' -> No out column
! Anything else -> Use this for the output column.
! clean -- logical, optional: If True then do not include terms whose coefficients
Expand Down Expand Up @@ -352,7 +353,11 @@ subroutine type_complex_taylors (complex_taylor, max_order, lines, n_lines, file
case ('PHASE')
if (i <=6) out_str = ' ' // phase_out(i) // ':'
case ('SPIN')
if (i <=4) out_str = ' ' // spin_out(i) // ':'
if (nt == 4) then
out_str = ' ' // spin_out(i) // ':'
elseif (nt == 3) then
out_str = ' ' // spin_out(i+1) // ':'
endif
case default
out_str = o_type // ':'
end select
Expand Down
3 changes: 2 additions & 1 deletion tao/code/tao_show_this.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4539,7 +4539,8 @@ subroutine tao_show_this (what, result_id, lines, nl)
do i = 1, 3
ctaylor(i) = ptc_nf%isf%x(i)
enddo
call type_complex_taylors(ctaylor)

call type_complex_taylors(ctaylor, out_type = 'SPIN')
return
endif

Expand Down
8 changes: 6 additions & 2 deletions tao/doc/command-list.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3013,8 +3013,8 @@ \subsection{show spin}
Syntax:
\begin{example}
show spin \{-element \{<ref_ele_name>\} <ele_name>\} \{-flip_n_axis\} \{-g_map\}
\{-n_axis <nx>, <ny>, <nz>\} \{-l_axis <lx>, <ly>, <lz>\}
\{-ignore_kinetic <ele_list>\}
\{-ignore_kinetic <ele_list>\} \{-isf\}
\{-l_axis <lx>, <ly>, <lz>\} \{-n_axis <nx>, <ny>, <nz>\}
\{-x_zero <ele_list>\} \{-y_zero <ele_list>\} \{-z_zero <ele_list>\}
\end{example}

Expand Down Expand Up @@ -3063,6 +3063,10 @@ \subsection{show spin}

The \vn{-flip_n_axis} switch, if present, will flip the direction of the displayed $n$-axis.

The \vn{-isf} switch, if present, will print the invariant spin field which are three taylor series
for the three components of the spin $(S_x, S_y, S_z)$. The independent variables are the six orbital
phase space coordinates $(x, p_x, y, p_y, z, p_z)$.

The \vn{-x_zero}, \vn{-y_zero}, and \vn{-z_zero} options are for testing if supressing certain terms
in the linear part of the spin transport map for a set of elements selected by the user will
significantly affect the polarization. This is discussed in the section ``\vn{Linear dn/dpz
Expand Down
2 changes: 1 addition & 1 deletion tao/doc/cover-page.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

\begin{flushright}
\large
Revision: May 7, 2024 \\
Revision: June 28, 2024 \\
\end{flushright}

\vfill
Expand Down
Loading