17 #include "wrapperMPI.h" 18 #include "common/setmemory.h" 19 #include "mltplyHubbardCore.h" 20 #include "mltplyMPIHubbardCore.h" 36 double complex *tmp_v0,
37 double complex *tmp_v1
39 long int idim_max, idim_maxMPI;
40 long unsigned int i, j;
41 long unsigned int org_isite, ispin, itype;
42 long unsigned int is1_spin;
44 double complex tmpphi;
45 long unsigned int tmp_off = 0;
50 double complex *tmp_v1bufOrg;
54 tmp_v1bufOrg=cd_1d_allocate(idim_maxMPI + 1);
63 is1_spin = X->
Def.
Tpow[2 * org_isite + ispin];
66 X_Cis_MPI(org_isite, ispin, tmpphi, tmp_v0, tmp_v1, tmp_v1bufOrg, idim_max, \
71 #pragma omp parallel for default(none) shared(tmp_v0, tmp_v1, X, list_1_org) \ 72 firstprivate(idim_max, tmpphi, org_isite, ispin, list_2_1, list_2_2, is1_spin) private(j, isgn,tmp_off) 73 for (j = 1; j <= idim_max; j++) {
75 tmp_v0[tmp_off] += tmp_v1[j] * isgn*tmpphi;
79 else if (itype == 0) {
81 X_Ajt_MPI(org_isite, ispin, tmpphi, tmp_v0, tmp_v1, tmp_v1bufOrg, \
86 #pragma omp parallel for default(none) shared(tmp_v0, tmp_v1, X, list_1_org, list_1) \ 87 firstprivate(idim_max, tmpphi, org_isite, ispin, list_2_1, list_2_2, is1_spin, myrank) private(j, isgn, tmp_off) 88 for (j = 1; j <= idim_max; j++) {
90 tmp_v0[tmp_off] += tmp_v1[j] * isgn*tmpphi;
96 free_cd_1d_allocate(tmp_v1bufOrg);
109 double complex *tmp_v0,
110 double complex *tmp_v1
112 long int idim_max, idim_maxMPI;
113 long unsigned int i, j;
114 long unsigned int org_isite, ispin, itype;
115 long unsigned int is1_spin;
116 double complex tmpphi;
117 long unsigned int tmp_off = 0;
124 double complex *tmp_v1bufOrg;
128 tmp_v1bufOrg=cd_1d_allocate(idim_maxMPI + 1);
139 X_GC_Cis_MPI(org_isite, ispin, tmpphi, tmp_v0, tmp_v1, idim_max, tmp_v1bufOrg, X->
Def.
Tpow);
142 #pragma omp parallel for default(none) shared(tmp_v0, tmp_v1, X) \ 143 firstprivate(idim_max, tmpphi, org_isite, ispin) private(j, is1_spin, tmp_off) 144 for (j = 1; j <= idim_max; j++) {
145 is1_spin = X->
Def.
Tpow[2 * org_isite + ispin];
146 GC_Cis(j, tmp_v0, tmp_v1, is1_spin, tmpphi, &tmp_off);
150 else if (itype == 0) {
152 X_GC_Ajt_MPI(org_isite, ispin, tmpphi, tmp_v0, tmp_v1, idim_max, tmp_v1bufOrg, X->
Def.
Tpow);
155 #pragma omp parallel for default(none) shared(tmp_v0, tmp_v1, X) \ 156 firstprivate(idim_max, tmpphi, org_isite, ispin) private(j, is1_spin, tmp_off) 157 for (j = 1; j <= idim_max; j++) {
158 is1_spin = X->
Def.
Tpow[2 * org_isite + ispin];
159 GC_Ajt(j, tmp_v0, tmp_v1, is1_spin, tmpphi, &tmp_off);
165 free_cd_1d_allocate(tmp_v1bufOrg);
unsigned int NSingleExcitationOperator
Number of single excitaion operator for spectrum.
struct DefineList Def
Definision of system (Hamiltonian) etc.
long unsigned int ihfbit
Used for Ogata-Lin ???
struct LargeList Large
Variables for Matrix-Vector product.
double complex X_GC_Cis_MPI(int org_isite, int org_ispin, double complex tmp_trans, double complex *tmp_v0, double complex *tmp_v1, unsigned long int idim_max, double complex *tmp_v1buf, unsigned long int *Tpow)
Single creation/annihilation operator in the inter process region for HubbardGC.
double complex X_Cis_MPI(int org_isite, unsigned int org_ispin, double complex tmp_trans, double complex *tmp_v0, double complex *tmp_v1, double complex *tmp_v1buf, unsigned long int idim_max, long unsigned int *Tpow, long unsigned int *list_1_org, long unsigned int *list_1buf_org, long unsigned int *list_2_1_target, long unsigned int *list_2_2_target, long unsigned int _irght, long unsigned int _ilft, long unsigned int _ihfbit)
Compute term of canonical Hubbard system.
long unsigned int * list_1buf_org
double complex X_Ajt_MPI(int org_isite, unsigned int org_ispin, double complex tmp_trans, double complex *tmp_v0, double complex *tmp_v1, double complex *tmp_v1buf, unsigned long int idim_max, long unsigned int *Tpow, long unsigned int *list_1_org, long unsigned int *list_1buf_org, long unsigned int *list_2_1_target, long unsigned int *list_2_2_target, long unsigned int _irght, long unsigned int _ilft, long unsigned int _ihfbit)
Compute term of canonical Hubbard system.
unsigned long int idim_maxOrg
The local Hilbert-space dimention of original state for the spectrum.
unsigned int Nsite
Number of sites in the INTRA process region.
int X_Cis(long unsigned int j, long unsigned int is1_spin, long unsigned int *tmp_off, long unsigned int *list_1_org, long unsigned int *list_2_1_target, long unsigned int *list_2_2_target, long unsigned int _irght, long unsigned int _ilft, long unsigned int _ihfbit)
Compute index of final wavefunction associatesd to term of canonical Hubbard system.
long unsigned int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
long unsigned int ilft
Used for Ogata-Lin ???
double complex GC_Ajt(long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, long unsigned int is1_spin, double complex tmp_V, long unsigned int *tmp_off)
Compute term of grandcanonical Hubbard system.
long unsigned int * list_1_org
int ** SingleExcitationOperator
[DefineList::NSingleExcitationOperator][3] Indices of single excitaion operator for spectrum...
unsigned long int MaxMPI_li(unsigned long int idim)
MPI wrapper function to obtain maximum unsigned long integer across processes.
long unsigned int * list_2_1
int GetSingleExcitedStateHubbardGC(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Calculation of Single excited state for Hubbard Grand canonical system.
double complex X_Ajt(long unsigned int j, long unsigned int is1_spin, long unsigned int *tmp_off, long unsigned int *list_1_org, long unsigned int *list_2_1_target, long unsigned int *list_2_2_target, long unsigned int _irght, long unsigned int _ilft, long unsigned int _ihfbit)
Compute index of final wavefunction associatesd to term of canonical Hubbard system.
double complex X_GC_Ajt_MPI(int org_isite, int org_ispin, double complex tmp_trans, double complex *tmp_v0, double complex *tmp_v1, unsigned long int idim_max, double complex *tmp_v1buf, unsigned long int *Tpow)
Single creation/annihilation operator in the inter process region for HubbardGC.
long unsigned int * list_2_2
int GetSingleExcitedStateHubbard(struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Calculation of Single excited state for Hubbard canonical system.
long unsigned int irght
Used for Ogata-Lin ???
double complex GC_Cis(long unsigned int j, double complex *tmp_v0, double complex *tmp_v1, long unsigned int is1_spin, double complex tmp_V, long unsigned int *tmp_off)
Compute term of grandcanonical Hubbard system.
double complex * ParaSingleExcitationOperator
[DefineList::NSingleExcitationOperator] Coefficient of single excitaion operator for spectrum...
struct CheckList Check
Size of the Hilbert space.