ABACUS/src/EXECS/LiebLin_TBA_fixed_nbar.cc

40 lines
1.1 KiB
C++
Executable File

/**********************************************************
This software is part of J.-S. Caux's ABACUS library.
Copyright (c) J.-S. Caux.
-----------------------------------------------------------
File: LiebLin_TBA_fixed_nbar.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), 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) 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 = 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);
}