1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- /**********************************************************
-
- This software is part of J.-S. Caux's ABACUS library.
-
- Copyright (c) J.-S. Caux.
-
- -----------------------------------------------------------
-
- File: LiebLin_DSF.cc
-
- Purpose: main function for ABACUS for LiebLin gas
-
- ***********************************************************/
-
- #include "ABACUS.h"
-
- using namespace std;
- using namespace ABACUS;
-
-
- int main(int argc, char* argv[])
- {
-
- if (argc != 13) { // provide some info
-
- cout << endl << "Welcome to ABACUS\t(copyright J.-S. Caux)." << endl;
- cout << endl << "Usage of LiebLin_DSF_MosesState 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: use positive real values only" << endl;
- cout << "DP L \t\t\t Length of the system: use positive real values only" << endl;
- cout << "int N \t\t\t Number of particles: use positive integer values only" << endl;
- cout << "int Nl \t\t\t Number of particles in left Fermi sea (Nr is then N - Nl)" << endl;
- cout << "int DIl \t\t shift of left sea as compared to its ground state position" << endl;
- cout << "int DIr \t\t shift of right sea as compared to its ground state position" << endl;
- cout << "int iKmin" << endl << "int iKmax \t\t Min and max momentum integers to scan over: recommended values: -2*N and 2*N" << endl;
- //cout << "DP kBT \t\t Temperature (positive only of course)" << endl;
- cout << "int Max_Secs \t\t Allowed computational time: (in seconds)" << endl;
- cout << "DP target_sumrule \t sumrule saturation you're satisfied with" << endl;
- cout << "bool refine \t\t Is this a refinement of earlier calculations ? (0 == false, 1 == true)" << endl;
- cout << endl << "EXAMPLE: " << endl << endl;
- cout << "LiebLin_DSF_MosesState d 1.0 100.0 100 50 -30 20 0 200 600 1.0 0" << endl << endl;
- }
-
- else { // (argc == 13), correct nr of arguments
- char whichDSF = *argv[1];
- DP c_int = atof(argv[2]);
- DP L = atof(argv[3]);
- int N = atoi(argv[4]);
- int Nl = atoi(argv[5]);
- //int Nr = N - Nl;
- int DIl = atoi(argv[6]);
- int DIr = atoi(argv[7]);
- int iKmin = atoi(argv[8]);
- int iKmax = atoi(argv[9]);
- //DP kBT = atof(argv[7]);
- int Max_Secs = atoi(argv[10]);
- DP target_sumrule = atof(argv[11]);
- bool refine = (atoi(argv[12]) == 1);
-
- // Define the Moses state:
- LiebLin_Bethe_State MosesState (c_int, L, N);
-
- // Split the sea:
- for (int i = 0; i < Nl; ++i) MosesState.Ix2[i] += 2 * DIl;
- for (int i = Nl; i < N; ++i) MosesState.Ix2[i] += 2 * DIr;
-
- MosesState.Compute_All (true);
-
- //cout << MosesState << endl;
-
- // Handy default name:
- stringstream defaultScanStatename_strstream;
- defaultScanStatename_strstream << "Moses_Nl_" << Nl << "_DIl_" << DIl << "_DIr_" << DIr;
- string defaultScanStatename = defaultScanStatename_strstream.str();
-
- // Compute the correlation:
- Scan_LiebLin (whichDSF, MosesState, defaultScanStatename, iKmin, iKmax, Max_Secs, target_sumrule, refine);
-
- }
-
- return(0);
- }
|