123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- /**********************************************************
-
- This software is part of J.-S. Caux's ABACUS library.
-
- Copyright (c) J.-S. Caux.
-
- -----------------------------------------------------------
-
- File: Smoothen_LiebLin_DSF_GeneralState.cc
-
- Purpose: produces .dsf and .ssf files from a .raw file
-
- ***********************************************************/
-
- #include "ABACUS.h"
-
- using namespace std;
- using namespace ABACUS;
-
-
- int main(int argc, char* argv[])
- {
- if (argc != 13) { // Print out instructions
-
- cout << endl << "Welcome to ABACUS\t(copyright J.-S. Caux)." << endl;
- cout << endl << "Usage of Smoothen_LiebLin_DSF executable: " << endl;
- cout << endl << "Provide the following arguments:" << endl << endl;
- 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;
- cout << "DP c_int \t\t Value of the interaction parameter" << endl;
- cout << "DP L \t\t\t Length of the system" << endl;
- cout << "int N \t\t\t Number of particles" << endl;
- cout << "char* defaultScanStatename:\t\t file [].Ix2 contains the quantum numbers defining the "
- "AveragingState; used as defaultScanStatename" << endl;
- cout << "int iKmin" << endl << "int iKmax \t\t Min and max momentum integers" << endl;
- 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;
- cout << "DP ommin" << endl << "DP ommax \t\t Min and max frequencies to cover in smoothened DSF" << endl;
- cout << "Nom \t\t\t Number of frequency points used for discretization" << endl;
- cout << "DP width \t\t Gaussian width used in smoothing, in units of two-particle level spacing" << endl;
-
- cout << endl << "EXAMPLE: " << endl << endl;
- cout << "Smoothen_LiebLin_DSF d 1.0 100.0 100 0 200 5.0 1 0.0 10.0 500 2.0" << endl << endl;
-
- }
-
- else if (argc == 13) { // !fixed_iK
- int n = 1;
- char whichDSF = *argv[n++];
- DP c_int = atof(argv[n++]);
- DP L = atof(argv[n++]);
- int N = atoi(argv[n++]);
- char* Ix2filenameprefix = argv[n++];
- int iKmin = atoi(argv[n++]);
- int iKmax = atoi(argv[n++]);
- DP kBT = 0.0;
- int DiK = atoi(argv[n++]);
- DP ommin = atof(argv[n++]);
- DP ommax = atof(argv[n++]);
- int Nom = atoi(argv[n++]);
- DP width = atof(argv[n++]);
-
- stringstream filenamestrstream;
- filenamestrstream << Ix2filenameprefix;
- string defaultScanStatename = filenamestrstream.str();
-
- stringstream filenameprefix;
- Data_File_Name (filenameprefix, whichDSF, c_int, L, N, iKmin, iKmax, kBT, 0.0, defaultScanStatename);
- string prefix = filenameprefix.str();
-
- DP normalization = twoPI * L;
- DP denom_sum_K = L;
-
- Write_K_File (L, iKmin, iKmax);
- Write_Omega_File (Nom, ommin, ommax);
-
- // We use the scaled width function as default:
- DP sumcheck;
- sumcheck = Smoothen_RAW_into_SF (prefix, iKmin, iKmax, DiK, 0.0, ommin, ommax, Nom, width, normalization, denom_sum_K);
- }
-
- /*
- else if (argc == 11) { // fixed_iK
- char whichDSF = *argv[1];
- DP c_int = atof(argv[2]);
- DP L = atof(argv[3]);
- int N = atoi(argv[4]);
- int iK_UL = atoi(argv[5]);
- int iKneeded = atoi(argv[6]);
- DP ommin = atof(argv[7]);
- DP ommax = atof(argv[8]);
- int Nom = atoi(argv[9]);
- DP gwidth = atof(argv[10]);
-
- //bool fixed_iK = true;
- //LiebLin_Bethe_State GroundState (c_int, L, N, iK_UL, 0LL);
- stringstream filenameprefix;
- //Data_File_Name (filenameprefix, whichDSF, fixed_iK, iKneeded, GroundState, GroundState);
- //Data_File_Name (filenameprefix, whichDSF, c_int, L, N, iK_UL, fixed_iK, iKneeded, 0.0);
- Data_File_Name (filenameprefix, whichDSF, c_int, L, N, iK_UL, iKneeded, iKneeded, 0.0);
- string prefix = filenameprefix.str();
-
- DP normalization = twoPI * L;
- int iKmin = iKneeded;
- int iKmax = iKneeded;
-
- cout << "Smoothing: sumcheck = " << Smoothen_RAW_into_SF (prefix, iKmin, iKmax, 0.0, ommin, ommax, Nom, gwidth, normalization) << endl;
- }
- */
-
- return(0);
- }
|