ABACUS/src/EXECS/LiebLin_TBA.cc

40 lines
1.0 KiB
C++
Executable File

/**********************************************************
This software is part of J.-S. Caux's ABACUS library.
Copyright (c) J.-S. Caux.
-----------------------------------------------------------
File: LiebLin_TBA.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 != 6) ABACUSerror("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) ABACUSerror("Give a strictly positive c.");
if (kBT <= 0.0) ABACUSerror("Negative T ? Not for the LiebLin gas.");
if (Max_Secs < 10) ABACUSerror("Give more time.");
LiebLin_TBA_Solution solution(c_int, mu, kBT, req_diff, Max_Secs);
cout << solution.nbar << "\t" << solution.ebar << "\t" << solution.sbar << "\t";
return(0);
}