Skip to content

Commit

Permalink
Merge pull request #1111 from jsberg-bnl/restore-exact
Browse files Browse the repository at this point in the history
Ensure that exact_model is set before zero_key is called
  • Loading branch information
rdemaria committed Aug 15, 2022
2 parents 7f0cb52 + a547097 commit 9829fb8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/madx_ptc_module.f90
Expand Up @@ -564,6 +564,14 @@ subroutine ptc_input()

ord_max = -1

exact1=node_value("exact ")

if(exact1.eq.0.or.exact1.eq.1) then
EXACT_MODEL = exact1 .ne. 0
else
EXACT_MODEL = exact0
endif

call zero_key(key)

!j=j+1
Expand Down Expand Up @@ -617,14 +625,6 @@ subroutine ptc_input()
metd = method0
endif

exact1=node_value("exact ")

if(exact1.eq.0.or.exact1.eq.1) then
EXACT_MODEL = exact1 .ne. 0
else
EXACT_MODEL = exact0
endif

!special node keys
key%list%permfringe=node_value("fringe ") ! transfer(node_value("fringe ") .ne. zero, key%list%permfringe)
key%list%bend_fringe=node_value("bend_fringe ") .ne. zero
Expand Down

0 comments on commit 9829fb8

Please sign in to comment.