17 #include "mltplyCommon.h" 18 #include "mltplySpinCore.h" 19 #include "wrapperMPI.h" 20 #include "mltplyMPISpin.h" 21 #include "mltplyMPISpinCore.h" 22 #include "expec_totalspin.h" 90 long unsigned int irght, ilft, ihfbit;
91 long unsigned int isite1, isite2;
92 long unsigned int is1_up, is2_up, is1_down, is2_down;
93 long unsigned int iexchg, off;
95 int num1_down, num2_down;
96 long unsigned int ibit1_up, ibit2_up, ibit1_down, ibit2_down;
97 double complex spn_z, tmp_spn_z;
105 for (isite1 = 1; isite1 <= X->
Def.
NsiteMPI; isite1++) {
106 is1_up = X->
Def.
Tpow[2 * isite1 - 2];
107 is1_down = X->
Def.
Tpow[2 * isite1 - 1];
109 for (isite2 = 1; isite2 <= X->
Def.
NsiteMPI; isite2++) {
110 is2_up = X->
Def.
Tpow[2 * isite2 - 2];
111 is2_down = X->
Def.
Tpow[2 * isite2 - 1];
113 #pragma omp parallel for reduction(+:spn, spn_z) default(none) firstprivate(i_max, is1_up, is1_down, is2_up, is2_down, irght, ilft, ihfbit, isite1, isite2) private(ibit1_up, num1_up, ibit2_up, num2_up, ibit1_down, num1_down, ibit2_down, num2_down, tmp_spn_z, iexchg, off) shared(vec, list_1, list_2_1, list_2_2) 114 for (j = 1; j <= i_max; j++) {
116 ibit1_up =
list_1[j] & is1_up;
117 num1_up = ibit1_up / is1_up;
118 ibit2_up =
list_1[j] & is2_up;
119 num2_up = ibit2_up / is2_up;
121 ibit2_down =
list_1[j] & is2_down;
122 num2_down = ibit2_down / is2_down;
123 ibit1_down =
list_1[j] & is1_down;
124 num1_down = ibit1_down / is1_down;
126 tmp_spn_z = (num1_up - num1_down) * (num2_up - num2_down);
127 spn += conj(vec[j]) * vec[j] * tmp_spn_z / 4.0;
128 if (isite1 == isite2) {
129 spn += conj(vec[j]) * vec[j] * (num1_up + num1_down - 2 * num1_up * num1_down) / 2.0;
130 spn_z += conj(vec[j]) * vec[j] * (num1_up - num1_down) / 2.0;
132 if (ibit1_up != 0 && ibit1_down == 0 && ibit2_up == 0 && ibit2_down != 0) {
133 iexchg =
list_1[j] - (is1_up + is2_down);
134 iexchg += (is2_up + is1_down);
136 spn += conj(vec[j]) * vec[off] / 2.0;
137 }
else if (ibit1_up == 0 && ibit1_down != 0 && ibit2_up != 0 && ibit2_down == 0) {
138 iexchg =
list_1[j] - (is1_down + is2_up);
139 iexchg += (is2_down + is1_up);
141 spn += conj(vec[j]) * vec[off] / 2.0;
148 X->
Phys.
Sz = creal(spn_z);
163 long unsigned int isite1, isite2;
164 long unsigned int is1_up, is2_up, is1_down, is2_down;
165 long unsigned int iexchg, off;
166 int num1_up, num2_up;
167 int num1_down, num2_down;
168 long unsigned int ibit1_up, ibit2_up, ibit1_down, ibit2_down, list_1_j;
169 double complex spn_z, tmp_spn_z;
171 long unsigned int i_max;
177 for (isite1 = 1; isite1 <= X->
Def.
NsiteMPI; isite1++) {
178 for (isite2 = 1; isite2 <= X->
Def.
NsiteMPI; isite2++) {
179 is1_up = X->
Def.
Tpow[2 * isite1 - 2];
180 is1_down = X->
Def.
Tpow[2 * isite1 - 1];
181 is2_up = X->
Def.
Tpow[2 * isite2 - 2];
182 is2_down = X->
Def.
Tpow[2 * isite2 - 1];
184 #pragma omp parallel for reduction(+:spn, spn_z) default(none) firstprivate(i_max, is1_up, is1_down, is2_up, is2_down, isite1, isite2) private(list_1_j, ibit1_up, num1_up, ibit2_up, num2_up, ibit1_down, num1_down, ibit2_down, num2_down, tmp_spn_z, iexchg, off) shared(vec) 185 for (j = 1; j <= i_max; j++) {
187 ibit1_up = list_1_j & is1_up;
188 num1_up = ibit1_up / is1_up;
189 ibit2_up = list_1_j & is2_up;
190 num2_up = ibit2_up / is2_up;
192 ibit1_down = list_1_j & is1_down;
193 num1_down = ibit1_down / is1_down;
194 ibit2_down = list_1_j & is2_down;
195 num2_down = ibit2_down / is2_down;
197 tmp_spn_z = (num1_up - num1_down) * (num2_up - num2_down);
198 spn += conj(vec[j]) * vec[j] * tmp_spn_z / 4.0;
199 if (isite1 == isite2) {
200 spn += conj(vec[j]) * vec[j] * (num1_up + num1_down - 2 * num1_up * num1_down) / 2.0;
201 spn_z += conj(vec[j]) * vec[j] * (num1_up - num1_down) / 2.0;
203 if (ibit1_up != 0 && ibit1_down == 0 && ibit2_up == 0 && ibit2_down != 0) {
204 iexchg = list_1_j - (is1_up + is2_down);
205 iexchg += (is2_up + is1_down);
207 spn += conj(vec[j]) * vec[off] / 2.0;
208 }
else if (ibit1_up == 0 && ibit1_down != 0 && ibit2_up != 0 && ibit2_down == 0) {
209 iexchg = list_1_j - (is1_down + is2_up);
210 iexchg += (is2_down + is1_up);
212 spn += conj(vec[j]) * vec[off] / 2.0;
219 X->
Phys.
Sz = creal(spn_z);
236 long unsigned int irght, ilft, ihfbit;
237 long unsigned int isite1, isite2;
238 long unsigned int tmp_isite1, tmp_isite2;
240 long unsigned int is1_up, is2_up;
241 long unsigned int iexchg, off, off_2;
243 int num1_up, num2_up;
244 int num1_down, num2_down;
245 int sigma_1, sigma_2;
246 long unsigned int ibit1_up, ibit2_up, ibit_tmp, is_up;
247 double complex spn_z = 0.0;
248 double complex spn_z1, spn_z2, spn_zd;
249 double complex spn = 0.0;
250 long unsigned int i_max;
258 for (isite1 = 1; isite1 <= X->
Def.
NsiteMPI; isite1++) {
259 for (isite2 = 1; isite2 <= X->
Def.
NsiteMPI; isite2++) {
263 is1_up = X->
Def.
Tpow[isite1 - 1];
264 is2_up = X->
Def.
Tpow[isite2 - 1];
265 is_up = is1_up + is2_up;
267 num1_down = 1 - num1_up;
269 num2_down = 1 - num2_up;
270 spn_z = (num1_up - num1_down) * (num2_up - num2_down);
272 #pragma omp parallel for default(none) reduction (+:spn_zd) shared(vec) \ 273 firstprivate(i_max, spn_z) private(j) 274 for (j = 1; j <= i_max; j++) {
275 spn_zd += conj(vec[j]) * vec[j] * spn_z / 4.0;
277 if (isite1 == isite2) {
278 #pragma omp parallel for default(none) reduction (+:spn_zd) shared(vec) \ 279 firstprivate(i_max) private(j) 280 for (j = 1; j <= i_max; j++) {
281 spn_zd += conj(vec[j]) * vec[j] / 2.0;
289 if (isite1 < isite2) {
297 is1_up = X->
Def.
Tpow[tmp_isite1 - 1];
298 is2_up = X->
Def.
Tpow[tmp_isite2 - 1];
300 num2_down = 1 - num2_up;
303 #pragma omp parallel for reduction(+: spn_zd) default(none) firstprivate(i_max, is1_up, num2_up, num2_down) private(ibit1_up, num1_up, num1_down, spn_z) shared(list_1, vec) 304 for (j = 1; j <= i_max; j++) {
305 ibit1_up =
list_1[j] & is1_up;
306 num1_up = ibit1_up / is1_up;
307 num1_down = 1 - num1_up;
308 spn_z = (num1_up - num1_down) * (num2_up - num2_down);
309 spn_zd += conj(vec[j]) * vec[j] * spn_z / 4.0;
311 if (isite1 < isite2) {
319 is1_up = X->
Def.
Tpow[isite1 - 1];
320 is2_up = X->
Def.
Tpow[isite2 - 1];
321 is_up = is1_up + is2_up;
323 #pragma omp parallel for reduction(+: spn, spn_zd) default(none) firstprivate(i_max, is_up, is1_up, is2_up, irght, ilft, ihfbit, isite1, isite2) private(ibit1_up, num1_up, ibit2_up, num2_up, num1_down, num2_down, spn_z, iexchg, off, ibit_tmp) shared(list_1, list_2_1, list_2_2, vec) 324 for (j = 1; j <= i_max; j++) {
325 ibit1_up =
list_1[j] & is1_up;
326 num1_up = ibit1_up / is1_up;
327 num1_down = 1 - num1_up;
328 ibit2_up =
list_1[j] & is2_up;
329 num2_up = ibit2_up / is2_up;
330 num2_down = 1 - num2_up;
332 spn_z = (num1_up - num1_down) * (num2_up - num2_down);
333 spn_zd += conj(vec[j]) * vec[j] * spn_z / 4.0;
335 if (isite1 == isite2) {
336 spn_zd += conj(vec[j]) * vec[j] / 2.0;
338 ibit_tmp = (num1_up) ^ (num2_up);
340 iexchg =
list_1[j] ^ (is_up);
342 spn += conj(vec[j]) * vec[off] / 2.0;
353 for (isite1 = 1; isite1 <= X->
Def.
NsiteMPI; isite1++) {
354 for (isite2 = 1; isite2 <= X->
Def.
NsiteMPI; isite2++) {
357 if (isite1 == isite2) {
358 #pragma omp parallel for reduction(+: spn, spn_z) default(none) firstprivate(i_max, isite1, X, S1) private (spn_z1)shared(vec, list_1) 359 for (j = 1; j <= i_max; j++) {
361 spn += conj(vec[j]) * vec[j] * S1 * (S1 + 1.0);
362 spn_z += conj(vec[j]) * vec[j] * spn_z1;
365 #pragma omp parallel for reduction(+: spn) default(none) firstprivate(i_max, isite1, isite2, X, S1, S2) private(spn_z1, spn_z2, off, off_2, ibit_tmp, sigma_1, sigma_2) shared(vec, list_1) 366 for (j = 1; j <= i_max; j++) {
369 spn += conj(vec[j]) * vec[j] * spn_z1 * spn_z2;
376 if (ibit_tmp ==
TRUE) {
379 if (ibit_tmp ==
TRUE) {
381 spn += conj(vec[j]) * vec[off] * sqrt(S2 * (S2 + 1) - spn_z2 * (spn_z2 + 1)) *
382 sqrt(S1 * (S1 + 1) - spn_z1 * (spn_z1 - 1)) / 2.0;
388 if (ibit_tmp ==
TRUE) {
391 if (ibit_tmp ==
TRUE) {
393 spn += conj(vec[j]) * vec[off] * sqrt(S2 * (S2 + 1) - spn_z2 * (spn_z2 - 1.0)) *
394 sqrt(S1 * (S1 + 1) - spn_z1 * (spn_z1 + 1)) / 2.0;
408 X->
Phys.
Sz = creal(spn_z);
427 long unsigned int isite1,isite2, tmp_isite1, tmp_isite2;
428 long unsigned int is1_up,is2_up;
429 long unsigned int iexchg, off, off_2;
431 int num1_down,num2_down;
432 int sigma_1, sigma_2;
433 long unsigned int ibit1_up,ibit2_up,ibit_tmp,is_up;
434 double complex spn_z;
435 double complex spn_z1, spn_z2;
436 double complex spn, spn_d;
437 long unsigned int list_1_j;
438 long unsigned int i_max;
447 is1_up = X->
Def.
Tpow[isite1-1];
449 num1_up = ibit1_up/is1_up;
450 num1_down =1-num1_up;
451 #pragma omp parallel for reduction(+: spn_z) default(none) firstprivate(i_max, is1_up, num1_up, num1_down) shared(vec) 452 for(j=1;j<=i_max;j++){
453 spn_z += conj(vec[j])*vec[j]*(num1_up-num1_down)/2.0;
457 is1_up = X->
Def.
Tpow[isite1-1];
458 #pragma omp parallel for reduction(+: spn_z) default(none) firstprivate(i_max, is1_up) private(list_1_j, ibit1_up, num1_up, num1_down) shared(vec) 459 for(j=1;j<=i_max;j++){
461 ibit1_up = list_1_j&is1_up;
462 num1_up = ibit1_up/is1_up;
463 num1_down = 1-num1_up;
464 spn_z += conj(vec[j])*vec[j]*(num1_up-num1_down)/2.0;
471 is1_up = X->
Def.
Tpow[isite1-1];
472 is2_up = X->
Def.
Tpow[isite2-1];
474 num1_down = 1-num1_up;
476 num2_down = 1-num2_up;
477 spn_z2 = (num1_up-num1_down)*(num2_up-num2_down)/4.0;
478 #pragma omp parallel for default(none) reduction (+:spn_d) shared(vec) \ 479 firstprivate(i_max, spn_z2) private(j) 480 for (j = 1; j <= i_max; j++) {
481 spn_d += conj(vec[j])*vec[j]*spn_z2;
483 if(isite1 == isite2){
484 #pragma omp parallel for default(none) reduction (+:spn_d) shared(vec) \ 485 firstprivate(i_max) private(j) 486 for (j = 1; j <= i_max; j++) {
487 spn_d += conj(vec[j])*vec[j]/2.0;
503 is1_up = X->
Def.
Tpow[tmp_isite1 - 1];
504 is2_up = X->
Def.
Tpow[tmp_isite2 - 1];
506 num2_down =1-num2_up;
508 #pragma omp parallel for reduction(+: spn_d) default(none) firstprivate(i_max, is1_up, num2_up, num2_down) private(ibit1_up, num1_up, num1_down, spn_z2, list_1_j) shared(vec) 509 for(j=1;j<=i_max;j++){
511 ibit1_up = list_1_j&is1_up;
512 num1_up = ibit1_up/is1_up;
513 num1_down = 1-num1_up;
514 spn_z2 = (num1_up-num1_down)*(num2_up-num2_down);
515 spn_d += conj(vec[j])*vec[j]*spn_z2/4.0;
525 is2_up = X->
Def.
Tpow[isite2-1];
526 is_up = is1_up+is2_up;
527 #pragma omp parallel for reduction(+: spn, spn_d) default(none) firstprivate(i_max, is_up, is1_up, is2_up, isite1, isite2) private(list_1_j, ibit1_up, num1_up, ibit2_up, num2_up, num1_down, num2_down, spn_z2, iexchg, off, ibit_tmp) shared(vec) 528 for(j=1;j<=i_max;j++){
530 ibit1_up = list_1_j&is1_up;
531 num1_up = ibit1_up/is1_up;
532 num1_down = 1-num1_up;
533 ibit2_up = list_1_j&is2_up;
534 num2_up = ibit2_up/is2_up;
535 num2_down = 1-num2_up;
537 spn_z2 = (num1_up-num1_down)*(num2_up-num2_down);
538 spn_d += conj(vec[j])*vec[j]*spn_z2/4.0;
541 spn_d += conj(vec[j])*vec[j]/2.0;
543 ibit_tmp = (num1_up) ^ (num2_up);
545 iexchg = list_1_j ^ (is_up);
547 spn += conj(vec[j])*vec[off]/2.0;
565 #pragma omp parallel for reduction(+: spn, spn_z) default(none) firstprivate(S1, spn_z1,i_max) shared(vec) 566 for(j=1;j<=i_max;j++){
567 spn += conj(vec[j])*vec[j]*S1*(S1+1.0);
568 spn_z += conj(vec[j])*vec[j]*spn_z1;
572 #pragma omp parallel for reduction(+: spn, spn_z) default(none) firstprivate(i_max, isite1, X, S1) private(spn_z1) shared(vec) 573 for(j=1;j<=i_max;j++){
575 spn += conj(vec[j])*vec[j]*S1*(S1+1.0);
576 spn_z += conj(vec[j])*vec[j]*spn_z1;
580 if(isite1==isite2)
continue;
612 #pragma omp parallel for reduction(+: spn) default(none) firstprivate(i_max, isite1, isite2, X, S1, S2) private(spn_z1, spn_z2, off, off_2, ibit_tmp, sigma_1, sigma_2) shared(vec) 613 for(j=1;j<=i_max;j++){
616 spn += conj(vec[j])*vec[j]*spn_z1*spn_z2;
625 spn += conj(vec[j])*vec[off_2+1]*sqrt(S2*(S2+1) - spn_z2*(spn_z2+1))*sqrt(S1*(S1+1) - spn_z1*(spn_z1-1))/2.0;
633 spn += conj(vec[j])*vec[off_2+1]*sqrt(S2*(S2+1) - spn_z2*(spn_z2-1.0))*sqrt(S1*(S1+1)- spn_z1*(spn_z1+1))/2.0;
645 X->
Phys.
s2=creal(spn+spn_d);
694 long unsigned int isite1;
695 long unsigned int is1_up, is1_down;
696 int num1_up, num1_down, num1_sz;
697 long unsigned int ibit1_up, ibit1_down, list_1_j;
698 double complex spn_z;
699 long unsigned int i_max;
703 for (isite1 = 1; isite1 <= X->
Def.
NsiteMPI; isite1++) {
706 is1_up = X->
Def.
Tpow[2 * isite1 - 2];
707 is1_down = X->
Def.
Tpow[2 * isite1 - 1];
708 ibit1_up = (
unsigned long int)
myrank & is1_up;
709 num1_up = ibit1_up / is1_up;
710 ibit1_down = (
unsigned long int)
myrank & is1_down;
711 num1_down = ibit1_down / is1_down;
712 num1_sz = num1_up - num1_down;
713 #pragma omp parallel for reduction(+:spn_z) default(none) firstprivate(i_max) private(j) shared(num1_sz,vec) 714 for (j = 1; j <= i_max; j++) {
715 spn_z += (num1_sz) / 2.0 * conj(vec[j]) * vec[j];
719 is1_up = X->
Def.
Tpow[2 * isite1 - 2];
720 is1_down = X->
Def.
Tpow[2 * isite1 - 1];
721 #pragma omp parallel for reduction(+:spn_z) default(none) firstprivate(i_max, is1_up, is1_down, isite1) \ 722 private(list_1_j, ibit1_up, num1_up, ibit1_down, num1_down) shared(vec) 723 for (j = 1; j <= i_max; j++) {
725 ibit1_up = list_1_j & is1_up;
726 num1_up = ibit1_up / is1_up;
727 ibit1_down = list_1_j & is1_down;
728 num1_down = ibit1_down / is1_down;
729 spn_z += conj(vec[j]) * vec[j] * (num1_up - num1_down) / 2.0;
734 X->
Phys.
Sz = creal(spn_z);
751 long unsigned int j, list_1_j;
752 long unsigned int isite1;
753 long unsigned int is1_up;
756 long unsigned int ibit1_up;
757 double complex spn_z, spn_z1;
758 long unsigned int i_max;
763 for (isite1 = 1; isite1 <= X->
Def.
NsiteMPI; isite1++) {
766 is1_up = X->
Def.
Tpow[isite1 - 1];
767 ibit1_up =
myrank & is1_up;
768 num1_up = ibit1_up / is1_up;
769 num1_down = 1 - num1_up;
770 #pragma omp parallel for reduction(+: spn_z) default(none) firstprivate(i_max, is1_up, num1_up, num1_down) shared(vec) 771 for (j = 1; j <= i_max; j++) {
772 spn_z += conj(vec[j]) * vec[j] * (num1_up - num1_down) / 2.0;
776 is1_up = X->
Def.
Tpow[isite1 - 1];
777 #pragma omp parallel for reduction(+: spn_z) default(none) firstprivate(i_max, is1_up) private(list_1_j, ibit1_up, num1_up, num1_down) shared(vec) 778 for (j = 1; j <= i_max; j++) {
780 ibit1_up = list_1_j & is1_up;
781 num1_up = ibit1_up / is1_up;
782 num1_down = 1 - num1_up;
783 spn_z += conj(vec[j]) * vec[j] * (num1_up - num1_down) / 2.0;
789 for (isite1 = 1; isite1 <= X->
Def.
NsiteMPI; isite1++) {
792 #pragma omp parallel for reduction(+: spn_z) default(none) firstprivate(spn_z1, i_max) shared(vec) 793 for (j = 1; j <= i_max; j++) {
794 spn_z += conj(vec[j]) * vec[j] * spn_z1;
797 #pragma omp parallel for reduction(+: spn_z) default(none) firstprivate(i_max, isite1, X) private(spn_z1) shared(vec) 798 for (j = 1; j <= i_max; j++) {
800 spn_z += conj(vec[j]) * vec[j] * spn_z1;
806 X->
Phys.
Sz = creal(spn_z);
struct DefineList Def
Definision of system (Hamiltonian) etc.
int expec_totalspin(struct BindStruct *X, double complex *vec)
Parent function of calculation of total spin.
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.
double complex X_GC_child_CisAitCiuAiv_spin_MPIsingle(int org_isite1, int org_ispin1, int org_ispin2, int org_isite3, int org_ispin3, int org_ispin4, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Exchange and Pairlifting term in Spin model + GC When only site2 is in the inter process region...
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.
struct LargeList Large
Variables for Matrix-Vector product.
int ConvertToList1GeneralSpin(const long unsigned int org_ibit, const long unsigned int ihlfbit, long unsigned int *_ilist1Comp)
function of converting component to list_1
struct PhysList Phys
Physical quantities.
int mode
multiply or expectation value.
int expec_totalSz(struct BindStruct *X, double complex *vec)
void totalspin_Hubbard(struct BindStruct *X, double complex *vec)
function of calculating totalspin for Hubbard model
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
unsigned int Nsite
Number of sites in the INTRA process region.
long unsigned int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
void totalSz_SpinGC(struct BindStruct *X, double complex *vec)
function of calculating totalSz for Spin model in grand canonical ensemble
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.
void totalspin_SpinGC(struct BindStruct *X, double complex *vec)
function of calculating totalspin for spin model in grand canonical ensemble
long unsigned int * list_2_1
int GetOffComp(long unsigned int *_list_2_1, long unsigned int *_list_2_2, long unsigned int _ibit, const long unsigned int _irght, const long unsigned int _ilft, const long unsigned int _ihfbit, long unsigned int *_ioffComp)
function of getting off-diagonal component
void totalSz_HubbardGC(struct BindStruct *X, double complex *vec)
function of calculating totalSz for Hubbard model in grand canonical ensemble
int GetBitGeneral(const unsigned int isite, const long unsigned int org_bit, const long int *SiteToBit, const long unsigned int *Tpow)
get bit at a site for general spin
double complex X_child_general_int_spin_TotalS_MPIdouble(int org_isite1, int org_isite3, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Exchange term in Spin model When both site1 and site2 are in the inter process region.
unsigned int NsiteMPI
Total number of sites, differ from DefineList::Nsite.
void totalspin_Spin(struct BindStruct *X, double complex *vec)
function of calculating totalspin for spin model
double s2
Expectation value of the square of the total S.
int iFlgGeneralSpin
Flag for the general (Sz/=1/2) spin.
long unsigned int * list_1
long int * SiteToBit
[DefineList::NsiteMPI] Similar to DefineList::Tpow. For general spin.
long unsigned int * list_2_2
double complex X_child_general_int_spin_MPIsingle(int org_isite1, int org_ispin1, int org_ispin2, int org_isite3, int org_ispin3, int org_ispin4, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
int iCalcModel
Switch for model. 0:Hubbard, 1:Spin, 2:Kondo, 3:HubbardGC, 4:SpinGC, 5:KondoGC, 6:HubbardNConserved.
double Sz
Expectation value of the Total Sz.
int GetOffCompGeneralSpin(const long unsigned int org_ibit, const int org_isite, const int org_ispin, const int off_ispin, long unsigned int *_ioffComp, const long int *SiteToBit, const long unsigned int *Tpow)
function of getting off-diagonal component for general spin
int myrank
Process ID, defined in InitializeMPI()
double complex X_GC_child_CisAitCiuAiv_spin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, int org_isite3, int org_ispin3, int org_ispin4, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
term in Spin model + GC. When both site1 and site2 are in the inter process region.
void totalspin_HubbardGC(struct BindStruct *X, double complex *vec)
function of calculating totalspin for Hubbard model in grand canonical ensemble
struct CheckList Check
Size of the Hilbert space.
int Total2SzMPI
Total across processes.