!+ ! Subroutine init_custom (ele, err_flag) ! ! Dummy routine for initializing custom elements or elements that do custom ! calculations. Custom calculations are done if any one of the following ! ele_struct components is set to custom$: ! ele%tracking_method ! ele%mat6_calc_method ! ele%field_calc ! ele%aperture_type ! ! If called, this routine will do nothing. ! This routine needs to be replaced for custom initialization. ! ! Modules needed: ! use bmad ! ! Input: ! ele -- Ele_struct: Element to init. ! ! Output: ! ele -- Ele_struct: Initalized element. ! err_flag -- Logical: Set true if there is an error. False otherwise. !+ subroutine init_custom (ele, err_flag) use ptc_interface_mod, except_dummy => init_custom implicit none type (ele_struct), target :: ele logical err_flag ! If lattice has be read in from a digested file then the Taylor map ! already exists and does not have to be remade err_flag = .false. if (associated(ele%taylor(1)%term)) return call ele_to_taylor(ele, ele%branch%param) end subroutine