ABACUS/src/EXECS/2CBG_ThLim.cc

44 lines
1.3 KiB
C++
Executable File

/**********************************************************
This software is part of J.-S. Caux's ABACUS library.
Copyright (c).
-----------------------------------------------------------
File: 2CBG_ThLim.cc
Purpose: solves the TBA equations for the 2-component Bose gas
***********************************************************/
#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), mu, Omega, kBT, TT(minutes), bool Save_data (0 == false).");
DP c_int = atof(argv[1]);
DP mu = atof(argv[2]);
DP Omega = atof(argv[3]);
DP kBT = atof(argv[4]);
int Max_Secs = 60 * atoi(argv[5]);
bool Save_data = bool(atoi(argv[6]));
if (c_int <= 0.0) JSCerror("Give a strictly positive c.");
if (Omega <= 0.0) JSCerror("Give a strictly positive Omega, otherwise the algorithm cannot converge.");
if (kBT <= 0.0) JSCerror("Negative T ? You must be a string theorist.");
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;
Solve_2CBG_TBAE_via_refinements (c_int, mu, Omega, kBT, Max_Secs, Save_data);
return(0);
}