17 #include "expec_energy_flct.hpp" 18 #include "expec_totalspin.hpp" 19 #include "expec_cisajs.hpp" 20 #include "expec_cisajscktaltdc.hpp" 21 #include "wrapperMPI.hpp" 23 #include "matrixscalapack.hpp" 54 std::complex<double> *vec_tmp;
55 int ictxt, ierr, rank;
61 fprintf(
stdoutMPI,
"In scalapack fulldiag, total spin is not calculated !\n");
62 vec_tmp = malloc(i_max*
sizeof(std::complex<double>));
64 for (i = 0; i < neig; i++) {
65 for (j = 0; j < i_max; j++) {
69 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
70 GetEigenVector(i, i_max, Z_vec, descZ_vec, vec_tmp);
72 for (j = 0; j < i_max; j++) {
73 v0[j + 1] = vec_tmp[j];
77 for (j = 0; j < i_max; j++) {
85 for (j = 0; j < i_max; j++) {
91 for (j = 0; j < i_max; j++) {
100 fprintf(stderr,
"Error: calc expec_energy.\n");
104 fprintf(stderr,
"Error: calc OneBodyG.\n");
108 fprintf(stderr,
"Error: calc TwoBodyG.\n");
122 fprintf(stderr,
"Error: calc TotalSpin.\n");
130 fprintf(stderr,
"Error: calc TotalSpin.\n");
136 for (i = 0; i < neig; i++) {
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",
159 fprintf(
stdoutMPI,
"i=%5ld Energy=%10lf N=%10lf Sz=%10lf Doublon=%10lf \n",
163 if(use_scalapack) free(vec_tmp);
double * doublon
Expectation value of the Doublon.
void exitMPI(int errorcode)
MPI Abortation wrapper.
struct DefineList Def
Definision of system (Hamiltonian) etc.
double * num_down
Expectation value of the number of down-spin electtrons.
FILE * stdoutMPI
File pointer to the standard output defined in InitializeMPI()
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 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.
std::complex< double > ** v0
double * s2
Expectation value of the square of the total S.
struct PhysList Phys
Physical quantities.
std::complex< double > ** v1
double * Sz
Expectation value of the Total Sz.
int NsiteMPI
Total number of sites, differ from DefineList::Nsite.
double * energy
Expectation value of the total energy.
int expec_totalspin(struct BindStruct *X, int nstate, std::complex< double > **vec)
Parent function of calculation of total spin.
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
double * num_up
Expectation value of the number of up-spin electtrons.
int iCalcModel
Switch for model. 0:Hubbard, 1:Spin, 2:Kondo, 3:HubbardGC, 4:SpinGC, 5:KondoGC, 6:HubbardNConserved.
void phys(struct BindStruct *X, long int neig)
A main function to calculate physical quantities by full diagonalization method.
struct CheckList Check
Size of the Hilbert space.
long int idim_max
The dimension of the Hilbert space of this process.
int iCalcType
Switch for calculation type. 0:Lanczos, 1:TPQCalc, 2:FullDiag.