16 #include "expec_cisajs.h" 17 #include "expec_cisajscktaltdc.h" 18 #include "expec_totalspin.h" 19 #include "CG_EigenVector.h" 20 #include "expec_energy_flct.h" 21 #include "Lanczos_EigenValue.h" 22 #include "Lanczos_EigenVector.h" 23 #include "CalcByLanczos.h" 25 #include "wrapperMPI.h" 70 case SpinlessFermionGC:
97 if(iret == 1)
return(
TRUE);
98 else if(iret != 0)
return(
FALSE);
115 if(iret != 0)
return(
FALSE);
122 fprintf(
stdoutMPI,
" Accuracy check !!!\n");
125 fprintf(
stdoutMPI,
" Accuracy of Lanczos vectors is enough.\n");
129 fprintf(
stdoutMPI,
" Accuracy of Lanczos vectors is NOT enough\n\n");
134 if(iret != 0)
return(
FALSE);
139 if(iret != 0)
return(
FALSE);
144 fprintf(
stdoutMPI,
" CG Accuracy check !!!\n");
155 if(iret != 0)
return(
FALSE);
159 fprintf(
stdoutMPI,
"An Eigenvector is inputted.\n");
166 fprintf(stderr,
"Error: A file of Inputvector does not exist.\n");
169 byte_size = fread(&
step_i,
sizeof(
int), 1, fp);
170 byte_size = fread(&i_max,
sizeof(
long int), 1, fp);
172 fprintf(stderr,
"Error: A file of Inputvector is incorrect.\n");
180 if (byte_size == 0) printf(
"byte_size: %d \n", (
int)byte_size);
188 fprintf(stderr,
"Error: calc OneBodyG.\n");
194 fprintf(stderr,
"Error: calc TwoBodyG.\n");
200 fprintf(stderr,
"Error: calc TotalSz.\n");
const char * cFileNameEnergy_CG
int childfopenALL(const char *_cPathChild, const char *_cmode, FILE **_fp)
All processes open file in output/ directory.
void exitMPI(int errorcode)
MPI Abortation wrapper.
struct DefineList Def
Definision of system (Hamiltonian) etc.
int expec_cisajscktaltdc(struct BindStruct *X, double complex *vec)
Parent function to calculate two-body green's functions.
int St
0 or 1, but it affects nothing.
void StartTimer(int n)
function for initializing elapse time [start]
const char * cOutputEigenVecStart
unsigned long int idim_max
The dimension of the Hilbert space of this process.
const char * cFileNameInputEigen
double Target_CG_energy
Taget energy of CG-inversed iteration (NOT LOBCG) method.
const char * cLogLanczos_EigenVecEnd
void StopTimer(int n)
function for calculating elapse time [elapse time=StartTimer-StopTimer]
int iOutputEigenVec
ASwitch for outputting an eigenvector. 0: no output, 1:output.
struct LargeList Large
Variables for Matrix-Vector product.
int childfopenMPI(const char *_cPathChild, const char *_cmode, FILE **_fp)
Only the root process open file in output/ directory.
const char * cFileNameOutputEigen
struct PhysList Phys
Physical quantities.
unsigned long int idim_maxMPI
The total dimension across process.
int CalcByLanczos(struct EDMainCalStruct *X)
A main function to calculate eigenvalues and eigenvectors by Lanczos method.
int expec_totalSz(struct BindStruct *X, double complex *vec)
int CG_EigenVector(struct BindStruct *X)
inversed power method with CG
const char * cOutputEigenVecFinish
const char * cLogLanczos_EigenVecStart
int expec_cisajs(struct BindStruct *X, double complex *vec)
function of calculation for one body green's function
const char * cReadEigenVecFinish
void Lanczos_EigenVector(struct BindStruct *X)
Calculate eigenvectors by the Lanczos method. The calculated tridiagonal matrix components are stor...
double var
Expectation value of the Energy variance.
int iFlgGeneralSpin
Flag for the general (Sz/=1/2) spin.
int iCalcEigenVec
Switch for method to calculate eigenvectors. 0:Lanczos+CG, 1: Lanczos. default value is set as 0 in r...
const char * cFileNameTimeKeep
const char * cReadEigenVecStart
int Lanczos_EigenValue(struct BindStruct *X)
Main function for calculating eigen values by Lanczos method. The energy convergence is judged by the...
double doublon
Expectation value of the Doublon.
int iCalcModel
Switch for model. 0:Hubbard, 1:Spin, 2:Kondo, 3:HubbardGC, 4:SpinGC, 5:KondoGC, 6:HubbardNConserved.
double Sz
Expectation value of the Total Sz.
long int initial_iv
Seed of random number for initial guesss of wavefunctions.
int myrank
Process ID, defined in InitializeMPI()
int expec_energy_flct(struct BindStruct *X)
Parent function to calculate expected values of energy and physical quantities.
double energy
Expectation value of the total energy.
int iInputEigenVec
Switch for reading an eigenvector. 0: no input, 1:input.
const char * cFileNameEnergy_Lanczos
struct CheckList Check
Size of the Hilbert space.
char * CDataFileHead
Read from Calcmod in readdef.h. Header of output file such as Green's function.
struct BindStruct Bind
Binded struct.
int TimeKeeper(struct BindStruct *X, const char *cFileName, const char *cTimeKeeper_Message, const char *cWriteType)
Functions for writing a time log.
double Target_energy
Is it really used ???
FILE * stdoutMPI
File pointer to the standard output defined in InitializeMPI()
unsigned int k_exct
Read from Calcmod in readdef.h.