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.

Smoothen_LiebLin_DSF_Scaled.cc 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /**********************************************************
  2. This software is part of J.-S. Caux's ABACUS library.
  3. Copyright (c) J.-S. Caux.
  4. -----------------------------------------------------------
  5. File: Smoothen_LiebLin_DSF_Scaled.cc
  6. Purpose: produces .dsfs and .ssf files from a .raw file
  7. ***********************************************************/
  8. #include "ABACUS.h"
  9. using namespace std;
  10. using namespace ABACUS;
  11. int main(int argc, char* argv[])
  12. {
  13. if (argc != 13) { // Print out instructions
  14. cout << endl << "Welcome to ABACUS\t(copyright J.-S. Caux)." << endl;
  15. cout << endl << "Usage of Smoothen_LiebLin_DSF_Scaled 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. "d for rho rho, g for psi psi{dagger}, o for psi{dagger} psi" << endl;
  19. cout << "DP c_int \t\t Value of the interaction parameter" << endl;
  20. cout << "DP L \t\t\t Length of the system" << endl;
  21. cout << "int N \t\t\t Number of particles" << endl;
  22. cout << "int iKmin" << endl << "int iKmax \t\t Min and max momentum integers" << endl;
  23. cout << "DP kBT \t\t Temperature" << endl;
  24. cout << "int DiK \t\t\t Window of iK over which DSF is averaged (DiK == 0 means a single iK is used; "
  25. "DiK == 1 means 3 are used (iK-1, iK, iK+1), etc.)" << endl;
  26. cout << "DP ommin" << endl << "DP ommax \t\t Min and max frequencies to cover in smoothened DSF" << endl;
  27. cout << "Nom \t\t\t Number of frequency points used for discretization" << endl;
  28. cout << "DP width \t\t Gaussian width used in smoothing, in units of two-particle level spacing" << endl;
  29. cout << endl << "EXAMPLE: " << endl << endl;
  30. cout << "Smoothen_LiebLin_DSF d 1.0 100.0 100 0 200 5.0 1 0.0 10.0 500 2.0" << endl << endl;
  31. }
  32. else if (argc == 13) { // !fixed_iK
  33. char whichDSF = *argv[1];
  34. DP c_int = atof(argv[2]);
  35. DP L = atof(argv[3]);
  36. int N = atoi(argv[4]);
  37. int iKmin = atoi(argv[5]);
  38. int iKmax = atoi(argv[6]);
  39. DP kBT = atof(argv[7]);
  40. int DiK = atoi(argv[8]);
  41. DP ommin = atof(argv[9]);
  42. DP ommax = atof(argv[10]);
  43. int Nom = atoi(argv[11]);
  44. DP width = atof(argv[12]);
  45. stringstream filenameprefix;
  46. Data_File_Name (filenameprefix, whichDSF, c_int, L, N, iKmin, iKmax, kBT, 0.0, "");
  47. string prefix = filenameprefix.str();
  48. DP normalization = twoPI * L;
  49. Write_K_File (L, iKmin, iKmax);
  50. Write_Omega_File (Nom, ommin, ommax);
  51. // We use the scaled width function as default:
  52. DP sumcheck;
  53. sumcheck = Smoothen_RAW_into_SF_LiebLin_Scaled (prefix, L, N, iKmin, iKmax, DiK, ommin, ommax, Nom, width, normalization);
  54. }
  55. return(0);
  56. }