16 #include "FirstMultiply.h" 18 #include "expec_energy_flct.h" 19 #include "expec_cisajs.h" 20 #include "expec_cisajscktaltdc.h" 21 #include "CalcByTPQ.h" 23 #include "wrapperMPI.h" 54 const int ExpecInterval,
62 int rand_i, rand_max, iret;
63 unsigned long int i_max;
76 for (rand_i = 0; rand_i<rand_max; rand_i++){
93 fprintf(stdout,
"A file of Inputvector does not exist.\n");
94 fprintf(stdout,
"Start to calculate in normal procedure.\n");
98 byte_size = fread(&i_max,
sizeof(
long int), 1, fp);
100 fprintf(stderr,
"Error: A file of Inputvector is incorrect.\n");
112 if(iret != 0)
return -1;
115 if (byte_size == 0) printf(
"byte_size: %d \n", (
int)byte_size);
174 if(iret !=0)
return -1;
179 if(iret !=0)
return -1;
187 if(iret !=0)
return -1;
232 if(iret !=0)
return -1;
265 if(iret !=0)
return -1;
270 if(iret !=0)
return -1;
291 tstruct.
tend=time(NULL);
int childfopenALL(const char *_cPathChild, const char *_cmode, FILE **_fp)
All processes open file in output/ directory.
int irand
Input keyword TargetTPQRand ???
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]
unsigned long int idim_max
The dimension of the Hilbert space of this process.
void StopTimer(int n)
function for calculating elapse time [elapse time=StartTimer-StopTimer]
int childfopenMPI(const char *_cPathChild, const char *_cmode, FILE **_fp)
Only the root process open file in output/ directory.
const char * cLogInputVecFinish
struct PhysList Phys
Physical quantities.
int Multiply(struct BindStruct *X)
Function of calculating the i-th step norm as and update the i+1-th wave vector as for TPQ calculat...
int FirstMultiply(int rand_i, struct BindStruct *X)
Multiplication at the first step for TPQ mode ( is the random or inputted vector).
double Sz2
Expectation value of the Square of total Sz.
const char * cLogInputVecStart
double num
Expectation value of the Number of electrons.
const char * cFileNameNormRand
int CalcByTPQ(const int NumAve, const int ExpecInterval, struct EDMainCalStruct *X)
A main function to calculate physical quqntities by TPQ method.
const char * cLogNormRand
int expec_cisajs(struct BindStruct *X, double complex *vec)
function of calculation for one body green's function
const char * cOutputVecStart
const char * cLogTPQ_Start
const char * cFileNameInputVector
unsigned int NsiteMPI
Total number of sites, differ from DefineList::Nsite.
const char * cLogOutputVecStart
double var
Expectation value of the Energy variance.
const char * cFileNameFlctRand
const char * cLogFlctRand
const char * cOutputVecFinish
int istep
Index of TPQ step ???
const char * cFileNameTPQStep
const char * cLogOutputVecFinish
double doublon
Expectation value of the Doublon.
double Sz
Expectation value of the Total Sz.
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.
const char * cFileNameSSRand
const char * cFileNameOutputVector
double energy
Expectation value of the total energy.
struct CheckList Check
Size of the Hilbert space.
double num2
Expectation value of the quare of the number of electrons.
struct BindStruct Bind
Binded struct.
double doublon2
Expectation value of the Square of doublon.
int TimeKeeperWithRandAndStep(struct BindStruct *X, const char *cFileName, const char *cTimeKeeper_Message, const char *cWriteType, const int irand, const int istep)
Functions for writing a time log.
unsigned int Lanczos_max
Maximum number of iterations.
FILE * stdoutMPI
File pointer to the standard output defined in InitializeMPI()