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_Heis_DSF.cc 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /**********************************************************
  2. This software is part of J.-S. Caux's ABACUS library.
  3. Copyright (c) J.-S. Caux.
  4. -----------------------------------------------------------
  5. File: Smoothen_Heis_DSF.cc
  6. Purpose: produces .dsf 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 && argc != 14) { // Print out instructions
  14. //if (strcmp(argv[1],"help") == 0) { // Output some instructions
  15. cout << "Usage of Smoothen_Heis_DSF executable: " << endl << endl;
  16. cout << "Provide arguments using one of the following options:" << endl << endl;
  17. cout << "1) (for general momenta) whichDSF Delta N M iKmin iKmax DiK kBT ommin ommax Nom gwidth" << endl << endl;
  18. cout << "2) (for fixed momentum) whichDSF Delta N M iKneeded ommin ommax Nom gwidth" << endl << endl;
  19. //else ABACUSerror("Incomprehensible arguments in Smoothen_Heis_DSF executable.");
  20. }
  21. else if (argc == 13) { // !fixed_iK
  22. char whichDSF = *argv[1];
  23. DP Delta = atof(argv[2]);
  24. int N = atoi(argv[3]);
  25. int M = atoi(argv[4]);
  26. int iKmin = atoi(argv[5]);
  27. int iKmax = atoi(argv[6]);
  28. int DiK = atoi(argv[7]);
  29. DP kBT = atof(argv[8]);
  30. DP ommin = atof(argv[9]);
  31. DP ommax = atof(argv[10]);
  32. int Nom = atoi(argv[11]);
  33. DP gwidth = atof(argv[12]);
  34. stringstream filenameprefix;
  35. Data_File_Name (filenameprefix, whichDSF, Delta, N, M, iKmin, iKmax, kBT, 0, "");
  36. string prefix = filenameprefix.str();
  37. DP normalization = twoPI;
  38. DP denom_sum_K = 1.0/N;
  39. Write_K_File (N, iKmin, iKmax);
  40. Write_Omega_File (Nom, ommin, ommax);
  41. DP sumcheck;
  42. sumcheck = Smoothen_RAW_into_SF (prefix, iKmin, iKmax, DiK, ommin, ommax, Nom, gwidth, normalization, denom_sum_K);
  43. }
  44. /*
  45. else if (argc == 10) { // fixed_iK
  46. char whichDSF = *argv[1];
  47. DP Delta = atof(argv[2]);
  48. int N = atoi(argv[3]);
  49. int M = atoi(argv[4]);
  50. int iKneeded = atoi(argv[5]);
  51. DP ommin = atof(argv[6]);
  52. DP ommax = atof(argv[7]);
  53. int Nom = atoi(argv[8]);
  54. DP gwidth = atof(argv[9]);
  55. bool fixed_iK = true;
  56. stringstream filenameprefix;
  57. Data_File_Name (filenameprefix, whichDSF, Delta, N, M, fixed_iK, iKneeded, 0.0, 0, "");
  58. string prefix = filenameprefix.str();
  59. DP normalization = twoPI;
  60. int iKmin = iKneeded;
  61. int iKmax = iKneeded;
  62. cout << "Smoothing: sumcheck = " << Smoothen_RAW_into_SF (prefix, iKmin, iKmax, ommin, ommax, Nom, gwidth, normalization) << endl;
  63. }
  64. */
  65. //else ABACUSerror("Wrong number of arguments to Smoothen_Heis_DSF executable.");
  66. return(0);
  67. }