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_fixed_nbar.cc 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**********************************************************
  2. This software is part of J.-S. Caux's ABACUS library.
  3. Copyright (c) J.-S. Caux.
  4. -----------------------------------------------------------
  5. File: LiebLin_TBA_fixed_nbar.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 != 6) ABACUSerror("Wrong number of arguments. Use c(best to set to 1), nbar, kBT, req_diff, Max_Secs");
  14. DP c_int = atof(argv[1]);
  15. DP nbar = atof(argv[2]);
  16. DP kBT = atof(argv[3]);
  17. DP req_diff = atof(argv[4]);
  18. int Max_Secs = atoi(argv[5]);
  19. if (c_int <= 0.0) ABACUSerror("Give a strictly positive c.");
  20. if (kBT <= 0.0) ABACUSerror("Negative T ? Not for the LiebLin gas.");
  21. if (Max_Secs < 10) ABACUSerror("Give more time.");
  22. LiebLin_TBA_Solution solution = LiebLin_TBA_Solution_fixed_nbar (c_int, nbar, kBT, req_diff, Max_Secs);
  23. cout << solution.nbar << "\t" << solution.ebar << "\t" << solution.sbar << "\t";
  24. return(0);
  25. }