ABACUS/src/EXECS/LiebLin_TBA.cc

46 行
1.3 KiB
C++
実行ファイル

/**********************************************************
This software is part of J.-S. Caux's ABACUS library.
Copyright (c).
-----------------------------------------------------------
File: LiebLin_TBA.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), mu, kBT, req_diff, Max_Secs");
DP c_int = atof(argv[1]);
DP mu = 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(c_int, mu, kBT, req_diff, Max_Secs);
cout << solution.nbar << "\t" << solution.ebar << "\t" << solution.sbar << "\t";
return(0);
}