142 long unsigned int i,j, idim_maxMPI;
143 long unsigned int irght,ilft,ihfbit;
144 long unsigned int org_isite1,org_isite2,org_sigma1,org_sigma2;
145 long unsigned int tmp_off=0;
147 double complex tmp_trans=0;
151 long unsigned int is, Asum, Adiff;
152 long unsigned int ibitsite1, ibitsite2;
166 double complex *tmp_v1bufOrg;
170 tmp_v1bufOrg= cd_1d_allocate(idim_maxMPI + 1);
179 ibitsite1 = X->
Def.
OrgTpow[2*org_isite1-2+org_sigma1] ;
180 ibitsite2 = X->
Def.
OrgTpow[2*org_isite2-2+org_sigma2] ;
186 && org_sigma1 != org_sigma2){
190 X_child_CisAjt_MPIdouble(org_isite1-1, org_sigma1, org_isite2-1, org_sigma2, -tmp_trans, X, tmp_v0, tmp_v1, tmp_v1bufOrg,
list_1_org,
list_1buf_org,
list_2_1,
list_2_2);
195 if(org_isite1 < org_isite2) {
203 #pragma omp parallel for default(none) shared(tmp_v0, tmp_v1,stdoutMPI) \ 204 firstprivate(i_max, tmp_trans, Asum, Adiff, ibitsite1, ibitsite2, X, list_1_org, list_1, myrank) \ 205 private(j, tmp_sgn, tmp_off) 206 for (j = 1; j <= i_max; j++){
208 tmp_v0[tmp_off] += tmp_trans * tmp_sgn*tmp_v1[j];
215 if(org_isite1==org_isite2 && org_sigma1==org_sigma2){
216 is = X->
Def.
Tpow[2 * org_isite1 - 2 + org_sigma1];
217 ibit = (
unsigned long int)
myrank & is;
220 #pragma omp parallel for default(none) shared(tmp_v0, tmp_v1) \ 221 firstprivate(i_max, tmp_trans) private(j) 222 for (j = 1; j <= i_max; j++) tmp_v0[j] += -tmp_trans * tmp_v1[j];
227 #pragma omp parallel for default(none) shared(tmp_v0, tmp_v1) \ 228 firstprivate(i_max, tmp_trans) private(j) 229 for (j = 1; j <= i_max; j++) tmp_v0[j] += tmp_trans * tmp_v1[j];
238 if(org_isite1 < org_isite2){
249 if(org_isite1==org_isite2 && org_sigma1==org_sigma2){
250 is = X->
Def.
Tpow[2 * org_isite1 - 2 + org_sigma1];
252 #pragma omp parallel for default(none) shared(list_1, tmp_v0, tmp_v1) firstprivate(i_max, is, tmp_trans) private(num1, ibit) 253 for (j = 1; j <= i_max; j++) {
255 num1 = (1-ibit / is);
256 tmp_v0[j] += -tmp_trans * num1 * tmp_v1[j];
260 #pragma omp parallel for default(none) shared(list_1, tmp_v0, tmp_v1) firstprivate(i_max, is, tmp_trans) private(num1, ibit) 261 for (j = 1; j <= i_max; j++) {
264 tmp_v0[j] += tmp_trans * num1 * tmp_v1[j];
276 free_cd_1d_allocate(tmp_v1bufOrg);
struct DefineList Def
Definision of system (Hamiltonian) etc.
long unsigned int ihfbit
Used for Ogata-Lin ???
int X_CisAjt(long unsigned int list_1_j, struct BindStruct *X, long unsigned int is1_spin, long unsigned int is2_spin, long unsigned int sum_spin, long unsigned int diff_spin, long unsigned int *tmp_off)
Compute index of wavefunction of final state.
int iFlagListModified
When the Hilbert space of excited state differs from the original one.
struct LargeList Large
Variables for Matrix-Vector product.
int mode
multiply or expectation value.
long unsigned int * list_1buf_org
long unsigned int * OrgTpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
double complex X_child_CisAjt_MPIsingle(int org_isite1, int org_ispin1, int org_isite2, int org_ispin2, double complex tmp_trans, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1, double complex *v1buf, 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)
Hopping term in Hubbard (Kondo) + Canonical ensemble When only site2 is in the inter process region...
double complex child_general_hopp(double complex *tmp_v0, double complex *tmp_v1, struct BindStruct *X, double complex trans)
Compute hopping (canonical)
long unsigned int A_spin
Mask used in the bit oeration.
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.
long unsigned int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
long unsigned int ilft
Used for Ogata-Lin ???
double complex * ParaPairExcitationOperator
[DefineList::NPairExcitationOperator] Coefficient of pair excitaion operator for spectrum. malloc in setmem_def().
int GetSplitBitByModel(const int Nsite, const int iCalcModel, long unsigned int *irght, long unsigned int *ilft, long unsigned int *ihfbit)
function of splitting original bit into right and left spaces.
long unsigned int * list_1_org
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
double complex X_child_general_hopp_MPIsingle(int org_isite1, int org_ispin1, int org_isite2, int org_ispin2, double complex tmp_trans, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Hopping term in Hubbard (Kondo) + Canonical ensemble When only site2 is in the inter process region...
long int i_max
Length of eigenvector.
long unsigned int * list_1
int child_general_hopp_GetInfo(struct BindStruct *X, unsigned long int isite1, unsigned long int isite2, unsigned long int sigma1, unsigned long int sigma2)
Compute mask for bit operation of hopping term.
unsigned int NPairExcitationOperator
Number of pair excitaion operator for spectrum.
long unsigned int * list_2_2
double complex X_child_CisAjt_MPIdouble(int org_isite1, int org_ispin1, int org_isite2, int org_ispin2, double complex tmp_trans, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1, double complex *v1buf, 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)
Hopping term in Hubbard + MPI When both site1 and site2 are in the inter process region.
int ** PairExcitationOperator
[DefineList::NPairExcitationOperator][5] Indices of pair excitaion operator for spectrum. malloc in setmem_def().
long unsigned int isA_spin
Mask used in the bit oeration.
long unsigned int irght
Used for Ogata-Lin ???
int iCalcModel
Switch for model. 0:Hubbard, 1:Spin, 2:Kondo, 3:HubbardGC, 4:SpinGC, 5:KondoGC, 6:HubbardNConserved.
int myrank
Process ID, defined in InitializeMPI()
double complex X_child_general_hopp_MPIdouble(int org_isite1, int org_ispin1, int org_isite2, int org_ispin2, double complex tmp_trans, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Hopping term in Hubbard (Kondo) + Canonical ensemble When both site1 and site2 are in the inter proce...
struct CheckList Check
Size of the Hilbert space.