38 #include "diagonalcalc.h" 39 #include "mltplySpinCore.h" 40 #include "wrapperMPI.h" 44 long unsigned int isite1,
46 long unsigned int spin,
48 double complex *tmp_v0,
49 double complex *tmp_v1
53 long unsigned int isite1,
54 long unsigned int isite2,
55 long unsigned int isigma1,
56 long unsigned int isigma2,
59 double complex *tmp_v0,
60 double complex *tmp_v1
64 long unsigned int isite1,
65 long unsigned int spin,
68 double complex *tmp_v0,
69 double complex *tmp_v1
90 long unsigned int i,j;
91 long unsigned int isite1,isite2;
92 long unsigned int spin;
96 long unsigned int A_spin,B_spin;
103 #pragma omp parallel for default(none) private(j) shared(list_Diagonal) firstprivate(i_max) 104 for(j = 1;j <= i_max; j++){
115 fprintf(fp,
"i=%ld isite1=%ld tmp_V=%lf \n",i,isite1,tmp_V);
129 fprintf(fp,
"i=%ld spin=%ld isite1=%ld tmp_V=%lf \n",i,spin,isite1,tmp_V);
145 fprintf(fp,
"i=%ld isite1=%ld isite2=%ld tmp_V=%lf \n",i,isite1,isite2,tmp_V);
163 fprintf(fp,
"i=%ld isite1=%ld isite2=%ld tmp_V=%lf \n",i,isite1,isite2,tmp_V);
178 fprintf(fp,
"i=%ld isite1=%ld A_spin=%ld isite2=%ld B_spin=%ld tmp_V=%lf \n", i, isite1, A_spin, isite2, B_spin, tmp_V);
200 double complex *tmp_v0,
201 double complex *tmp_v1
205 long unsigned int isite1, isite2;
206 long unsigned int A_spin, B_spin;
262 long unsigned int isite1,
266 long unsigned int is;
267 long unsigned int ibit;
268 long unsigned int is1_up, is1_down;
285 is1_up = X->
Def.
Tpow[2 * isite1 - 2];
286 is1_down = X->
Def.
Tpow[2 * isite1 - 1];
287 is = is1_up + is1_down;
288 ibit = (
unsigned long int)
myrank & is;
290 #pragma omp parallel for default(none) shared(list_Diagonal) \ 291 firstprivate(i_max, dtmp_V) private(j) 317 is1_up = X->
Def.
Tpow[2*isite1-2];
318 is1_down = X->
Def.
Tpow[2*isite1-1];
320 #pragma omp parallel for default(none) shared(list_Diagonal, list_1) firstprivate(i_max, is, dtmp_V) private(ibit) 321 for(j = 1;j <= i_max;j++){
332 is1_up = X->
Def.
Tpow[2*isite1-2];
333 is1_down = X->
Def.
Tpow[2*isite1-1];
335 #pragma omp parallel for default(none) shared(list_Diagonal, list_1) firstprivate(i_max, is, dtmp_V) private(ibit) 336 for(j = 1;j <= i_max;j++){
375 long unsigned int isite1,
377 long unsigned int spin,
380 long unsigned int is1_up;
381 long unsigned int ibit1_up;
382 long unsigned int num1;
383 long unsigned int isigma1 =spin;
384 long unsigned int is1,ibit1;
402 is1 = X->
Def.
Tpow[2 * isite1 - 2];
405 is1 = X->
Def.
Tpow[2 * isite1 - 1];
407 ibit1 = (
unsigned long int)
myrank & is1;
409 #pragma omp parallel for default(none) shared(list_Diagonal) \ 410 firstprivate(i_max, dtmp_V, num1) private(j) 411 for (j = 1; j <= i_max; j++)
list_Diagonal[j] += num1*dtmp_V;
419 is1_up = X->
Def.
Tpow[isite1 - 1];
420 ibit1_up = (((
unsigned long int)
myrank& is1_up) / is1_up) ^ (1 - spin);
421 #pragma omp parallel for default(none) shared(list_Diagonal) \ 422 firstprivate(i_max, dtmp_V, ibit1_up) private(j) 423 for (j = 1; j <= i_max; j++)
list_Diagonal[j] += dtmp_V * ibit1_up;
429 #pragma omp parallel for default(none) shared(list_Diagonal) \ 430 firstprivate(i_max, dtmp_V) private(j) 453 #pragma omp parallel for default(none) shared(list_1, list_Diagonal) firstprivate(i_max, dtmp_V, is1) private(num1, ibit1) 454 for(j = 1;j <= i_max;j++){
472 #pragma omp parallel for default(none) shared(list_1, list_Diagonal) firstprivate(i_max, dtmp_V, is1) private(num1, ibit1) 473 for(j = 1;j <= i_max;j++){
483 is1_up = X->
Def.
Tpow[isite1-1];
484 #pragma omp parallel for default(none) shared(list_1, list_Diagonal) firstprivate(i_max, dtmp_V, is1_up, spin) private(num1, ibit1_up) 485 for(j = 1;j <= i_max;j++){
486 ibit1_up=(((j-1)& is1_up)/is1_up)^(1-spin);
491 #pragma omp parallel for default(none) shared(list_Diagonal) firstprivate(i_max, dtmp_V, isite1, isigma1, X) private(j, num1) 492 for(j = 1;j <= i_max; j++){
503 is1_up = X->
Def.
Tpow[isite1-1];
504 #pragma omp parallel for default(none) shared(list_1, list_Diagonal) firstprivate(i_max, dtmp_V, is1_up, spin) private(num1, ibit1_up) 505 for(j = 1;j <= i_max;j++){
506 ibit1_up=((
list_1[j]& is1_up)/is1_up)^(1-spin);
511 #pragma omp parallel for default(none) shared(list_Diagonal, list_1) firstprivate(i_max, dtmp_V, isite1, isigma1, X) private(j, num1) 512 for(j = 1;j <= i_max; j++){
545 long unsigned int isite1,
546 long unsigned int isite2,
552 long unsigned int is1_up, is1_down;
553 long unsigned int ibit1_up, ibit1_down;
554 long unsigned int num1;
555 long unsigned int is2_up, is2_down;
556 long unsigned int ibit2_up, ibit2_down;
557 long unsigned int num2;
565 if (isite2 < isite1) {
582 is1_up = X->
Def.
Tpow[2 * isite1 - 2];
583 is1_down = X->
Def.
Tpow[2 * isite1 - 1];
584 is2_up = X->
Def.
Tpow[2 * isite2 - 2];
585 is2_down = X->
Def.
Tpow[2 * isite2 - 1];
590 ibit1_up = (
unsigned long int)
myrank&is1_up;
591 num1 += ibit1_up / is1_up;
592 ibit1_down = (
unsigned long int)
myrank&is1_down;
593 num1 += ibit1_down / is1_down;
595 ibit2_up = (
unsigned long int)
myrank&is2_up;
596 num2 += ibit2_up / is2_up;
597 ibit2_down = (
unsigned long int)
myrank&is2_down;
598 num2 += ibit2_down / is2_down;
600 #pragma omp parallel for default(none) shared(list_Diagonal) \ 601 firstprivate(i_max, dtmp_V, num1, num2) private(j) 602 for (j = 1; j <= i_max; j++)
list_Diagonal[j] += num1*num2*dtmp_V;
608 #pragma omp parallel for default(none) shared(list_Diagonal) firstprivate(i_max, dtmp_V) 609 for (j = 1; j <= i_max; j++) {
630 is1_up = X->
Def.
Tpow[2 * isite1 - 2];
631 is1_down = X->
Def.
Tpow[2 * isite1 - 1];
632 is2_up = X->
Def.
Tpow[2 * isite2 - 2];
633 is2_down = X->
Def.
Tpow[2 * isite2 - 1];
635 ibit2_up = (
unsigned long int)
myrank&is2_up;
636 num2 += ibit2_up / is2_up;
637 ibit2_down = (
unsigned long int)
myrank&is2_down;
638 num2 += ibit2_down / is2_down;
654 #pragma omp parallel for default(none) shared(list_Diagonal) \ 655 firstprivate(i_max, dtmp_V, num2, is1_up, is1_down) \ 656 private(num1, ibit1_up, ibit1_down, j) 657 for (j = 1; j <= i_max; j++) {
659 ibit1_up = (j - 1)&is1_up;
660 num1 += ibit1_up / is1_up;
661 ibit1_down = (j - 1)&is1_down;
662 num1 += ibit1_down / is1_down;
673 #pragma omp parallel for default(none) shared(list_1, list_Diagonal) \ 674 firstprivate(i_max, dtmp_V, is1_up, is1_down, num2) \ 675 private(num1, ibit1_up, ibit1_down, j) 676 for (j = 1; j <= i_max; j++) {
678 ibit1_up =
list_1[j] & is1_up;
679 num1 += ibit1_up / is1_up;
680 ibit1_down =
list_1[j] & is1_down;
681 num1 += ibit1_down / is1_down;
689 #pragma omp parallel for default(none) shared(list_Diagonal) firstprivate(i_max, dtmp_V) 690 for (j = 1; j <= i_max; j++) {
707 is1_up = X->
Def.
Tpow[2*isite1-2];
708 is1_down = X->
Def.
Tpow[2*isite1-1];
709 is2_up = X->
Def.
Tpow[2*isite2-2];
710 is2_down = X->
Def.
Tpow[2*isite2-1];
711 #pragma omp parallel for default(none) shared( list_Diagonal) firstprivate(i_max, dtmp_V, is1_up, is1_down, is2_up, is2_down) private(num1, ibit1_up, ibit1_down, num2, ibit2_up, ibit2_down) 712 for(j = 1;j <= i_max;j++){
715 ibit1_up=(j-1)&is1_up;
716 num1+=ibit1_up/is1_up;
717 ibit1_down=(j-1)&is1_down;
718 num1+=ibit1_down/is1_down;
720 ibit2_up=(j-1)&is2_up;
721 num2+=ibit2_up/is2_up;
722 ibit2_down=(j-1)&is2_down;
723 num2+=ibit2_down/is2_down;
731 is1_up = X->
Def.
Tpow[2*isite1-2];
732 is1_down = X->
Def.
Tpow[2*isite1-1];
733 is2_up = X->
Def.
Tpow[2*isite2-2];
734 is2_down = X->
Def.
Tpow[2*isite2-1];
736 #pragma omp parallel for default(none) shared(list_1, list_Diagonal) firstprivate(i_max, dtmp_V, is1_up, is1_down, is2_up, is2_down) private(num1, ibit1_up, ibit1_down, num2, ibit2_up, ibit2_down) 737 for(j = 1;j <= i_max;j++){
740 ibit1_up=
list_1[j]&is1_up;
741 num1+=ibit1_up/is1_up;
742 ibit1_down=
list_1[j]&is1_down;
743 num1+=ibit1_down/is1_down;
745 ibit2_up=
list_1[j]&is2_up;
746 num2+=ibit2_up/is2_up;
747 ibit2_down=
list_1[j]&is2_down;
748 num2+=ibit2_down/is2_down;
756 #pragma omp parallel for default(none) shared(list_Diagonal) firstprivate(i_max, dtmp_V) 757 for(j = 1;j <= i_max; j++){
786 long unsigned int isite1,
787 long unsigned int isite2,
792 long unsigned int is1_up, is1_down;
793 long unsigned int ibit1_up, ibit1_down;
794 long unsigned int num1_up, num1_down;
795 long unsigned int is2_up, is2_down;
796 long unsigned int ibit2_up, ibit2_down;
797 long unsigned int num2_up, num2_down;
799 long unsigned int is_up;
800 long unsigned int ibit;
806 if (isite2 < isite1) {
823 is1_up = X->
Def.
Tpow[2 * isite1 - 2];
824 is1_down = X->
Def.
Tpow[2 * isite1 - 1];
825 is2_up = X->
Def.
Tpow[2 * isite2 - 2];
826 is2_down = X->
Def.
Tpow[2 * isite2 - 1];
833 ibit1_up = (
unsigned long int)
myrank &is1_up;
834 num1_up = ibit1_up / is1_up;
835 ibit1_down = (
unsigned long int)
myrank &is1_down;
836 num1_down = ibit1_down / is1_down;
838 ibit2_up = (
unsigned long int)
myrank &is2_up;
839 num2_up = ibit2_up / is2_up;
840 ibit2_down = (
unsigned long int)
myrank &is2_down;
841 num2_down = ibit2_down / is2_down;
843 #pragma omp parallel for default(none) shared(list_Diagonal) \ 844 firstprivate(i_max, dtmp_V, num1_up, num1_down, num2_up, num2_down) private(j) 845 for (j = 1; j <= i_max; j++)
846 list_Diagonal[j] += dtmp_V*(num1_up*num2_up + num1_down*num2_down);
853 is1_up = X->
Def.
Tpow[isite1 - 1];
854 is2_up = X->
Def.
Tpow[isite2 - 1];
855 is_up = is1_up + is2_up;
856 ibit = (
unsigned long int)
myrank & is_up;
857 if (ibit == 0 || ibit == is_up) {
858 #pragma omp parallel for default(none) shared(list_Diagonal) \ 859 firstprivate(i_max, dtmp_V) private(j) 878 is1_up = X->
Def.
Tpow[2 * isite1 - 2];
879 is1_down = X->
Def.
Tpow[2 * isite1 - 1];
880 is2_up = X->
Def.
Tpow[2 * isite2 - 2];
881 is2_down = X->
Def.
Tpow[2 * isite2 - 1];
886 ibit2_up = (
unsigned long int)
myrank &is2_up;
887 num2_up = ibit2_up / is2_up;
888 ibit2_down = (
unsigned long int)
myrank &is2_down;
889 num2_down = ibit2_down / is2_down;
891 #pragma omp parallel for default(none) shared( list_Diagonal) \ 892 firstprivate(i_max, dtmp_V, num2_up, num2_down, is1_up, is1_down) \ 893 private(num1_up, num1_down, ibit1_up, ibit1_down, j) 894 for (j = 1; j <= i_max; j++) {
898 ibit1_up = (j - 1)&is1_up;
899 num1_up = ibit1_up / is1_up;
900 ibit1_down = (j - 1)&is1_down;
901 num1_down = ibit1_down / is1_down;
903 list_Diagonal[j] += dtmp_V*(num1_up*num2_up + num1_down*num2_down);
911 is1_up = X->
Def.
Tpow[2 * isite1 - 2];
912 is1_down = X->
Def.
Tpow[2 * isite1 - 1];
913 is2_up = X->
Def.
Tpow[2 * isite2 - 2];
914 is2_down = X->
Def.
Tpow[2 * isite2 - 1];
919 ibit2_up = (
unsigned long int)
myrank&is2_up;
920 num2_up = ibit2_up / is2_up;
921 ibit2_down = (
unsigned long int)
myrank&is2_down;
922 num2_down = ibit2_down / is2_down;
924 #pragma omp parallel for default(none) shared(list_1, list_Diagonal) \ 925 firstprivate(i_max, dtmp_V, num2_up, num2_down, is1_up, is1_down) \ 926 private(num1_up, num1_down, ibit1_up, ibit1_down, j) 927 for (j = 1; j <= i_max; j++) {
931 ibit1_up =
list_1[j] & is1_up;
932 num1_up = ibit1_up / is1_up;
933 ibit1_down =
list_1[j] & is1_down;
934 num1_down = ibit1_down / is1_down;
936 list_Diagonal[j] += dtmp_V*(num1_up*num2_up + num1_down*num2_down);
941 is1_up = X->
Def.
Tpow[isite1 - 1];
942 is2_up = X->
Def.
Tpow[isite2 - 1];
943 ibit2_up = (
unsigned long int)
myrank & is2_up;
945 if (ibit2_up == is2_up) {
946 #pragma omp parallel for default(none) shared(list_Diagonal) \ 947 firstprivate(i_max, dtmp_V, is1_up) private(j, ibit1_up) 948 for (j = 1; j <= i_max; j++) {
949 ibit1_up = (j - 1) & is1_up;
950 if (ibit1_up == is1_up) {
955 else if(ibit2_up == 0){
956 #pragma omp parallel for default(none) shared(list_Diagonal) \ 957 firstprivate(i_max, dtmp_V, is1_up) private(j, ibit1_up) 958 for (j = 1; j <= i_max; j++) {
959 ibit1_up = (j - 1) & is1_up;
968 is1_up = X->
Def.
Tpow[isite1 - 1];
969 is2_up = X->
Def.
Tpow[isite2 - 1];
970 ibit2_up = (
unsigned long int)
myrank & is2_up;
972 if (ibit2_up == is2_up) {
973 #pragma omp parallel for default(none) shared(list_1, list_Diagonal) \ 974 firstprivate(i_max, dtmp_V, is1_up) private(j, ibit1_up) 975 for (j = 1; j <= i_max; j++) {
976 ibit1_up =
list_1[j] & is1_up;
977 if (ibit1_up == is1_up) {
982 else if (ibit2_up == 0) {
983 #pragma omp parallel for default(none) shared(list_1, list_Diagonal) \ 984 firstprivate(i_max, dtmp_V, is1_up) private(j, ibit1_up) 985 for (j = 1; j <= i_max; j++) {
986 ibit1_up =
list_1[j] & is1_up;
1006 is1_up = X->
Def.
Tpow[2*isite1-2];
1007 is1_down = X->
Def.
Tpow[2*isite1-1];
1008 is2_up = X->
Def.
Tpow[2*isite2-2];
1009 is2_down = X->
Def.
Tpow[2*isite2-1];
1011 #pragma omp parallel for default(none) shared( list_Diagonal) firstprivate(i_max, dtmp_V, is1_up, is1_down, is2_up, is2_down) private(num1_up, num1_down, num2_up, num2_down, ibit1_up, ibit1_down, ibit2_up, ibit2_down) 1012 for(j = 1; j <= i_max;j++){
1018 ibit1_up=(j-1)&is1_up;
1019 num1_up=ibit1_up/is1_up;
1020 ibit1_down=(j-1)&is1_down;
1021 num1_down=ibit1_down/is1_down;
1023 ibit2_up=(j-1)&is2_up;
1024 num2_up=ibit2_up/is2_up;
1025 ibit2_down=(j-1)&is2_down;
1026 num2_down=ibit2_down/is2_down;
1028 list_Diagonal[j]+=dtmp_V*(num1_up*num2_up+num1_down*num2_down);
1034 is1_up = X->
Def.
Tpow[2*isite1-2];
1035 is1_down = X->
Def.
Tpow[2*isite1-1];
1036 is2_up = X->
Def.
Tpow[2*isite2-2];
1037 is2_down = X->
Def.
Tpow[2*isite2-1];
1039 #pragma omp parallel for default(none) shared(list_1, list_Diagonal) firstprivate(i_max, dtmp_V, is1_up, is1_down, is2_up, is2_down) private(num1_up, num1_down, num2_up, num2_down, ibit1_up, ibit1_down, ibit2_up, ibit2_down) 1040 for(j = 1; j <= i_max;j++){
1046 ibit1_up=
list_1[j]&is1_up;
1047 num1_up=ibit1_up/is1_up;
1048 ibit1_down=
list_1[j]&is1_down;
1049 num1_down=ibit1_down/is1_down;
1051 ibit2_up=
list_1[j]&is2_up;
1052 num2_up=ibit2_up/is2_up;
1053 ibit2_down=
list_1[j]&is2_down;
1054 num2_down=ibit2_down/is2_down;
1056 list_Diagonal[j]+=dtmp_V*(num1_up*num2_up+num1_down*num2_down);
1061 is1_up = X->
Def.
Tpow[isite1-1];
1062 is2_up = X->
Def.
Tpow[isite2-1];
1063 is_up = is1_up+is2_up;
1064 #pragma omp parallel for default(none) shared(list_1, list_Diagonal) firstprivate(i_max, dtmp_V, is1_up, is2_up, is_up) private(j, ibit) 1065 for(j = 1;j <= i_max;j++){
1066 ibit = (j-1) & is_up;
1067 if(ibit == 0 || ibit == is_up){
1074 is1_up = X->
Def.
Tpow[isite1-1];
1075 is2_up = X->
Def.
Tpow[isite2-1];
1076 is_up = is1_up+is2_up;
1077 #pragma omp parallel for default(none) shared(list_1, list_Diagonal) firstprivate(i_max, dtmp_V, is1_up, is2_up, is_up) private(j, ibit) 1078 for(j = 1;j <= i_max;j++){
1079 ibit =
list_1[j] & is_up;
1080 if(ibit == 0 || ibit == is_up){
1111 long unsigned int isite1,
1112 long unsigned int isite2,
1113 long unsigned int isigma1,
1114 long unsigned int isigma2,
1119 long unsigned int is1_spin;
1120 long unsigned int is2_spin;
1121 long unsigned int is1_up;
1122 long unsigned int is2_up;
1124 long unsigned int ibit1_spin;
1125 long unsigned int ibit2_spin;
1127 long unsigned int num1;
1128 long unsigned int num2;
1130 long unsigned int j;
1136 if (isite2 < isite1) {
1156 is1_spin = X->
Def.
Tpow[2 * isite1 - 2 + isigma1];
1157 is2_spin = X->
Def.
Tpow[2 * isite2 - 2 + isigma2];
1160 ibit1_spin = (
unsigned long int)
myrank&is1_spin;
1161 num1 += ibit1_spin / is1_spin;
1164 ibit2_spin = (
unsigned long int)
myrank&is2_spin;
1165 num2 += ibit2_spin / is2_spin;
1167 #pragma omp parallel for default(none) shared(list_Diagonal) \ 1168 firstprivate(i_max, dtmp_V, num2, num1) private(ibit1_spin, j) 1169 for (j = 1; j <= i_max; j++)
list_Diagonal[j] += num1*num2*dtmp_V;
1177 is1_up = X->
Def.
Tpow[isite1 - 1];
1178 is2_up = X->
Def.
Tpow[isite2 - 1];
1182 #pragma omp parallel for default(none) shared(list_Diagonal) \ 1183 firstprivate(i_max, dtmp_V, is1_up, isigma1, X, num1, num2) private(j) 1184 for (j = 1; j <= i_max; j++) {
1193 if (num1 !=0 && num2 != 0) {
1194 #pragma omp parallel for default(none) shared(list_Diagonal) \ 1195 firstprivate(i_max, dtmp_V, num1, X) private(j) 1196 for (j = 1; j <= i_max; j++)
list_Diagonal[j] += dtmp_V*num1;
1217 is1_spin = X->
Def.
Tpow[2 * isite1 - 2 + isigma1];
1218 is2_spin = X->
Def.
Tpow[2 * isite2 - 2 + isigma2];
1221 ibit2_spin = (
unsigned long int)
myrank&is2_spin;
1222 num2 += ibit2_spin / is2_spin;
1224 #pragma omp parallel for default(none) shared(list_Diagonal) \ 1225 firstprivate(i_max, dtmp_V, is1_spin, num2) private(num1, ibit1_spin, j) 1226 for (j = 1; j <= i_max; j++) {
1228 ibit1_spin = (j - 1)&is1_spin;
1229 num1 += ibit1_spin / is1_spin;
1238 is1_spin = X->
Def.
Tpow[2 * isite1 - 2 + isigma1];
1239 is2_spin = X->
Def.
Tpow[2 * isite2 - 2 + isigma2];
1242 ibit2_spin = (
unsigned long int)
myrank&is2_spin;
1243 num2 += ibit2_spin / is2_spin;
1245 #pragma omp parallel for default(none) shared(list_Diagonal, list_1) \ 1246 firstprivate(i_max, dtmp_V, is1_spin, num2) private(num1, ibit1_spin, j) 1247 for (j = 1; j <= i_max; j++) {
1249 ibit1_spin =
list_1[j] & is1_spin;
1250 num1 += ibit1_spin / is1_spin;
1258 is1_up = X->
Def.
Tpow[isite1 - 1];
1259 is2_up = X->
Def.
Tpow[isite2 - 1];
1262 #pragma omp parallel for default(none) shared(list_Diagonal) \ 1263 firstprivate(i_max, dtmp_V, is1_up, isigma1, X, num2) private(j, num1) 1264 for (j = 1; j <= i_max; j++) {
1273 #pragma omp parallel for default(none) shared(list_Diagonal) \ 1274 firstprivate(i_max, dtmp_V, isite1, isigma1, X) private(j, num1) 1275 for (j = 1; j <= i_max; j++) {
1287 is1_up = X->
Def.
Tpow[isite1 - 1];
1288 is2_up = X->
Def.
Tpow[isite2 - 1];
1291 #pragma omp parallel for default(none) shared(list_Diagonal) \ 1292 firstprivate(i_max, dtmp_V, is1_up, isigma1, X, num2) private(j, num1) 1293 for (j = 1; j <= i_max; j++) {
1302 #pragma omp parallel for default(none) shared(list_Diagonal, list_1) \ 1303 firstprivate(i_max, dtmp_V, isite1, isigma1, X) private(j, num1) 1304 for (j = 1; j <= i_max; j++) {
1325 is1_spin = X->
Def.
Tpow[2*isite1-2+isigma1];
1326 is2_spin = X->
Def.
Tpow[2*isite2-2+isigma2];
1327 #pragma omp parallel for default(none) shared(list_Diagonal) firstprivate(i_max, dtmp_V, is1_spin, is2_spin) private(num1, ibit1_spin, num2, ibit2_spin) 1328 for(j = 1;j <= i_max;j++){
1331 ibit1_spin=(j-1)&is1_spin;
1332 num1+=ibit1_spin/is1_spin;
1333 ibit2_spin=(j-1)&is2_spin;
1334 num2+=ibit2_spin/is2_spin;
1341 is1_spin = X->
Def.
Tpow[2*isite1-2+isigma1];
1342 is2_spin = X->
Def.
Tpow[2*isite2-2+isigma2];
1344 #pragma omp parallel for default(none) shared(list_Diagonal, list_1) firstprivate(i_max, dtmp_V, is1_spin, is2_spin) private(num1, ibit1_spin, num2, ibit2_spin) 1345 for(j = 1;j <= i_max;j++){
1348 ibit1_spin=
list_1[j]&is1_spin;
1349 num1+=ibit1_spin/is1_spin;
1351 ibit2_spin=
list_1[j]&is2_spin;
1352 num2+=ibit2_spin/is2_spin;
1359 is1_up = X->
Def.
Tpow[isite1-1];
1360 is2_up = X->
Def.
Tpow[isite2-1];
1361 #pragma omp parallel for default(none) shared(list_Diagonal) firstprivate(i_max, dtmp_V, is1_up, is2_up, isigma1, isigma2, X) private(j, num1, num2) 1362 for(j = 1;j <= i_max; j++){
1369 #pragma omp parallel for default(none) shared(list_Diagonal, list_1) firstprivate(i_max, dtmp_V, isite1, isite2, isigma1, isigma2, X) private(j, num1) 1370 for(j = 1;j <= i_max; j++){
1383 is1_up = X->
Def.
Tpow[isite1-1];
1384 is2_up = X->
Def.
Tpow[isite2-1];
1385 #pragma omp parallel for default(none) shared(list_Diagonal) firstprivate(i_max, dtmp_V, is1_up, is2_up, isigma1, isigma2, X) private(j, num1, num2) 1386 for(j = 1;j <= i_max; j++){
1393 #pragma omp parallel for default(none) shared(list_Diagonal) firstprivate(i_max, dtmp_V, isite1, isite2, isigma1, isigma2, X) private(j, num1) 1394 for(j = 1;j <= i_max; j++){
1432 long unsigned int isite1,
1433 long unsigned int isite2,
1434 long unsigned int isigma1,
1435 long unsigned int isigma2,
1438 double complex *tmp_v0,
1439 double complex *tmp_v1
1441 long unsigned int is1_spin;
1442 long unsigned int is2_spin;
1443 long unsigned int is1_up;
1444 long unsigned int is2_up;
1446 long unsigned int ibit1_spin;
1447 long unsigned int ibit2_spin;
1449 long unsigned int num1;
1450 long unsigned int num2;
1452 long unsigned int j;
1454 double complex dam_pr=0.0;
1460 if (isite2 < isite1) {
1479 is1_spin = X->
Def.
Tpow[2 * isite1 - 2 + isigma1];
1480 is2_spin = X->
Def.
Tpow[2 * isite2 - 2 + isigma2];
1482 ibit1_spin = (
unsigned long int)
myrank&is1_spin;
1483 num1 += ibit1_spin / is1_spin;
1485 ibit2_spin = (
unsigned long int)
myrank&is2_spin;
1486 num2 += ibit2_spin / is2_spin;
1492 is1_up = X->
Def.
Tpow[isite1 - 1];
1493 is2_up = X->
Def.
Tpow[isite2 - 1];
1510 if (num1 * num2 != 0) {
1511 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1) \ 1512 firstprivate(i_max, dtmp_V) private(j) 1513 for (j = 1; j <= i_max; j++) {
1514 tmp_v0[j] += dtmp_V * tmp_v1[j];
1515 dam_pr += dtmp_V * conj(tmp_v1[j]) * tmp_v1[j];
1529 is1_spin = X->
Def.
Tpow[2 * isite1 - 2 + isigma1];
1530 is2_spin = X->
Def.
Tpow[2 * isite2 - 2 + isigma2];
1533 ibit2_spin = (
unsigned long int)
myrank&is2_spin;
1534 num2 += ibit2_spin / is2_spin;
1536 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1)\ 1537 firstprivate(i_max, dtmp_V, is1_spin) private(num1, ibit1_spin, j) 1538 for (j = 1; j <= i_max; j++) {
1540 ibit1_spin = (j - 1) & is1_spin;
1541 num1 += ibit1_spin / is1_spin;
1542 tmp_v0[j] += dtmp_V * num1 * tmp_v1[j];
1543 dam_pr += dtmp_V * num1 * conj(tmp_v1[j]) * tmp_v1[j];
1552 is1_spin = X->
Def.
Tpow[2 * isite1 - 2 + isigma1];
1553 is2_spin = X->
Def.
Tpow[2 * isite2 - 2 + isigma2];
1556 ibit2_spin = (
unsigned long int)
myrank&is2_spin;
1557 num2 += ibit2_spin / is2_spin;
1559 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1, list_1)\ 1560 firstprivate(i_max, dtmp_V, is1_spin) private(num1, ibit1_spin, j) 1561 for (j = 1; j <= i_max; j++) {
1563 ibit1_spin =
list_1[j] & is1_spin;
1564 num1 += ibit1_spin / is1_spin;
1565 tmp_v0[j] += dtmp_V *num1*tmp_v1[j];
1566 dam_pr += dtmp_V * num1*conj(tmp_v1[j]) * tmp_v1[j];
1574 is1_up = X->
Def.
Tpow[isite1 - 1];
1575 is2_up = X->
Def.
Tpow[isite2 - 1];
1579 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1)\ 1580 firstprivate(i_max, dtmp_V, is1_up, isigma1, X) private(num1, j) 1581 for (j = 1; j <= i_max; j++) {
1583 tmp_v0[j] += dtmp_V * num1 * tmp_v1[j];
1584 dam_pr += dtmp_V * num1*conj(tmp_v1[j]) * tmp_v1[j];
1592 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1) \ 1593 firstprivate(i_max, dtmp_V, isite1, isigma1, X) private(j, num1) 1594 for (j = 1; j <= i_max; j++) {
1596 tmp_v0[j] += dtmp_V * num1 * tmp_v1[j];
1597 dam_pr += dtmp_V * num1*conj(tmp_v1[j]) * tmp_v1[j];
1607 is1_up = X->
Def.
Tpow[isite1 - 1];
1608 is2_up = X->
Def.
Tpow[isite2 - 1];
1612 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1) \ 1613 firstprivate(i_max, dtmp_V, is1_up, isigma1, X, num2) private(j, num1) 1614 for (j = 1; j <= i_max; j++) {
1616 tmp_v0[j] += dtmp_V * num1 * tmp_v1[j];
1617 dam_pr += dtmp_V * num1*conj(tmp_v1[j]) * tmp_v1[j];
1625 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1, list_1)\ 1626 firstprivate(i_max, dtmp_V, isite1, isigma1, X) private(j, num1) 1627 for (j = 1; j <= i_max; j++) {
1629 tmp_v0[j] += dtmp_V * num1 * tmp_v1[j];
1630 dam_pr += dtmp_V * num1*conj(tmp_v1[j]) * tmp_v1[j];
1649 is1_spin = X->
Def.
Tpow[2*isite1-2+isigma1];
1650 is2_spin = X->
Def.
Tpow[2*isite2-2+isigma2];
1651 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1) firstprivate(i_max, dtmp_V, is1_spin, is2_spin) private(num1, ibit1_spin, num2, ibit2_spin) 1652 for(j = 1;j <= i_max;j++){
1655 ibit1_spin=(j-1)&is1_spin;
1656 num1+=ibit1_spin/is1_spin;
1657 ibit2_spin=(j-1)&is2_spin;
1658 num2+=ibit2_spin/is2_spin;
1659 tmp_v0[j] += dtmp_V * num1*num2*tmp_v1[j];
1660 dam_pr += dtmp_V * num1*num2*conj(tmp_v1[j]) * tmp_v1[j];
1666 is1_spin = X->
Def.
Tpow[2*isite1-2+isigma1];
1667 is2_spin = X->
Def.
Tpow[2*isite2-2+isigma2];
1669 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1, list_1) firstprivate(i_max, dtmp_V, is1_spin, is2_spin) private(num1, ibit1_spin, num2, ibit2_spin) 1670 for(j = 1;j <= i_max;j++){
1673 ibit1_spin=
list_1[j]&is1_spin;
1674 num1+=ibit1_spin/is1_spin;
1676 ibit2_spin=
list_1[j]&is2_spin;
1677 num2+=ibit2_spin/is2_spin;
1678 tmp_v0[j] += dtmp_V * num1*num2*tmp_v1[j];
1679 dam_pr += dtmp_V * num1*num2*conj(tmp_v1[j]) * tmp_v1[j];
1685 is1_up = X->
Def.
Tpow[isite1-1];
1686 is2_up = X->
Def.
Tpow[isite2-1];
1687 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1) firstprivate(i_max, dtmp_V, is1_up, is2_up, isigma1, isigma2, X) private(j, num1, num2) 1688 for(j = 1;j <= i_max; j++){
1691 tmp_v0[j] += dtmp_V * num1*num2*tmp_v1[j];
1692 dam_pr += dtmp_V * num1*num2*conj(tmp_v1[j]) * tmp_v1[j];
1696 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1, list_1) firstprivate(i_max, dtmp_V, isite1, isite2, isigma1, isigma2, X) private(j, num1) 1697 for(j = 1;j <= i_max; j++){
1701 tmp_v0[j] += dtmp_V *num1*tmp_v1[j];
1702 dam_pr += dtmp_V * num1*conj(tmp_v1[j]) * tmp_v1[j];
1711 is1_up = X->
Def.
Tpow[isite1-1];
1712 is2_up = X->
Def.
Tpow[isite2-1];
1713 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1) firstprivate(i_max, dtmp_V, is1_up, is2_up, isigma1, isigma2, X) private(j, num1, num2) 1714 for(j = 1;j <= i_max; j++){
1717 tmp_v0[j] += dtmp_V * num1*num2*tmp_v1[j];
1718 dam_pr += dtmp_V * num1*num2*conj(tmp_v1[j]) * tmp_v1[j];
1722 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1) firstprivate(i_max, dtmp_V, isite1, isite2, isigma1, isigma2, X) private(j, num1) 1723 for(j = 1;j <= i_max; j++){
1727 tmp_v0[j] += dtmp_V *num1*tmp_v1[j];
1728 dam_pr += dtmp_V * num1*conj(tmp_v1[j]) * tmp_v1[j];
1763 long unsigned int isite1,
1764 long unsigned int spin,
1767 double complex *tmp_v0,
1768 double complex *tmp_v1
1770 long unsigned int is1_up;
1771 long unsigned int num1;
1772 long unsigned int isigma1 =spin;
1773 long unsigned int is1,ibit1;
1775 long unsigned int j;
1777 double complex dam_pr=0;
1792 is1 = X->
Def.
Tpow[2 * isite1 - 2];
1795 is1 = X->
Def.
Tpow[2 * isite1 - 1];
1797 ibit1 = (
unsigned long int)
myrank & is1;
1805 is1_up = X->
Def.
Tpow[isite1 - 1];
1806 num1 = (((
unsigned long int)
myrank& is1_up) / is1_up) ^ (1 - spin);
1820 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1) \ 1821 firstprivate(i_max, dtmp_V) private(j) 1822 for (j = 1; j <= i_max; j++){
1823 tmp_v0[j] += dtmp_V * tmp_v1[j];
1824 dam_pr += dtmp_V * conj(tmp_v1[j]) * tmp_v1[j];
1836 is1 = X->
Def.
Tpow[2*isite1-2];
1838 is1 = X->
Def.
Tpow[2*isite1-1];
1841 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1) firstprivate(i_max, dtmp_V, is1) private(num1, ibit1) 1842 for(j = 1;j <= i_max;j++){
1845 tmp_v0[j] += dtmp_V * num1*tmp_v1[j];
1846 dam_pr += dtmp_V * num1*conj(tmp_v1[j]) * tmp_v1[j];
1853 is1 = X->
Def.
Tpow[2*isite1-2];
1855 is1 = X->
Def.
Tpow[2*isite1-1];
1858 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(list_1, tmp_v0, tmp_v1) firstprivate(i_max, dtmp_V, is1) private(num1, ibit1) 1859 for(j = 1;j <= i_max;j++){
1863 tmp_v0[j] += dtmp_V * num1*tmp_v1[j];
1864 dam_pr += dtmp_V * num1*conj(tmp_v1[j]) * tmp_v1[j];
1870 is1_up = X->
Def.
Tpow[isite1-1];
1871 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(list_1, tmp_v0, tmp_v1) firstprivate(i_max, dtmp_V, is1_up, spin) private(num1) 1872 for(j = 1;j <= i_max;j++){
1873 num1=(((j-1)& is1_up)/is1_up)^(1-spin);
1874 tmp_v0[j] += dtmp_V * num1*tmp_v1[j];
1875 dam_pr += dtmp_V * num1*conj(tmp_v1[j]) * tmp_v1[j];
1879 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1) firstprivate(i_max, dtmp_V, isite1, isigma1, X) private(j, num1) 1880 for(j = 1;j <= i_max; j++){
1883 tmp_v0[j] += dtmp_V * tmp_v1[j];
1884 dam_pr += dtmp_V * conj(tmp_v1[j]) * tmp_v1[j];
1892 is1_up = X->
Def.
Tpow[isite1-1];
1893 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(list_1, tmp_v0, tmp_v1) firstprivate(i_max, dtmp_V, is1_up, spin) private(num1) 1894 for(j = 1;j <= i_max;j++){
1895 num1=((
list_1[j]& is1_up)/is1_up)^(1-spin);
1896 tmp_v0[j] += dtmp_V * num1*tmp_v1[j];
1897 dam_pr += dtmp_V * num1*conj(tmp_v1[j]) * tmp_v1[j];
1901 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1, list_1) firstprivate(i_max, dtmp_V, isite1, isigma1, X) private(j, num1) 1902 for(j = 1;j <= i_max; j++){
1905 tmp_v0[j] += dtmp_V * tmp_v1[j];
1906 dam_pr += dtmp_V * conj(tmp_v1[j]) * tmp_v1[j];
1941 long unsigned int isite1,
1943 long unsigned int spin,
1945 double complex *tmp_v0,
1946 double complex *tmp_v1
1948 long unsigned int is1_up;
1949 long unsigned int ibit1_up;
1950 long unsigned int num1;
1951 long unsigned int isigma1 =spin;
1952 long unsigned int is1,ibit1;
1955 long unsigned int j;
1970 is1 = X->
Def.
Tpow[2 * isite1 - 2];
1973 is1 = X->
Def.
Tpow[2 * isite1 - 1];
1975 ibit1 = (
unsigned long int)
myrank & is1;
1982 is1_up = X->
Def.
Tpow[isite1 - 1];
1983 num1 = (((
unsigned long int)
myrank& is1_up) / is1_up) ^ (1 - spin);
1998 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1)\ 1999 firstprivate(i_max, dtmp_V) private(j) 2000 for (j = 1; j <= i_max; j++) {
2001 tmp_v0[j] += dtmp_V * tmp_v1[j];
2002 dam_pr += dtmp_V * conj(tmp_v1[j]) * tmp_v1[j];
2010 is1 = X->
Def.
Tpow[2 * isite1 - 2];
2012 is1 = X->
Def.
Tpow[2 * isite1 - 1];
2014 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(list_1, tmp_v0, tmp_v1) \ 2015 firstprivate(i_max, dtmp_V, is1) private(num1, ibit1) 2016 for (j = 1; j <= i_max; j++) {
2017 ibit1 = (j - 1) & is1;
2019 tmp_v0[j] += dtmp_V * num1*tmp_v1[j];
2020 dam_pr += dtmp_V * num1*conj(tmp_v1[j]) * tmp_v1[j];
2028 is1 = X->
Def.
Tpow[2 * isite1 - 2];
2030 is1 = X->
Def.
Tpow[2 * isite1 - 1];
2032 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(list_1, tmp_v0, tmp_v1) \ 2033 firstprivate(i_max, dtmp_V, is1) private(num1, ibit1) 2034 for (j = 1; j <= i_max; j++) {
2037 tmp_v0[j] += dtmp_V * num1*tmp_v1[j];
2038 dam_pr += dtmp_V * num1*conj(tmp_v1[j]) * tmp_v1[j];
2044 is1_up = X->
Def.
Tpow[isite1 - 1];
2045 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(list_1, tmp_v0, tmp_v1) \ 2046 firstprivate(i_max, dtmp_V, is1_up, spin) private(num1, ibit1_up) 2047 for (j = 1; j <= i_max; j++) {
2048 ibit1_up = (((j - 1) & is1_up) / is1_up) ^ (1 - spin);
2049 tmp_v0[j] += dtmp_V * ibit1_up*tmp_v1[j];
2050 dam_pr += dtmp_V * ibit1_up*conj(tmp_v1[j]) * tmp_v1[j];
2053 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(tmp_v0, tmp_v1) \ 2054 firstprivate(i_max, dtmp_V, isite1, isigma1, X) private(j, num1) 2055 for (j = 1; j <= i_max; j++) {
2058 tmp_v0[j] += dtmp_V *tmp_v1[j];
2059 dam_pr += dtmp_V *conj(tmp_v1[j]) * tmp_v1[j];
2067 is1_up = X->
Def.
Tpow[isite1 - 1];
2068 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(list_1, tmp_v0, tmp_v1)\ 2069 firstprivate(i_max, dtmp_V, is1_up, spin) private(num1, ibit1_up) 2070 for (j = 1; j <= i_max; j++) {
2071 ibit1_up = ((
list_1[j] & is1_up) / is1_up) ^ (1 - spin);
2072 tmp_v0[j] += dtmp_V * ibit1_up * tmp_v1[j];
2073 dam_pr += dtmp_V * ibit1_up * conj(tmp_v1[j]) * tmp_v1[j];
2076 #pragma omp parallel for default(none) reduction(+:dam_pr) shared(list_1, tmp_v0, tmp_v1)\ 2077 firstprivate(i_max, dtmp_V, isite1, isigma1, X) private(j, num1) 2078 for (j = 1; j <= i_max; j++) {
2080 tmp_v0[j] += dtmp_V * num1 * tmp_v1[j];
2081 dam_pr += dtmp_V * num1 * conj(tmp_v1[j]) * tmp_v1[j];
const char * cFileNameCheckChemi
struct DefineList Def
Definision of system (Hamiltonian) etc.
unsigned int NHundCoupling
Number of Hund coupling.
int * EDSpinChemi
[DefineList::Nsite]
int SetDiagonalTEChemi(long unsigned int isite1, long unsigned int spin, double dtmp_V, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Update the vector by the chemical potential generated by the commutation relation in terms of the g...
double complex SumMPI_dc(double complex norm)
MPI wrapper function to obtain sum of Double complex across processes.
unsigned long int idim_max
The dimension of the Hilbert space of this process.
const char * cDiagonalCalcStart
double * ParaInterAll_Diagonal
[DefineList::NInterAll_Diagonal] Coupling constant of diagonal inter-all term. malloc in setmem_def()...
const char * cFileNameCheckHund
int *** TETransferDiagonal
double complex prdct
The expectation value of the energy.
int X_SpinGC_CisAis(long unsigned int j, struct BindStruct *X, long unsigned int is1_spin, long unsigned int sigma1)
Compute the grandcanonical spin state with bit mask is1_spin.
int SetDiagonalTEInterAll(long unsigned int isite1, long unsigned int isite2, long unsigned int isigma1, long unsigned int isigma2, double dtmp_V, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Update the vector by the general two-body diagonal interaction, . (Using in Time Evolution mode)...
struct LargeList Large
Variables for Matrix-Vector product.
int childfopenMPI(const char *_cPathChild, const char *_cmode, FILE **_fp)
Only the root process open file in output/ directory.
int SetDiagonalInterAll(long unsigned int isite1, long unsigned int isite2, long unsigned int isigma1, long unsigned int isigma2, double dtmp_V, struct BindStruct *X)
Calculate the components for general two-body diagonal interaction, .
int X_Spin_CisAis(long unsigned int j, struct BindStruct *X, long unsigned int is1_spin, long unsigned int sigma1)
Compute the spin state with bit mask is1_spin.
const char * cProStartCalcDiag
const char * cFileNameCheckCoulombIntra
int ** InterAll_Diagonal
[DefineList::NinterAll_Diagonal][4] Interacted quartet
double ** ParaTETransferDiagonal
int ** HundCoupling
[DefineList::NHundCoupling][2] Index of Hund coupling. malloc in setmem_def().
unsigned int NInterAll_Diagonal
Number of interall term (diagonal)
int diagonalcalc(struct BindStruct *X)
Calculate diagonal components and obtain the list, list_diagonal.
const char * cProEndCalcDiag
unsigned int Nsite
Number of sites in the INTRA process region.
double * ParaCoulombInter
[DefineList::NCoulombInter]Coupling constant of off-site Coulomb interaction. malloc in setmem_def()...
long unsigned int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
unsigned int NCoulombIntra
int SetDiagonalHund(long unsigned int isite1, long unsigned int isite2, double dtmp_V, struct BindStruct *X)
Calculate the components for Hund interaction, .
double * EDParaChemi
[DefineList::Nsite] On-site potential parameter. malloc in setmem_def().
const char * cFileNameCheckInterAll
int SetDiagonalCoulombIntra(long unsigned int isite1, double dtmp_V, struct BindStruct *X)
Calculate the components for Coulombintra interaction, .
int iFlgGeneralSpin
Flag for the general (Sz/=1/2) spin.
long unsigned int * list_1
int SetDiagonalTETransfer(long unsigned int isite1, double dtmp_V, long unsigned int spin, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Update the vector by the general one-body diagonal interaction, . (Using in Time Evolution mode)...
const char * cFileNameCheckInterU
char * cErrNoModel
Error Message in diagonal calc.c.
long int * SiteToBit
[DefineList::NsiteMPI] Similar to DefineList::Tpow. For general spin.
const char * cFileNameTimeKeep
unsigned int * NTEInterAllDiagonal
double ** ParaTEInterAllDiagonal
int BitCheckGeneral(const long unsigned int org_bit, const unsigned int org_isite, const unsigned int target_ispin, const long int *SiteToBit, const long unsigned int *Tpow)
bit check function for general spin
int SetDiagonalCoulombInter(long unsigned int isite1, long unsigned int isite2, double dtmp_V, struct BindStruct *X)
Calculate the components for Coulombinter interaction, .
const char * cDiagonalCalcFinish
double * ParaHundCoupling
[DefineList::NHundCoupling] Hund coupling constant. malloc in setmem_def().
int iCalcModel
Switch for model. 0:Hubbard, 1:Spin, 2:Kondo, 3:HubbardGC, 4:SpinGC, 5:KondoGC, 6:HubbardNConserved.
int diagonalcalcForTE(const int _istep, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
int SetDiagonalChemi(long unsigned int isite1, double dtmp_V, long unsigned int spin, struct BindStruct *X)
Calculate the components for the chemical potential .
unsigned int NCoulombInter
Number of off-site Coulomb interaction.
double * ParaCoulombIntra
unsigned int EDNChemi
Number of on-site term.
int *** TEInterAllDiagonal
int myrank
Process ID, defined in InitializeMPI()
int * EDChemi
[DefineList::Nsite] Chemical potential. malloc in setmem_def().
struct CheckList Check
Size of the Hilbert space.
unsigned int * NTETransferDiagonal
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()