17 #include "readdef.hpp" 18 #include "FirstMultiply.hpp" 19 #include "Multiply.hpp" 20 #include "diagonalcalc.hpp" 21 #include "expec_energy_flct.hpp" 22 #include "expec_cisajs.hpp" 23 #include "expec_cisajscktaltdc.hpp" 24 #include "CalcByTEM.hpp" 26 #include "wrapperMPI.hpp" 27 #include "HPhiTrans.hpp" 28 #include "common/setmemory.hpp" 40 for (j = 0; j < 4; j++) {
48 for (j = 0; j < 4; j++) {
62 for (j = 0; j < 8; j++) {
69 for (j = 0; j < 8; j++) {
88 const int ExpecInterval,
93 char sdt[D_FileNameMax];
94 char sdt_phys[D_FileNameMax];
95 char sdt_norm[D_FileNameMax];
96 char sdt_flct[D_FileNameMax];
103 std::complex<double> **v2;
108 fprintf(
stdoutMPI,
"Error: NTETimeSteps must be larger than Lanczos_max.\n");
113 fprintf(
stdoutMPI,
"%s",
"###### Start: TimeEvolution by Taylor Expansion. ######\n\n");
115 fprintf(stderr,
"Error: A file of Inputvector is not inputted.\n");
120 fprintf(
stdoutMPI,
"%s",
"An Initial Vector is inputted.\n");
121 TimeKeeper(&(X->
Bind),
"%s_TimeKeeper.dat",
"Reading an input Eigenvector starts: %s",
"a");
123 strcat(defname,
"_rank_%d.dat");
124 sprintf(sdt, defname,
myrank);
127 fprintf(stderr,
"Error: A file of Inputvector does not exist.\n");
131 byte_size = fread(&step_initial,
sizeof(
int), 1, fp);
132 byte_size = fread(&i_max,
sizeof(
long int), 1, fp);
134 fprintf(stderr,
"Error: A file of Inputvector is incorrect.\n");
136 printf(
"byte_size : %d\n", (
int)byte_size);
139 byte_size = fread(&
v1[0][0],
sizeof(std::complex<double>), X->
Bind.
Check.
idim_max + 1, fp);
146 sprintf(sdt_phys,
"%s",
"SS.dat");
150 fprintf(fp,
"%s",
" # time, energy, phys_var, phys_doublon, phys_num, step_i\n");
153 sprintf(sdt_norm,
"%s",
"Norm.dat");
157 fprintf(fp,
"%s",
" # time, norm, step_i \n");
160 sprintf(sdt_flct,
"%s",
"Flct.dat");
164 fprintf(fp,
"%s",
" # time, N, N^2, D, D^2, Sz, Sz^2, step_i \n");
188 if (
step_i == 0) dt = 0.0;
197 "Error: Time Evoluation mode does not support TEOneBody and TETwoBody interactions at the same time. \n");
209 if (
step_i == step_initial) {
224 fprintf(fp,
"%.16lf %.16lf %.16lf %.16lf %.16lf %d\n",
238 fprintf(fp,
"%.16lf %.16lf %.16lf %.16lf %.16lf %.16lf %.16lf %d\n",
261 free_cd_2d_allocate(v2);
275 fprintf(
stdoutMPI,
"%s",
"###### End : TimeEvolution by Taylor Expansion. ######\n\n");
double * doublon
Expectation value of the Doublon.
void exitMPI(int errorcode)
MPI Abortation wrapper.
struct DefineList Def
Definision of system (Hamiltonian) etc.
std::complex< double > * EDParaGeneralTransfer
Value of general transfer integrals by a def file. malloc in setmem_def(). Data Format [DefineList::N...
double * var
Expectation value of the Energy variance.
int St
0 or 1, but it affects nothing.
FILE * stdoutMPI
File pointer to the standard output defined in InitializeMPI()
std::complex< double > ** ParaTETransfer
int expec_cisajscktaltdc(struct BindStruct *X, int nstate, std::complex< double > **Xvec, std::complex< double > **vec)
Parent function to calculate two-body green's functions.
int childfopenALL(const char *_cPathChild, const char *_cmode, FILE **_fp)
All processes open file in output/ directory.
int expec_energy_flct(struct BindStruct *X, int nstate, std::complex< double > **tmp_v0, std::complex< double > **tmp_v1)
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
std::complex< double > ** v0
int TimeKeeperWithStep(struct BindStruct *X, const char *cFileName, const char *cTimeKeeper_Message, const char *cWriteType, const int istep)
Functions for writing a time log.
int iOutputEigenVec
ASwitch for outputting an eigenvector. 0: no output, 1:output.
int CalcByTEM(const int ExpecInterval, struct EDMainCalStruct *X)
main function of time evolution calculation
double * num2
Expectation value of the quare of the number of electrons.
int ** EDGeneralTransfer
Index of transfer integrals for calculation. malloc in setmem_def(). Data Format [DefineList::NTransf...
struct PhysList Phys
Physical quantities.
double * Sz2
Expectation value of the Square of total Sz.
std::complex< double > ** v1
double * Sz
Expectation value of the Total Sz.
int ** InterAll_OffDiagonal
[DefineList::NinterAll_OffDiagonal][8] Interacted quartet
void MakeTEDInterAll(struct BindStruct *X, const int timeidx)
Set interall interactions at timeidx-th time.
int MultiplyForTEM(struct BindStruct *X, std::complex< double > **v2)
Function of multiplying Hamiltonian for Time Evolution.
int * NTEInterAllOffDiagonal
int EDNTransfer
Number of transfer integrals for calculation.
void MakeTEDTransfer(struct BindStruct *X, const int timeidx)
Set transfer integrals at timeidx-th time.
double * num
Expectation value of the Number of electrons.
int Lanczos_max
Maximum number of iterations.
double * energy
Expectation value of the total energy.
int myrank
Process ID, defined in InitializeMPI()
int expec_cisajs(struct BindStruct *X, int nstate, std::complex< double > **Xvec, std::complex< double > **vec)
function of calculation for one body green's function
std::complex< double > * ParaInterAll_OffDiagonal
[DefineList::NInterAll_OffDiagonal] Coupling constant of off-diagonal inter-all term. malloc in setmem_def().
int NInterAll_OffDiagonal
Number of interall term (off-diagonal)
int TransferWithPeierls(struct BindStruct *X, const double time)
Function of getting transfer with peierls.
int istep
Index of TPQ step ???
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.
int *** TEInterAllOffDiagonal
int iInputEigenVec
Switch for reading an eigenvector. 0: no input, 1:input.
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.
long int idim_max
The dimension of the Hilbert space of this process.
struct BindStruct Bind
Binded struct.
std::complex< double > ** ParaTEInterAllOffDiagonal
int childfopenMPI(const char *_cPathChild, const char *_cmode, FILE **_fp)
Only the root process open file in output/ directory.