Skip to content

Commit

Permalink
Devel/197 (#1009)
Browse files Browse the repository at this point in the history
* Blank string now no longer an error with Tao "set beam dump_at" command.
  • Loading branch information
DavidSagan committed Jun 20, 2024
1 parent 459946f commit 4ba9269
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions tao/code/tao_locate_elements.f90
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ subroutine tao_locate_elements (ele_list, ix_universe, eles, err, lat_type, igno
call re_allocate_eles (eles, 0, exact = .true.)

call str_upcase (ele_name, ele_list)
ele_name = unquote(ele_name)
call string_trim (ele_name, ele_name, ix)

if (ix == 0 .and. logic_option(.false., ignore_blank)) then
Expand Down
4 changes: 2 additions & 2 deletions tao/code/tao_set_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ subroutine tao_set_beam_cmd (who, value_str, branch_str)
u%beam%dump_file = value_str

case ('dump_at', 'beam_dump_at')
call tao_locate_elements (value_str, u%ix_uni, eles, err)
call tao_locate_elements (value_str, u%ix_uni, eles, err, ignore_blank = .true.)
if (err) then
call out_io (s_error$, r_name, 'BAD DUMP_AT STRING: ' // value_str)
return
Expand All @@ -1065,7 +1065,7 @@ subroutine tao_set_beam_cmd (who, value_str, branch_str)
enddo

case ('saved_at', 'beam_saved_at')
call tao_locate_elements (value_str, u%ix_uni, eles, err)
call tao_locate_elements (value_str, u%ix_uni, eles, err, ignore_blank = .true.)
if (err) then
call out_io (s_error$, r_name, 'BAD SAVED_AT STRING: ' // value_str)
return
Expand Down

0 comments on commit 4ba9269

Please sign in to comment.