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

Correct ltt_init_tracking logic for when beam init is needed. #731

Merged
merged 1 commit into from
Jan 11, 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
2 changes: 1 addition & 1 deletion bmad/doc/cover-page.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

\begin{flushright}
\large
Revision: January 10, 2023 \\
Revision: January 11, 2023 \\
\end{flushright}

\pdfbookmark[0]{Preamble}{Preamble}
Expand Down
3 changes: 2 additions & 1 deletion bmad/doc/elements.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2205,7 +2205,8 @@ \section{Foil}
t = t_0 (1 + x \, \frac{1}{t_0}\frac{dt}{dx})
\end{equation}
where $t_0$ is the thickness given by the \vn{thickness} parameter and $d(t/t_0)/dx$ is given by the
\vn{drel_thickness_dx} parameter.
\vn{drel_thickness_dx} parameter. To orient the wedge in the transverse plane, use the \vn{tilt} orientation
parameter (\sref{s:offset}).

If a \vn{foil} element is part of a lattice branch with a closed geometry, the closed orbit
calculation will tempararily set the \vn{scatter} parameter to false since scattering is a random
Expand Down
3 changes: 1 addition & 2 deletions bsim/modules/lt_tracking_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -596,8 +596,7 @@ subroutine ltt_init_tracking (lttp, ltt_com, beam)

! Beam setup

if (present(beam) .and. (lttp%simulation_mode == 'INDIVIDUAL' .or. lttp%simulation_mode == 'BEAM') .and. &
ltt_com%mpi_rank == master_rank$ .or. .not. ltt_com%using_mpi) then
if (present(beam) .and. (lttp%simulation_mode == 'INDIVIDUAL' .or. lttp%simulation_mode == 'BEAM')) then
call ltt_init_beam_distribution(lttp, ltt_com, beam)
endif

Expand Down