17 #include "expec_energy_flct.h" 18 #include "expec_totalspin.h" 19 #include "expec_cisajs.h" 20 #include "expec_cisajscktaltdc.h" 21 #include "wrapperMPI.h" 23 #include "matrixscalapack.h" 49 unsigned long int neig
51 long unsigned int i, j, i_max;
55 double complex *vec_tmp;
56 int ictxt, ierr, rank;
58 fprintf(
stdoutMPI,
"In scalapack fulldiag, total spin is not calculated !\n");
59 vec_tmp = malloc(i_max*
sizeof(
double complex));
62 for (i = 0; i < neig; i++) {
64 for (j = 0; j < i_max; j++) {
68 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
69 GetEigenVector(i, i_max, Z_vec, descZ_vec, vec_tmp);
71 for (j = 0; j < i_max; j++) {
72 v0[j + 1] = vec_tmp[j];
76 for (j = 0; j < i_max; j++) {
83 for (j = 0; j < i_max; j++) {
88 for (j = 0; j < i_max; j++) {
95 for (j = 0; j < i_max; j++) {
102 fprintf(stderr,
"Error: calc expec_energy.\n");
106 fprintf(stderr,
"Error: calc OneBodyG.\n");
110 fprintf(stderr,
"Error: calc TwoBodyG.\n");
123 fprintf(stderr,
"Error: calc TotalSpin.\n");
131 fprintf(stderr,
"Error: calc TotalSpin.\n");
146 fprintf(
stdoutMPI,
"i=%5ld Energy=%10lf N=%10lf Sz=%10lf Doublon=%10lf \n", i, X->
Phys.
energy, tmp_N,
150 fprintf(
stdoutMPI,
"i=%5ld Energy=%10lf N=%10lf Sz=%10lf S2=%10lf Doublon=%10lf \n", i, X->
Phys.
energy, tmp_N,
154 fprintf(
stdoutMPI,
"i=%5ld Energy=%10lf N=%10lf Sz=%10lf S2=%10lf Doublon=%10lf \n", i, X->
Phys.
energy, tmp_N,
160 fprintf(
stdoutMPI,
"i=%5ld Energy=%10lf N=%10lf Sz=%10lf Doublon=%10lf \n", i, X->
Phys.
energy, tmp_N,
170 if(use_scalapack) free(vec_tmp);
double * all_num_down
[CheckList::idim_max+1] Number of spin-down electrons for FullDiag and LOBPCG. malloc in setmem_large...
double * all_s2
[CheckList::idim_max+1] for FullDiag and LOBPCG. malloc in setmem_large().
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 expec_totalspin(struct BindStruct *X, double complex *vec)
Parent function of calculation of total spin.
unsigned long int idim_max
The dimension of the Hilbert space of this process.
double num_up
Expectation value of the number of up-spin electtrons.
void phys(struct BindStruct *X, unsigned long int neig)
A main function to calculate physical quantities by full diagonalization method.
double num_down
Expectation value of the number of down-spin electtrons.
struct PhysList Phys
Physical quantities.
int expec_cisajs(struct BindStruct *X, double complex *vec)
function of calculation for one body green's function
double * all_doublon
[CheckList::idim_max+1] Doublon for FullDiag and LOBPCG. malloc in setmem_large().
unsigned int NsiteMPI
Total number of sites, differ from DefineList::Nsite.
double s2
Expectation value of the square of the total S.
double doublon
Expectation value of the Doublon.
double * all_sz
[CheckList::idim_max+1] for FullDiag and LOBPCG. malloc in setmem_large().
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.
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 eigen_num
Index of eigenstate used for the file name of the correlation function.
double energy
Expectation value of the total energy.
struct CheckList Check
Size of the Hilbert space.
double * all_num_up
[CheckList::idim_max+1] Number of spin-up electrons for FullDiag and LOBPCG. malloc in setmem_large()...
int iCalcType
Switch for calculation type. 0:Lanczos, 1:TPQCalc, 2:FullDiag.
FILE * stdoutMPI
File pointer to the standard output defined in InitializeMPI()
double * all_energy
[CheckList::idim_max+1] Energy for FullDiag and LOBPCG. malloc in setmem_large(). ...