!+ ! Subroutine bmad_remove_lat (ix_lat) ! ! First creation routine to call when constructing a lattice from ! the Doocs database. ! ! Input: ! ix_lat -- Integer: Index of lattice to remove. !- subroutine bmad_remove_lat (ix_lat) use bmad_common_mod implicit none type (lat_struct), pointer :: lat integer ix_lat character(24), parameter :: r_name = 'bmad_remove_lat' ! Lattice remove if (lat_status(ix_lat) == bad$) then call out_io (s_error$, r_name, 'Lattice \i0\ does not exist!', ix_lat) return endif bd_com(ix_lat)%status = no_init$ lat => bd_com(ix_lat)%lat lat%n_ele_track = 0 lat%n_ele_max = 0 end subroutine