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 3.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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: 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" << endl;
  19. cout << "DP L \t\t\t Length of the system" << endl;
  20. cout << "int N \t\t\t Number of particles" << endl;
  21. cout << "int iKmin" << endl << "int iKmax \t\t Min and max momentum integers" << endl;
  22. cout << "DP kBT \t\t Temperature" << endl;
  23. cout << "int DiK \t\t\t Window of iK over which DSF is averaged (DiK == 0 means a single iK is used; DiK == 1 means 3 are used (iK-1, iK, iK+1), etc.)" << endl;
  24. cout << "DP ommin" << endl << "DP ommax \t\t Min and max frequencies to cover in smoothened DSF" << endl;
  25. cout << "Nom \t\t\t Number of frequency points used for discretization" << endl;
  26. cout << "DP width \t\t Gaussian width used in smoothing, in units of two-particle level spacing" << endl;
  27. cout << endl << "EXAMPLE: " << endl << endl;
  28. cout << "Smoothen_LiebLin_DSF d 1.0 100.0 100 0 200 5.0 1 0.0 10.0 500 2.0" << endl << endl;
  29. }
  30. else if (argc == 13) { // !fixed_iK
  31. char whichDSF = *argv[1];
  32. DP c_int = atof(argv[2]);
  33. DP L = atof(argv[3]);
  34. int N = atoi(argv[4]);
  35. int iKmin = atoi(argv[5]);
  36. int iKmax = atoi(argv[6]);
  37. DP kBT = atof(argv[7]);
  38. int DiK = atoi(argv[8]);
  39. DP ommin = atof(argv[9]);
  40. DP ommax = atof(argv[10]);
  41. int Nom = atoi(argv[11]);
  42. DP width = atof(argv[12]);
  43. stringstream filenameprefix;
  44. //void Data_File_Name (stringstream& name, char whichDSF, DP c_int, DP L, int N, int iKmin, int iKmax, DP kBT, DP L2)
  45. Data_File_Name (filenameprefix, whichDSF, c_int, L, N, iKmin, iKmax, kBT, 0.0, "");
  46. string prefix = filenameprefix.str();
  47. DP normalization = twoPI * L;
  48. //DP denom_sum_K = L;
  49. Write_K_File (L, iKmin, iKmax);
  50. Write_Omega_File (Nom, ommin, ommax);
  51. //cout << "Smoothing: sumcheck = " << Smoothen_RAW_into_SF (prefix, iKmin, iKmax, ommin, ommax, Nom, width, normalization) << endl;
  52. // We use the scaled width function as default:
  53. DP sumcheck;
  54. //if (kBT < 0.1)
  55. sumcheck = Smoothen_RAW_into_SF_LiebLin_Scaled (prefix, L, N, iKmin, iKmax, DiK, ommin, ommax, Nom, width, normalization);
  56. //sumcheck = Smoothen_RAW_into_SF (prefix, iKmin, iKmax, DiK, ommin, ommax, Nom, width, normalization, denom_sum_K);
  57. //else sumcheck = Smoothen_RAW_into_SF (prefix, iKmin, iKmax, ommin, ommax, Nom, width, normalization);
  58. //cout << "Smoothing: sumcheck = " << sumcheck << endl;
  59. }
  60. //else ABACUSerror("Wrong number of arguments to Smoothen_LiebLin_DSF executable.");
  61. return(0);
  62. }