18 #include "common/setmemory.h" 21 #include "wrapperMPI.h" 41 long unsigned int ihfbit,
43 long unsigned int *list_1_,
44 long unsigned int *list_2_1_,
45 long unsigned int *list_2_2_,
46 long unsigned int *list_jb_
65 long unsigned int *list_1_,
66 long unsigned int *list_2_1_,
67 long unsigned int *list_2_2_
72 long unsigned int *HilbertNumToSz;
73 long unsigned int i,icnt;
74 long unsigned int ib,jb;
77 long unsigned int div;
78 long unsigned int num_up,num_down;
79 long unsigned int irght,ilft,ihfbit;
82 unsigned int all_up,all_down,tmp_res,num_threads;
83 long unsigned int tmp_1,tmp_2,tmp_3;
88 unsigned int N_all_up, N_all_down;
90 long unsigned int num_loc, div_down;
91 unsigned int num_loc_up;
96 long unsigned int i_max=0;
98 long unsigned int div_up;
101 long int *list_2_1_Sz;
102 long int *list_2_2_Sz;
104 list_2_1_Sz = li_1d_allocate(X->
Check.
sdim+2);
115 long unsigned int *list_jb;
123 long unsigned int tmp_i,tmp_j,tmp_pow,max_tmp_i;
124 long unsigned int ia,ja;
125 long unsigned int ibpatn=0;
128 int iSpnup, iMinup,iAllup;
138 case HubbardNConserved:
170 case HubbardNConserved:
197 if(
Read_sz(X, irght, ilft, ihfbit, &i_max)!=0){
204 num_threads = omp_get_max_threads();
209 fprintf(fp,
"num_threads==%d\n",num_threads);
234 for(j=X->
Def.
Nsite/2; j< X->Def.Nsite ;j++){
244 for(j=(X->
Def.
Nsite+1)/2; j< X->Def.Nsite ;j++){
246 div_up = div_up/X->
Def.
Tpow[2*j];
247 div_down = i & X->
Def.
Tpow[2*j+1];
248 div_down = div_down/X->
Def.
Tpow[2*j+1];
251 icheck_loc= icheck_loc;
254 icheck_loc = icheck_loc*(div_up^div_down);
268 #pragma omp parallel for default(none) reduction(+:icnt) private(ib) firstprivate(ihfbit, N2, X) shared(list_1_, list_2_1_, list_2_2_, list_jb) 284 for(j=0;j<=N2-2;j+=2){
290 for(j=1;j<=N2-1;j+=2){
298 all_down = (X->
Def.
Nsite-tmp_res)/2;
311 icnt+=
child_omp_sz(ib,ihfbit, X, list_1_, list_2_1_, list_2_2_, list_jb);
323 for(j=0;j<=N2-2;j+=2){
329 for(j=1;j<=N2-1;j+=2){
337 all_down = (X->
Def.
Nsite-tmp_res)/2;
349 #pragma omp parallel for default(none) reduction(+:icnt) private(ib) firstprivate(ihfbit, X) shared(list_1_, list_2_1_, list_2_2_, list_jb) 356 fprintf(stderr,
"Error: CalcHS in ModPara file must be 0 or 1 for Hubbard model.");
360 case HubbardNConserved:
376 for(j=0;j<=N2-2;j+=2){
382 for(j=1;j<=N2-1;j+=2){
389 all_down = (X->
Def.
Nsite-tmp_res)/2;
391 for(iSpnup=iMinup; iSpnup<= iAllup; iSpnup++){
392 tmp_1 =
Binomial(all_up, iSpnup-num_up,comb,all_up);
393 tmp_2 =
Binomial(all_down, X->
Def.
Ne-iSpnup-num_down,comb,all_down);
402 #pragma omp parallel for default(none) reduction(+:icnt) private(ib) firstprivate(ihfbit, N2, X) shared(list_1_, list_2_1_, list_2_2_, list_jb) 404 icnt+=
child_omp_sz(ib,ihfbit, X,list_1_, list_2_1_, list_2_2_, list_jb);
422 for(j=0;j<=N2-2;j+=2){
428 for(j=1;j<=N2-1;j+=2){
435 all_down = (X->
Def.
Nsite-tmp_res)/2;
437 for(iSpnup=iMinup; iSpnup<= iAllup; iSpnup++){
438 tmp_1 =
Binomial(all_up, iSpnup-num_up,comb,all_up);
439 tmp_2 =
Binomial(all_down, X->
Def.
Ne-iSpnup-num_down,comb,all_down);
448 #pragma omp parallel for default(none) reduction(+:icnt) private(ib) firstprivate(ihfbit, N2, X) shared(list_1_, list_2_1_, list_2_2_, list_jb) 456 fprintf(stderr,
"Error: CalcHS in ModPara file must be 0 or 1 for Hubbard model.");
468 for(j=X->
Def.
Nsite/2; j< X->Def.Nsite ;j++){
481 for(j=X->
Def.
Nsite/2; j< X->Def.Nsite ;j++){
483 div_up = div_up/X->
Def.
Tpow[2*j];
484 div_down = i & X->
Def.
Tpow[2*j+1];
485 div_down = div_down/X->
Def.
Tpow[2*j+1];
488 num_down += div_down;
491 num_down += div_down;
493 icheck_loc= icheck_loc;
494 ihfSpinDown=div_down;
499 icheck_loc = icheck_loc*(div_up^div_down);
507 all_up = (X->
Def.
Nsite+tmp_res)/2-all_loc;
508 all_down = (X->
Def.
Nsite-tmp_res)/2-all_loc;
511 all_down = (X->
Def.
Nsite)/2-all_loc;
514 for(num_loc_up=0; num_loc_up <= all_loc; num_loc_up++){
515 tmp_1 =
Binomial(all_loc, num_loc_up, comb, all_loc);
518 tmp_2 =
Binomial(all_up, X->
Def.
Nup-num_up-num_loc_up, comb, all_up);
519 tmp_3 =
Binomial(all_down, X->
Def.
Ndown-num_down-(all_loc-num_loc_up), comb, all_down);
522 tmp_2 =
Binomial(all_up, X->
Def.
Nup-num_up-num_loc_up, comb, all_up);
523 tmp_3 =
Binomial(all_down, X->
Def.
Ndown-num_down-(all_loc-num_loc_up), comb, all_down);
527 tmp_2 =
Binomial(all_up, X->
Def.
Nup-num_up-num_loc_up, comb, all_up);
528 tmp_3 =
Binomial(all_down, X->
Def.
Ndown-num_down-(all_loc-num_loc_up), comb, all_down);
530 jb += tmp_1*tmp_2*tmp_3;
542 #pragma omp parallel for default(none) reduction(+:icnt) private(ib) firstprivate(ihfbit, N2, X) shared(list_1_, list_2_1_, list_2_2_, list_jb) 548 #pragma omp parallel for default(none) reduction(+:icnt) private(ib) firstprivate(ihfbit, N2, X) shared(list_1_, list_2_1_, list_2_2_, list_jb) 567 while(tmp_pow < X->Def.Tpow[X->
Def.
Ne]){
577 while(tmp_i<max_tmp_i){
591 list_2_1_[ia] = ja+1;
592 list_2_2_[ib] = jb+1;
593 tmp_j =
snoob(tmp_i);
599 }
else if(hacker == 1){
607 div_up = div_up/X->
Def.
Tpow[j];
619 #pragma omp parallel for default(none) reduction(+:icnt) private(ib) firstprivate(ihfbit, N, X, list_1_, list_2_1_, list_2_2_, list_jb) 625 }
else if(hacker == 0){
633 div_up = div_up/X->
Def.
Tpow[j];
645 #pragma omp parallel for default(none) reduction(+:icnt) private(ib) firstprivate(ihfbit, N, X) shared(list_1_, list_2_1_, list_2_2_, list_jb) 651 fprintf(stderr,
"Error: CalcHS in ModPara file must be -1 or 0 or 1 for Spin model.");
655 unsigned int Max2Sz=0;
656 unsigned int irghtsite=1;
657 long unsigned int itmpSize=1;
661 if(itmpSize==ihfbit){
670 HilbertNumToSz = lui_1d_allocate(2*Max2Sz+1);
671 for(ib=0; ib<2*Max2Sz+1; ib++){
672 HilbertNumToSz[ib]=0;
675 for(ib =0; ib<ihfbit; ib++){
677 for(j=1; j<= irghtsite; j++){
680 list_2_1_Sz[ib]=i2Sz;
681 HilbertNumToSz[i2Sz+Max2Sz]++;
685 for(ib=0;ib<ilftdim;ib++){
688 for(j=1;j<=(N-irghtsite); j++){
691 list_2_2_Sz[ib]=i2Sz;
693 jb += HilbertNumToSz[X->
Def.
Total2Sz- i2Sz +Max2Sz];
701 #pragma omp parallel for default(none) reduction(+:icnt) private(ib) firstprivate(ilftdim, ihfbit, X) shared(list_1_, list_2_1_, list_2_2_, list_2_1_Sz, list_2_2_Sz,list_jb) 702 for(ib=0;ib<ilftdim; ib++){
706 free_lui_1d_allocate(HilbertNumToSz);
730 fprintf(stderr,
"%s",
cErrSz);
741 free_li_2d_allocate(comb);
767 long int Binomial(
int n,
int k,
long int **comb,
int Nsite){
774 else if(n<0 || k<0 || n<k){
778 for(tmp_i=0;tmp_i<=Nsite;tmp_i++){
779 for(tmp_j=0;tmp_j<=Nsite;tmp_j++){
780 comb[tmp_i][tmp_j] = 0;
787 for(tmp_i=2;tmp_i<=n;tmp_i++){
788 for(tmp_j=0;tmp_j<=tmp_i;tmp_j++){
790 comb[tmp_i][tmp_j] = 1;
791 }
else if(tmp_j==tmp_i){
792 comb[tmp_i][tmp_j] = 1;
794 comb[tmp_i][tmp_j] = comb[tmp_i-1][tmp_j-1]+comb[tmp_i-1][tmp_j];
817 long unsigned int ib,
818 long unsigned int ihfbit,
820 long unsigned int *list_1_,
821 long unsigned int *list_2_1_,
822 long unsigned int *list_2_2_,
823 long unsigned int *list_jb_
826 long unsigned int i,j;
827 long unsigned int ia,ja,jb;
828 long unsigned int div_down, div_up;
829 long unsigned int num_up,num_down;
830 long unsigned int tmp_num_up,tmp_num_down;
839 div_up = div_up/X->
Def.
Tpow[2*j];
840 div_down = i & X->
Def.
Tpow[2*j+1];
841 div_down = div_down/X->
Def.
Tpow[2*j+1];
843 num_down += div_down;
848 tmp_num_down = num_down;
854 num_down = tmp_num_down;
858 div_up = div_up/X->
Def.
Tpow[2*j];
859 div_down = i & X->
Def.
Tpow[2*j+1];
860 div_down = div_down/X->
Def.
Tpow[2*j+1];
862 num_down += div_down;
865 list_1_[ja+jb]=ia+ib*ihfbit;
876 num_down = tmp_num_down;
880 div_up = div_up/X->
Def.
Tpow[2*j];
881 div_down = i & X->
Def.
Tpow[2*j+1];
882 div_down = div_down/X->
Def.
Tpow[2*j+1];
884 num_down += div_down;
886 if( (num_up+num_down) == X->
Def.
Ne){
887 list_1_[ja+jb]=ia+ib*ihfbit;
913 long unsigned int ihfbit,
915 long unsigned int *list_1_,
916 long unsigned int *list_2_1_,
917 long unsigned int *list_2_2_,
918 long unsigned int *list_jb_
921 long unsigned int i,j;
922 long unsigned int ia,ja,jb;
923 long unsigned int div_down, div_up;
924 long unsigned int num_up,num_down;
925 long unsigned int tmp_num_up,tmp_num_down;
934 div_up = div_up/X->
Def.
Tpow[2*j];
935 div_down = i & X->
Def.
Tpow[2*j+1];
936 div_down = div_down/X->
Def.
Tpow[2*j+1];
938 num_down += div_down;
943 tmp_num_down = num_down;
946 if(tmp_num_up <= X->Def.Nup && tmp_num_down <= X->Def.Ndown){
948 if(ia < X->Check.sdim){
950 num_down = tmp_num_down;
952 div_up = ia & X->
Def.
Tpow[2*j];
953 div_up = div_up/X->
Def.
Tpow[2*j];
954 div_down = ia & X->
Def.
Tpow[2*j+1];
955 div_down = div_down/X->
Def.
Tpow[2*j+1];
957 num_down += div_down;
960 list_1_[ja+jb]=ia+ib*ihfbit;
967 while(ia < X->Check.sdim){
969 num_down = tmp_num_down;
971 div_up = ia & X->
Def.
Tpow[2*j];
972 div_up = div_up/X->
Def.
Tpow[2*j];
973 div_down = ia & X->
Def.
Tpow[2*j+1];
974 div_down = div_down/X->
Def.
Tpow[2*j+1];
976 num_down += div_down;
979 list_1_[ja+jb]=ia+ib*ihfbit;
991 if(tmp_num_up+tmp_num_down <= X->Def.Ne){
993 if(ia < X->Check.sdim){
994 list_1_[ja+jb]=ia+ib*ihfbit;
1000 while(ia < X->Check.sdim){
1001 list_1_[ja+jb]=ia+ib*ihfbit;
1030 long unsigned int ib,
1031 long unsigned int ihfbit,
1033 long unsigned int *list_1_,
1034 long unsigned int *list_2_1_,
1035 long unsigned int *list_2_2_,
1036 long unsigned int *list_jb_
1039 long unsigned int i,j;
1040 long unsigned int ia,ja,jb;
1041 long unsigned int div_down, div_up;
1042 long unsigned int num_up,num_down;
1043 long unsigned int tmp_num_up,tmp_num_down;
1052 for(j=X->
Def.
Nsite/2; j< X->Def.Nsite ;j++){
1053 div_up = i & X->
Def.
Tpow[2*j];
1054 div_up = div_up/X->
Def.
Tpow[2*j];
1055 div_down = i & X->
Def.
Tpow[2*j+1];
1056 div_down = div_down/X->
Def.
Tpow[2*j+1];
1060 num_down += div_down;
1063 num_down += div_down;
1065 icheck_loc= icheck_loc;
1068 icheck_loc = icheck_loc*(div_up^div_down);
1074 tmp_num_up = num_up;
1075 tmp_num_down = num_down;
1079 num_up = tmp_num_up;
1080 num_down = tmp_num_down;
1083 div_up = i & X->
Def.
Tpow[2*j];
1084 div_up = div_up/X->
Def.
Tpow[2*j];
1085 div_down = i & X->
Def.
Tpow[2*j+1];
1086 div_down = div_down/X->
Def.
Tpow[2*j+1];
1090 num_down += div_down;
1093 num_down += div_down;
1095 icheck_loc= icheck_loc;
1098 icheck_loc = icheck_loc*(div_up^div_down);
1108 icheck_loc= icheck_loc*(div_up^div_down);
1111 if(num_up == X->
Def.
Nup && num_down == X->
Def.
Ndown && icheck_loc==1){
1112 list_1_[ja+jb]=ia+ib*ihfbit;
1142 long unsigned int ib,
1143 long unsigned int ihfbit,
1145 long unsigned int *list_1_,
1146 long unsigned int *list_2_1_,
1147 long unsigned int *list_2_2_,
1148 long unsigned int *list_jb_
1151 long unsigned int i,j;
1152 long unsigned int ia,ja,jb;
1153 long unsigned int div_down, div_up;
1154 long unsigned int num_up,num_down;
1155 long unsigned int tmp_num_up,tmp_num_down;
1164 for(j=X->
Def.
Nsite/2; j< X->Def.Nsite ;j++){
1165 div_up = i & X->
Def.
Tpow[2*j];
1166 div_up = div_up/X->
Def.
Tpow[2*j];
1167 div_down = i & X->
Def.
Tpow[2*j+1];
1168 div_down = div_down/X->
Def.
Tpow[2*j+1];
1172 num_down += div_down;
1175 num_down += div_down;
1177 icheck_loc= icheck_loc;
1180 icheck_loc = icheck_loc*(div_up^div_down);
1186 tmp_num_up = num_up;
1187 tmp_num_down = num_down;
1194 while(ia < X->Check.sdim && ia!=0){
1198 num_up = tmp_num_up;
1199 num_down = tmp_num_down;
1202 div_up = i & X->
Def.
Tpow[2*j];
1203 div_up = div_up/X->
Def.
Tpow[2*j];
1204 div_down = i & X->
Def.
Tpow[2*j+1];
1205 div_down = div_down/X->
Def.
Tpow[2*j+1];
1209 num_down += div_down;
1212 num_down += div_down;
1214 icheck_loc= icheck_loc;
1217 icheck_loc = icheck_loc*(div_up^div_down);
1227 icheck_loc= icheck_loc*(div_up^div_down);
1230 if(num_up == X->
Def.
Nup && num_down == X->
Def.
Ndown && icheck_loc==1){
1232 list_1_[ja+jb]=ia+ib*ihfbit;
1262 long unsigned int ib,
1263 long unsigned int ihfbit,
1265 long unsigned int *list_1_,
1266 long unsigned int *list_2_1_,
1267 long unsigned int *list_2_2_,
1268 long unsigned int *list_jb_
1271 long unsigned int i,j;
1272 long unsigned int ia,ja,jb;
1273 long unsigned int div_down, div_up;
1279 for(j=X->
Def.
Nsite/2; j< X->Def.Nsite ;j++){
1280 div_up = i & X->
Def.
Tpow[2*j];
1281 div_up = div_up/X->
Def.
Tpow[2*j];
1282 div_down = i & X->
Def.
Tpow[2*j+1];
1283 div_down = div_down/X->
Def.
Tpow[2*j+1];
1286 icheck_loc= icheck_loc;
1289 icheck_loc = icheck_loc*(div_up^div_down);
1300 div_up = i & X->
Def.
Tpow[2*j];
1301 div_up = div_up/X->
Def.
Tpow[2*j];
1302 div_down = i & X->
Def.
Tpow[2*j+1];
1303 div_down = div_down/X->
Def.
Tpow[2*j+1];
1306 icheck_loc= icheck_loc;
1309 icheck_loc = icheck_loc*(div_up^div_down);
1319 icheck_loc= icheck_loc*(div_up^div_down);
1323 list_1_[ja+jb]=ia+ib*ihfbit;
1351 long unsigned int ib,
1352 long unsigned int ihfbit,
1355 long unsigned int *list_1_,
1356 long unsigned int *list_2_1_,
1357 long unsigned int *list_2_2_,
1358 long unsigned int *list_jb_
1361 long unsigned int i,j,div;
1362 long unsigned int ia,ja,jb;
1363 long unsigned int num_up;
1364 unsigned int tmp_num_up;
1375 tmp_num_up = num_up;
1377 for(ia=0;ia<ihfbit;ia++){
1379 num_up = tmp_num_up;
1386 if(num_up == X->
Def.
Ne){
1387 list_1_[ja+jb]=ia+ib*ihfbit;
1415 long unsigned int ib,
1416 long unsigned int ihfbit,
1419 long unsigned int *list_1_,
1420 long unsigned int *list_2_1_,
1421 long unsigned int *list_2_2_,
1422 long unsigned int *list_jb_
1425 long unsigned int i,j,div;
1426 long unsigned int ia,ja,jb;
1427 long unsigned int num_up;
1428 unsigned int tmp_num_up;
1439 tmp_num_up = num_up;
1442 if(tmp_num_up<=X->Def.Ne && (X->
Def.
Ne-tmp_num_up)<= X->
Def.
Nsite-1){
1445 list_1_[ja+jb] = ia+ib*ihfbit;
1446 list_2_1_[ia] = ja+1;
1447 list_2_2_[ib] = jb+1;
1454 list_1_[ja+jb] = ia+ib*ihfbit;
1455 list_2_1_[ia] = ja+1;
1456 list_2_2_[ib] = jb+1;
1484 long unsigned int ib,
1485 long unsigned int ihfbit,
1487 long unsigned int *list_1_,
1488 long unsigned int *list_2_1_,
1489 long unsigned int *list_2_2_,
1490 long int *list_2_1_Sz_,
1491 long int *list_2_2_Sz_,
1492 long unsigned int *list_jb_
1495 long unsigned int ia,ja,jb;
1496 int list_2_2_Sz_ib=0;
1499 list_2_2_Sz_ib =list_2_2_Sz_[ib];
1501 for(ia=0;ia<ihfbit;ia++){
1502 tmp_2Sz=list_2_1_Sz_[ia]+list_2_2_Sz_ib;
1504 list_1_[ja+jb]=ia+ib*ihfbit;
1530 const long unsigned int irght,
1531 const long unsigned int ilft,
1532 const long unsigned int ihfbit,
1533 long unsigned int *i_max
1540 long unsigned int icnt=0;
1541 long unsigned int ia,ib;
1542 long unsigned int ja=0;
1543 long unsigned int jb=0;
1544 long unsigned int ibpatn=0;
1545 long unsigned int dam;
1558 sprintf(sdt,
"ListForKondo_Ns%d_Ncond%d.dat",X->
Def.
Nsite,X->
Def.
Ne);
1575 while(NULL !=
fgetsMPI(buf,
sizeof(buf),fp)){
void exitMPI(int errorcode)
MPI Abortation wrapper.
struct DefineList Def
Definision of system (Hamiltonian) etc.
const char * cProStartCalcSz
const char * cOMPSzFinish
unsigned int NLocSpn
Number of local spins.
long unsigned int ihfbit
Used for Ogata-Lin ???
unsigned long int idim_max
The dimension of the Hilbert space of this process.
int child_omp_sz_spin(long unsigned int ib, long unsigned int ihfbit, unsigned int N, struct BindStruct *X, long unsigned int *list_1_, long unsigned int *list_2_1_, long unsigned int *list_2_2_, long unsigned int *list_jb_)
calculating restricted Hilbert space for spin-1/2 systems
int sz(struct BindStruct *X, long unsigned int *list_1_, long unsigned int *list_2_1_, long unsigned int *list_2_2_)
generating Hilbert space
int Total2Sz
Total in this process.
int child_omp_sz_GeneralSpin(long unsigned int ib, long unsigned int ihfbit, struct BindStruct *X, long unsigned int *list_1_, long unsigned int *list_2_1_, long unsigned int *list_2_2_, long int *list_2_1_Sz_, long int *list_2_2_Sz_, long unsigned int *list_jb_)
calculating restricted Hilbert space for general spin systems (S>1/2)
struct LargeList Large
Variables for Matrix-Vector product.
int * LocSpn
[DefineList::NLocSpn] Flag (and size) of the local spin. malloc in setmem_def().
int childfopenMPI(const char *_cPathChild, const char *_cmode, FILE **_fp)
Only the root process open file in output/ directory.
unsigned int Nup
Number of spin-up electrons in this process.
const char * cStateLocSpin
const char * cFileNameErrorSz
int child_omp_sz_KondoGC(long unsigned int ib, long unsigned int ihfbit, struct BindStruct *X, long unsigned int *list_1_, long unsigned int *list_2_1_, long unsigned int *list_2_2_, long unsigned int *list_jb_)
int Read_sz(struct BindStruct *X, const long unsigned int irght, const long unsigned int ilft, const long unsigned int ihfbit, long unsigned int *i_max)
reading the list of the restricted Hilbert space
unsigned long int sdim
Dimension for Ogata-Lin ???
int GetLocal2Sz(const unsigned int isite, const long unsigned int org_bit, const long int *SiteToBit, const long unsigned int *Tpow)
get 2sz at a site for general spin
long int Binomial(int n, int k, long int **comb, int Nsite)
int child_omp_sz_Kondo(long unsigned int ib, long unsigned int ihfbit, struct BindStruct *X, long unsigned int *list_1_, long unsigned int *list_2_1_, long unsigned int *list_2_2_, long unsigned int *list_jb_)
calculating restricted Hilbert space for Kondo systems
int child_omp_sz_hacker(long unsigned int ib, long unsigned int ihfbit, struct BindStruct *X, long unsigned int *list_1_, long unsigned int *list_2_1_, long unsigned int *list_2_2_, long unsigned int *list_jb_)
efficient version of calculating restricted Hilbert space for Hubbard systems using snoob details of ...
const char * cFileNameListModel
unsigned int Ndown
Number of spin-down electrons in this process.
unsigned int Nsite
Number of sites in the INTRA process region.
const char * cStateNupNdown
int READ
It is ALWAYS 0 ???
int read_hacker
Whether use an efficient method (=1) in sz.c or not (=0)
long unsigned int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
char * cErrSz
Error Message in sz.c.
int child_omp_sz_spin_hacker(long unsigned int ib, long unsigned int ihfbit, unsigned int N, struct BindStruct *X, long unsigned int *list_1_, long unsigned int *list_2_1_, long unsigned int *list_2_2_, long unsigned int *list_jb_)
efficient version of calculating restricted Hilbert space for spin-1/2 systems details of snoob is fo...
const char * cReadSzStart
long unsigned int ilft
Used for Ogata-Lin ???
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_2_1
int iFlgGeneralSpin
Flag for the general (Sz/=1/2) spin.
long unsigned int * list_1
const char * cFileNameSzTimeKeep
long int * SiteToBit
[DefineList::NsiteMPI] Similar to DefineList::Tpow. For general spin.
const char * cFileNameTimeKeep
long unsigned int * list_2_2
unsigned int Ne
Number of electrons in this process.
int child_omp_sz_Kondo_hacker(long unsigned int ib, long unsigned int ihfbit, struct BindStruct *X, long unsigned int *list_1_, long unsigned int *list_2_1_, long unsigned int *list_2_2_, long unsigned int *list_jb_)
calculating restricted Hilbert space for Kondo-GC systems
const char * cProEndCalcSz
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.
char * cErrSz_NoFile_Show
int iFlgCalcSpec
Input parameter CalcSpec in teh CalcMod file.
char * fgetsMPI(char *InputString, int maxcount, FILE *fp)
MPI file I/O (get a line, fgets) wrapper. Only the root node (myrank = 0) reads and broadcast string...
long int SizeOflistjb
Used for computing Sz.
int child_omp_sz(long unsigned int ib, long unsigned int ihfbit, struct BindStruct *X, long unsigned int *list_1_, long unsigned int *list_2_1_, long unsigned int *list_2_2_, long unsigned int *list_jb_)
calculating restricted Hilbert space for Hubbard systems
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.
unsigned long int snoob(unsigned long int x)
"finding the next higher number after a given number that has the same number of 1-bits" This method ...
int TimeKeeper(struct BindStruct *X, const char *cFileName, const char *cTimeKeeper_Message, const char *cWriteType)
Functions for writing a time log.
FILE * stdoutMPI
File pointer to the standard output defined in InitializeMPI()