#include "cpp_bmad_classes.h" #ifndef erl_doocs_bmad_interface_h #define erl_doocs_bmad_interface_h extern "C" void bmad_auto_scale_amp_(const int& ix_lat, const int& ix_ele, const double& KE_start, const double& dE, bool& c_err); extern "C" void bmad_auto_scale_phase_(const int& ix_lat, bool& c_err); extern "C" void bmad_calc_bunch_params_(const CPP_bunch& bunch, const CPP_bunch_params& bunch_params, bool& c_err); extern "C" void bmad_calc_transfer_matrix_(const int& ix_lat, const double& s1, const double& s2, double* vec0, double* mat6_vec, bool& c_err); extern "C" void bmad_clone_lat_(const int& ix_lat_in, const int& ix_lat_clone, bool& c_err); extern "C" void bmad_create_init_global_(const int& n_lats, const int& n_twiss_threads); extern "C" void bmad_create_init_lat_(const int& ix_lat, const int& n_ele, const double& s_start, const double& lat_len, const double& start_KE, bool& c_err); extern "C" void bmad_create_element_(const int& ix_lat, const CPP_ele& c_ele, const int& has_twiss, const char* file_name, bool& c_err); extern "C" void bmad_create_bend_(const int& ix_lat, const CPP_ele& c_ele, bool& c_err); extern "C" void bmad_create_finalize_(const int& ix_lat, bool& c_err); extern "C" int bmad_element_index_(const int& ix_lat, const char* ele_name); extern "C" int bmad_init_coord_(const int& ix_lat, const int& ix_ele, const CPP_coord& coord); extern "C" void bmad_lattice_bookkeeper_(const int& ix_lat, bool& c_err); extern "C" void bmad_modify_element_attribute_(const int& ix_lat, const int& ix_ele, const int& ix_attrib, const double& attrib_value); extern "C" void bmad_remove_lat_(const int& ix_lat); extern "C" void bmad_remove_element_(const int& ix_lat, const int& ix_ele, bool& c_err); extern "C" void bmad_return_twiss_and_track_(const int& ix_lat, const int& ix_save, const double& s_pos, CPP_twiss& a_twiss, CPP_twiss& b_twiss, double* orbit, double& E_tot, bool& c_err); extern "C" void bmad_return_element_(const int& ix_lat, const int& ix_ele, CPP_ele& ele, bool& c_err); extern "C" void bmad_return_element_at_s_(const int& ix_lat, const double& s, CPP_ele& ele, bool& c_err); extern "C" void bmad_return_field_grid_length_(const int& ix_lat, const int& ix_ele, double* length); extern "C" void bmad_return_lat_info_(const int& ix_lat, int& n_ele_track, bool& c_err); extern "C" void bmad_scale_cavities (const int& ix_lat); extern "C" void bmad_scale_cavity_phase_and_amp_(const int& ix_lat, const int& ix_ele, const double& e_gain, const double& phi0, const double& pc_start, double& dphi0_ref, double& field_scale); extern "C" void bmad_set_or_get_auto_scale_(const int& ix_lat, const int& ix_ele, const int& set_field, double& field, const int& set_phase, double& phase, bool& c_err); extern "C" void bmad_set_or_get_csr_params_(const int& set_csr_params, CPP_csr_parameter& csr_params); extern "C" void bmad_set_or_get_bmad_com_(const int& set_bmad_com, CPP_bmad_common& bmad_common); extern "C" void bmad_set_twiss_at_beginning_(const int& ix_lat, const double& s_pos, const CPP_twiss& twiss_a, const CPP_twiss& twiss_b); extern "C" void bmad_test_(const CPP_ele& c_ele, const int& has_twiss, const char* file_name, bool& c_err); extern "C" void bmad_track_bunch_from_s_to_s_(const int& ix_lat, const double& s_start, const double& s_end, const CPP_bunch& bunch_start, const CPP_bunch& bunch_end, bool& c_err); extern "C" void bmad_track1_bunch_(const int& ix_lat, const int& ix_ele, const CPP_bunch& bunch_start, const CPP_bunch& bunch_end, bool& c_err); extern "C" void bmad_write_lattice_to_file_(const int& ix_lat, const char* file_name, const int& n_char_name); extern "C" void save_bunch_track_(Opaque_bunch_class* bunch, Opaque_ele_class ele, double& s_travel); #endif