You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

LiebLin_DSF.cc 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /**********************************************************
  2. This software is part of J.-S. Caux's ABACUS library.
  3. Copyright (c) J.-S. Caux.
  4. -----------------------------------------------------------
  5. File: LiebLin_DSF.cc
  6. Purpose: main function for ABACUS for LiebLin gas
  7. ***********************************************************/
  8. #include "ABACUS.h"
  9. using namespace std;
  10. using namespace ABACUS;
  11. int main(int argc, char* argv[])
  12. {
  13. if (argc != 11) { // provide some info
  14. cout << endl << "Welcome to ABACUS\t(copyright J.-S. Caux)." << endl;
  15. cout << endl << "Usage of LiebLin_DSF_Tgt0 executable: " << endl;
  16. cout << endl << "Provide the following arguments:" << endl << endl;
  17. cout << "char whichDSF \t\t Which structure factor should be calculated ? Options are: d for rho rho, g for psi psi{dagger}, o for psi{dagger} psi" << endl;
  18. cout << "DP c_int \t\t Value of the interaction parameter: use positive real values only" << endl;
  19. cout << "DP L \t\t\t Length of the system: use positive real values only" << endl;
  20. cout << "int N \t\t\t Number of particles: use positive integer values only" << endl;
  21. cout << "int iKmin" << endl << "int iKmax \t\t Min and max momentum integers to scan over: recommended values: -2*N and 2*N" << endl;
  22. cout << "DP kBT \t\t Temperature (positive only of course)" << endl;
  23. cout << "int Max_Secs \t\t Allowed computational time: (in seconds)" << endl;
  24. cout << "DP target_sumrule \t sumrule saturation you're satisfied with" << endl;
  25. cout << "bool refine \t\t Is this a refinement of earlier calculations ? (0 == false, 1 == true)" << endl;
  26. cout << endl << "EXAMPLE: " << endl << endl;
  27. cout << "LiebLin_DSF d 1.0 100.0 100 0 200 0.56 600 1.0 0" << endl << endl;
  28. }
  29. else { // (argc == 10), correct nr of arguments
  30. char whichDSF = *argv[1];
  31. DP c_int = atof(argv[2]);
  32. DP L = atof(argv[3]);
  33. int N = atoi(argv[4]);
  34. int iKmin = atoi(argv[5]);
  35. int iKmax = atoi(argv[6]);
  36. DP kBT = atof(argv[7]);
  37. int Max_Secs = atoi(argv[8]);
  38. DP target_sumrule = atof(argv[9]);
  39. bool refine = (atoi(argv[10]) == 1);
  40. //cout << "target_sumrule = " << target_sumrule << endl;
  41. //Scan_LiebLin (whichDSF, c_int, L, N, iKmin, iKmax, kBT, Max_Secs, target_sumrule, refine, 0, 1);
  42. Scan_LiebLin (whichDSF, c_int, L, N, iKmin, iKmax, kBT, Max_Secs, target_sumrule, refine);
  43. }
  44. return(0);
  45. }