/********************************************************** This software is part of J.-S. Caux's ABACUS library. Copyright (c) J.-S. Caux. ----------------------------------------------------------- File: LiebLin_TBA_fixed_nbar_ebar.cc Purpose: solves the TBA equations for Lieb-Liniger ***********************************************************/ #include "ABACUS.h" using namespace std; using namespace ABACUS; int main(int argc, const char* argv[]) { if (argc != 7) ABACUSerror("Wrong number of arguments. Use c(best to set to 1), " "nbar, ebar, req_diff, Max_Secs, bool Save_data (0 == false)."); DP c_int = atof(argv[1]); DP nbar = atof(argv[2]); DP ebar = atof(argv[3]); DP req_diff = atof(argv[4]); int Max_Secs = atoi(argv[5]); bool Save_data = bool(atoi(argv[6])); if (c_int <= 0.0) ABACUSerror("Give a strictly positive c."); if (Max_Secs < 10) ABACUSerror("Give more time."); LiebLin_TBA_Solution solution = LiebLin_TBA_Solution_fixed_nbar_ebar(c_int, nbar, ebar, req_diff, Max_Secs); cout << solution.nbar << "\t" << solution.ebar << "\t" << solution.sbar << "\t"; return(0); }