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_ODSLF_DSF.cc 2.4KB

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