18 #include "FirstMultiply.h" 20 #include "diagonalcalc.h" 21 #include "expec_energy_flct.h" 22 #include "expec_cisajs.h" 23 #include "expec_cisajscktaltdc.h" 24 #include "CalcByTEM.h" 26 #include "wrapperMPI.h" 27 #include "HPhiTrans.h" 54 const int ExpecInterval,
71 fprintf(
stdoutMPI,
"Error: NTETimeSteps must be larger than Lanczos_max.\n");
78 fprintf(stderr,
"Error: A file of Inputvector is not inputted.\n");
82 fprintf(
stdoutMPI,
"%s",
"An Initial Vector is inputted.\n");
85 strcat(defname,
"_rank_%d.dat");
86 sprintf(sdt, defname,
myrank);
89 fprintf(stderr,
"Error: A file of Inputvector does not exist.\n");
93 byte_size = fread(&step_initial,
sizeof(
int), 1, fp);
94 byte_size = fread(&i_max,
sizeof(
long int), 1, fp);
96 fprintf(stderr,
"Error: A file of Inputvector is incorrect.\n");
148 if (
step_i == 0) dt = 0.0;
157 "Error: Time Evoluation mode does not support TEOneBody and TETwoBody interactions at the same time. \n");
168 if(
step_i == step_initial){
241 for(i=0; i<
X->Def.NTETransferMax ;i++) {
242 for(j =0; j<4; j++) {
243 X->Def.EDGeneralTransfer[i +
X->Def.EDNTransfer][j] = 0;
245 X->Def.EDParaGeneralTransfer[i+
X->Def.EDNTransfer]=0.0;
249 for(i=0; i<
X->Def.NTETransfer[timeidx] ;i++){
250 for(j =0; j<4; j++) {
251 X->Def.EDGeneralTransfer[i +
X->Def.EDNTransfer][j] =
X->Def.TETransfer[timeidx][i][j];
253 X->Def.EDParaGeneralTransfer[i+
X->Def.EDNTransfer]=
X->Def.ParaTETransfer[timeidx][i];
255 X->Def.EDNTransfer +=
X->Def.NTETransfer[timeidx];
264 for (i = 0; i <
X->Def.NTEInterAllMax; i++) {
265 for (j = 0; j < 8; j++) {
266 X->Def.InterAll_OffDiagonal[i +
X->Def.NInterAll_OffDiagonal][j] = 0;
268 X->Def.ParaInterAll_OffDiagonal[i +
X->Def.NInterAll_OffDiagonal] = 0.0;
272 for (i = 0; i <
X->Def.NTEInterAllOffDiagonal[timeidx]; i++) {
273 for (j = 0; j < 8; j++) {
274 X->Def.InterAll_OffDiagonal[i +
X->Def.NInterAll_OffDiagonal][j] =
X->Def.TEInterAllOffDiagonal[timeidx][i][j];
276 X->Def.ParaInterAll_OffDiagonal[i +
X->Def.NInterAll_OffDiagonal] =
X->Def.ParaTEInterAllOffDiagonal[timeidx][i];
278 X->Def.NInterAll_OffDiagonal +=
X->Def.NTEInterAllOffDiagonal[timeidx];
unsigned int NTETimeSteps
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.
unsigned int NTEInterAllMax
unsigned long int idim_max
The dimension of the Hilbert space of this process.
const char * cFileNameTEStep
int TransferWithPeierls(struct BindStruct *X, const double time)
Function of getting transfer with peierls.
int CalcByTEM(const int ExpecInterval, struct EDMainCalStruct *X)
main function of time evolution calculation
int iOutputEigenVec
ASwitch for outputing an eigenvector. 0: no output, 1:output.
const char * cFileNameFlct
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.
double Sz2
Expectation value of the Square of total Sz.
unsigned int NInterAll_OffDiagonal
Number of interall term (off-diagonal)
void MakeTEDInterAll(struct BindStruct *X, const int timeidx)
Set interall interactions at timeidx-th time.
void MakeTEDTransfer(struct BindStruct *X, const int timeidx)
Set transfer integrals at timeidx-th time.
double num
Expectation value of the Number of electrons.
const char * c_InputEigenVectorStart
int expec_cisajs(struct BindStruct *X, double complex *vec)
function of calculation for one body green's function
const char * cLogTEM_Start
double var
Expectation value of the Energy variance.
int MultiplyForTEM(struct BindStruct *X)
Function of multiplying Hamiltonian for Time Evolution.
const char * cFileNameNorm
int istep
Index of TPQ step ???
const char * cFileNameTimeKeep
unsigned int EDNTransfer
Number of transfer integrals for calculation.
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.
int GetFileNameByKW(int iKWidx, char **FileName)
function of getting file name labeled by the keyword
double energy
Expectation value of the total energy.
unsigned int NTETransferMax
int iInputEigenVec
Switch for reading an eigenvector. 0: no input, 1:input.
struct CheckList Check
Size of the Hilbert space.
double num2
Expectation value of the quare of the number of electrons.
char * CDataFileHead
Read from Calcmod in readdef.h. Header of output file such as Green's function.
int TimeKeeperWithStep(struct BindStruct *X, const char *cFileName, const char *cTimeKeeper_Message, const char *cWriteType, const int istep)
Functions for writing a time log.
struct BindStruct Bind
Binded struct.
double doublon2
Expectation value of the Square of doublon.
int TimeKeeper(struct BindStruct *X, const char *cFileName, const char *cTimeKeeper_Message, const char *cWriteType)
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()