!........................................................................ ! ! Subroutine : ! ! Description: ! ! Arguments : ! ! Mod/Commons: ! ! Calls : ! ! Author : ! ! Modified : ! !........................................................................ ! ! ! $Log$ ! Revision 1.5 2007/01/30 16:15:13 dcs ! merged with branch_bmad_1. ! ! Revision 1.2 2003/04/30 17:14:51 cesrulib ! dlr's changes since last import ! ! Revision 1.1.1.1 2002/12/13 19:23:28 cesrulib ! import bmadz ! ! !........................................................................ ! subroutine identify_quads(lat,quad) ! identify quads use bmad use zquad_lens_mod implicit none type (lat_struct) lat type (zquad_struct) quad integer n,i,iquad iquad=0 do i=1,lat%n_ele_track lat%ele(i)%ix_pointer = 0 if(lat%ele(i)%key == quadrupole$ .or. & lat%ele(i)%key == sol_quad$ .or. & (lat%ele(i)%key == sbend$ .and. lat%ele(i)%value(k1$) /= 0) .or. & lat%ele(i)%key == wiggler$)then iquad=iquad+1 quad%lens(iquad)%ix=i lat%ele(i)%ix_pointer = iquad if(lat%ele(i)%key /= wiggler$)then lat%ele(i)%type = 'IR' if(lat%ele(i)%s > lat%param%total_length/12. .and. & lat%ele(i)%s < 11./12.*lat%param%total_length) & lat%ele(i)%type='ARC' ! if(lat%ele(i)%s < lat%param%total_length - 9 .and. & ! lat%ele(i)%s > lat%param%total_length/2+9) & ! lat%ele(i)%type='ARC' endif endif end do quad%n = iquad return end