ABACUS/src/EXECS/LiebLin_TBA_fixed_nbar.cc

45 righe
1.4 KiB
C++
Executable File

/**********************************************************
This software is part of J.-S. Caux's ABACUS library.
Copyright (c).
-----------------------------------------------------------
File: LiebLin_TBA_fixed_nbar.cc
Purpose: solves the TBA equations for Lieb-Liniger
***********************************************************/
#include "JSC.h"
using namespace std;
using namespace JSC;
int main(int argc, const char* argv[])
{
//if (argc != 7) JSCerror("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).");
if (argc != 6) JSCerror("Wrong number of arguments. Use c(best to set to 1), nbar, kBT, req_diff, Max_Secs");
DP c_int = atof(argv[1]);
DP nbar = atof(argv[2]);
DP kBT = atof(argv[3]);
DP req_diff = atof(argv[4]);
int Max_Secs = atoi(argv[5]);
if (c_int <= 0.0) JSCerror("Give a strictly positive c.");
if (kBT <= 0.0) JSCerror("Negative T ? Not for the LiebLin gas.");
if (Max_Secs < 10) JSCerror("Give more time.");
//cout << "Read c_int = " << c_int << "\tmu = " << mu << "\tOmega = " << Omega << "\tkBT = " << kBT << "\tMax_Secs = " << Max_Secs << endl;
LiebLin_TBA_Solution solution = LiebLin_TBA_Solution_fixed_nbar (c_int, nbar, kBT, req_diff, Max_Secs);
cout << solution.nbar << "\t" << solution.ebar << "\t" << solution.sbar << "\t";
return(0);
}