You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

LiebLin_TBA.cc 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /**********************************************************
  2. This software is part of J.-S. Caux's ABACUS library.
  3. Copyright (c) J.-S. Caux.
  4. -----------------------------------------------------------
  5. File: LiebLin_TBA.cc
  6. Purpose: solves the TBA equations for Lieb-Liniger
  7. ***********************************************************/
  8. #include "ABACUS.h"
  9. using namespace std;
  10. using namespace ABACUS;
  11. int main(int argc, const char* argv[])
  12. {
  13. //if (argc != 7) ABACUSerror("Wrong number of arguments to 2CBG_ThLim executable. Use c(best to set to 1), nbar, ebar, req_diff, Max_Secs, bool Save_data (0 == false).");
  14. if (argc != 6) ABACUSerror("Wrong number of arguments. Use c(best to set to 1), mu, kBT, req_diff, Max_Secs");
  15. DP c_int = atof(argv[1]);
  16. DP mu = atof(argv[2]);
  17. DP kBT = atof(argv[3]);
  18. DP req_diff = atof(argv[4]);
  19. int Max_Secs = atoi(argv[5]);
  20. if (c_int <= 0.0) ABACUSerror("Give a strictly positive c.");
  21. if (kBT <= 0.0) ABACUSerror("Negative T ? Not for the LiebLin gas.");
  22. if (Max_Secs < 10) ABACUSerror("Give more time.");
  23. //cout << "Read c_int = " << c_int << "\tmu = " << mu << "\tOmega = " << Omega << "\tkBT = " << kBT << "\tMax_Secs = " << Max_Secs << endl;
  24. LiebLin_TBA_Solution solution(c_int, mu, kBT, req_diff, Max_Secs);
  25. cout << solution.nbar << "\t" << solution.ebar << "\t" << solution.sbar << "\t";
  26. return(0);
  27. }