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.

Heis_DSF.cc 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /**********************************************************
  2. This software is part of J.-S. Caux's ABACUS library.
  3. Copyright (c) J.-S. Caux
  4. -----------------------------------------------------------
  5. File: Heis_DSF.cc
  6. Purpose: main function for ABACUS for 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 != 8) { // provide some info
  14. cout << endl << "Welcome to ABACUS\t(copyright J.-S. Caux)." << endl;
  15. cout << endl << "Usage of Heis_DSF executable: " << endl;
  16. cout << endl << "Provide the following arguments:" << endl << endl;
  17. cout << "char whichDSF \t\t Which structure factor should be calculated ? "
  18. "Options are: 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: "
  21. "use positive even integer values only" << endl;
  22. cout << "int M \t\t\t Number of down spins: use positive integer values between 1 and N/2" << 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 a earlier calculations ? (0 == false, 1 == true)" << endl;
  26. cout << endl << "EXAMPLE: " << endl << endl;
  27. cout << "Heis_DSF z 1.0 100 40 0 100 600 1.0 0" << endl << endl;
  28. }
  29. else if (argc == 8) { // !fixed_iK
  30. int ctr = 1;
  31. char whichDSF = *argv[ctr++];
  32. DP Delta = atof(argv[ctr++]);
  33. int N = atoi(argv[ctr++]);
  34. int M = atoi(argv[ctr++]);
  35. int Max_Secs = atoi(argv[ctr++]);
  36. DP target_sumrule = atof(argv[ctr++]);
  37. bool refine = (atoi(argv[ctr++]) == 1);
  38. // We systematically scan over all momentum integers (to avoid problems with Brillouin folding
  39. int iKmin = -1000*N;
  40. int iKmax = 1000*N;
  41. Scan_Heis (whichDSF, Delta, N, M, iKmin, iKmax, Max_Secs, target_sumrule, refine);
  42. }
  43. return(0);
  44. }