Skip to content

Commit

Permalink
Merge pull request #675 from bmad-sim/devel/65
Browse files Browse the repository at this point in the history
Fix adding var via python cmd.
  • Loading branch information
DavidSagan authored Dec 6, 2023
2 parents 2ea0cd2 + 2590d74 commit aead402
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Binary file modified bmad-doc/other_manuals/ibs_ring.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion bsim/ibs_ring/doc/ibs_ring.tex
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
\title{ibs_ring Simulation Program}
\author{Michael Ehrlichman, D. Sagan}
\date{October 21, 2022}
\date{December 5, 2023}
%---------------------------------------------------------------------------------
Expand Down
17 changes: 11 additions & 6 deletions tao/code/tao_init_variables_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -797,12 +797,17 @@ subroutine tao_pointer_to_var_in_lattice (var, ix_uni, ele, err)

! allocate space for var%slave.

ix_slave = size(var%slave) + 1
var_slave_saved = var%slave
deallocate (var%slave)
allocate (var%slave(ix_slave))
var%slave(1:ix_slave-1) = var_slave_saved
var_slave => var%slave(ix_slave)
if (allocated(var%slave)) then
ix_slave = size(var%slave) + 1
var_slave_saved = var%slave
deallocate (var%slave)
allocate (var%slave(ix_slave))
var%slave(1:ix_slave-1) = var_slave_saved
var_slave => var%slave(ix_slave)
else
allocate (var%slave(1))
var_slave => var%slave(1)
endif

! locate attribute

Expand Down

0 comments on commit aead402

Please sign in to comment.