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.

ODSLF_DSF.cc 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /**********************************************************
  2. This software is part of J.-S. Caux's ABACUS library.
  3. Copyright (c) J.-S. Caux.
  4. -----------------------------------------------------------
  5. File: ODSLF_DSF.cc
  6. Purpose: main function for ABACUS for spinless fermions related to Heisenberg spin-1/2 chain
  7. ***********************************************************/
  8. #include "ABACUS.h"
  9. using namespace std;
  10. using namespace ABACUS;
  11. int main(int argc, char* argv[])
  12. {
  13. if (argc != 10) { // provide some info
  14. cout << endl << "Welcome to ABACUS\t(copyright J.-S. Caux)." << endl;
  15. cout << "Usage of ODSLF_DSF 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: "
  18. "m for S- S+, z for Sz Sz, p for S+ S-." << endl;
  19. cout << "DP Delta \t\t Value of the anisotropy: use positive real values only" << endl;
  20. cout << "int N \t\t\t Length (number of sites) of the system: use positive even integer values only" << endl;
  21. cout << "int M \t\t\t Number of down spins: use positive integer values between 1 and N/2" << endl;
  22. cout << "int iKmin" << endl << "int iKmax \t\t Min and max momentum integers to scan over: "
  23. "recommended values: 0 and N" << endl;
  24. cout << "int Max_Secs \t\t Allowed computational time: (in seconds)" << endl;
  25. cout << "DP target_sumrule \t sumrule saturation you're satisfied with" << endl;
  26. cout << "bool refine \t\t Is this a refinement of a earlier calculations ? (0 == false, 1 == true)" << endl;
  27. cout << endl << "EXAMPLE: " << endl << endl;
  28. cout << "ODSLF_DSF z 1.0 100 40 0 100 600 1.0 0" << endl << endl;
  29. }
  30. else if (argc == 10) { // !fixed_iK
  31. char whichDSF = *argv[1];
  32. DP Delta = atof(argv[2]);
  33. int N = atoi(argv[3]);
  34. int M = atoi(argv[4]);
  35. int iKmin = atoi(argv[5]);
  36. int iKmax = atoi(argv[6]);
  37. int Max_Secs = atoi(argv[7]);
  38. DP target_sumrule = atof(argv[8]);
  39. bool refine = (atoi(argv[9]) == 1);
  40. Scan_ODSLF (whichDSF, Delta, N, M, iKmin, iKmax, Max_Secs, target_sumrule, refine, 0, 1);
  41. }
  42. else ABACUSerror("Wrong number of arguments to ODSLF_DSF executable.");
  43. return(0);
  44. }