From 42e1ac4bbf3fe03bd8996741cb5fef6c83b916c5 Mon Sep 17 00:00:00 2001 From: David Sagan Date: Thu, 11 Jan 2024 17:43:46 -0500 Subject: [PATCH] Correct ltt_init_tracking logic for when beam init is needed. --- bmad/doc/cover-page.tex | 2 +- bmad/doc/elements.tex | 3 ++- bsim/modules/lt_tracking_mod.f90 | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bmad/doc/cover-page.tex b/bmad/doc/cover-page.tex index beab47993c..e7da9cf53c 100644 --- a/bmad/doc/cover-page.tex +++ b/bmad/doc/cover-page.tex @@ -3,7 +3,7 @@ \begin{flushright} \large - Revision: January 10, 2023 \\ + Revision: January 11, 2023 \\ \end{flushright} \pdfbookmark[0]{Preamble}{Preamble} diff --git a/bmad/doc/elements.tex b/bmad/doc/elements.tex index 9848f15be5..c557936e9a 100644 --- a/bmad/doc/elements.tex +++ b/bmad/doc/elements.tex @@ -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 diff --git a/bsim/modules/lt_tracking_mod.f90 b/bsim/modules/lt_tracking_mod.f90 index 584c324603..f0e877c633 100644 --- a/bsim/modules/lt_tracking_mod.f90 +++ b/bsim/modules/lt_tracking_mod.f90 @@ -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