Skip to content

Commit

Permalink
Merge pull request #628 from bmad-sim/devel/53
Browse files Browse the repository at this point in the history
Fix show var command with particle_start slave.
  • Loading branch information
DavidSagan authored Nov 9, 2023
2 parents 8b91468 + 055742e commit 4be387f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tao/code/tao_show_this.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6006,9 +6006,15 @@ subroutine tao_show_this (what, result_id, lines, nl)
n = nl + 3*size(v_ptr%slave) + 100
if (size(lines) < n) call re_allocate(lines, n)
do i = 1, size(v_ptr%slave)
ele => s%u(v_ptr%slave(i)%ix_uni)%model%lat%branch(v_ptr%slave(i)%ix_branch)%ele(v_ptr%slave(i)%ix_ele)
nl=nl+1; write(lines(nl), '(2(a, i0), 2a)') '%slave(', i, '): Slave Element: ', &
if (v_ptr%slave(i)%ix_ele < 0) then ! Happens for particle_start
nl=nl+1; write(lines(nl), '(2(a, i0), 2a)') '%slave(', i, '): Slave Element: ', &
v_ptr%slave(i)%ix_uni, '@', 'PARTICLE_START'
else
ele => s%u(v_ptr%slave(i)%ix_uni)%model%lat%branch(v_ptr%slave(i)%ix_branch)%ele(v_ptr%slave(i)%ix_ele)
nl=nl+1; write(lines(nl), '(2(a, i0), 2a)') '%slave(', i, '): Slave Element: ', &
v_ptr%slave(i)%ix_uni, '@', ele_full_name(ele)
endif

if (associated (v_ptr%slave(i)%model_value)) then
nl=nl+1; write(lines(nl), irmt) '%slave(', i, ')%Model_value: ', &
v_ptr%slave(i)%model_value
Expand Down

0 comments on commit 4be387f

Please sign in to comment.