69 #include "mltplyCommon.h" 70 #include "mltplySpinCore.h" 71 #include "mltplyMPISpinCore.h" 73 #include "wrapperMPI.h" 80 unsigned long int i_int ,
82 double complex *tmp_v0 ,
83 double complex *tmp_v1 )
86 double complex dam_pr;
110 double complex tmp_J,
112 double complex *tmp_v0,
113 double complex *tmp_v1
116 int mask1, mask2, state1, state2, ierr, origin;
117 unsigned long int idim_max_buf, j;
118 MPI_Status statusMPI;
119 double complex Jint, dmv, dam_pr;
121 mask1 = (int)X->
Def.
Tpow[org_isite1];
122 mask2 = (
int)X->
Def.
Tpow[org_isite3];
123 if (org_isite1 != org_isite3) {
124 origin =
myrank ^ (mask1 + mask2);
127 if (org_ispin1 == org_ispin4 && org_ispin2 == org_ispin3) {
136 state1 = (origin & mask1) / mask1;
137 state2 = (origin & mask2) / mask2;
139 if (state1 == org_ispin2 && state2 == org_ispin4) {
142 else if (state1 == org_ispin1 && state2 == org_ispin3) {
152 ierr = MPI_Sendrecv(&X->
Check.
idim_max, 1, MPI_UNSIGNED_LONG, origin, 0,
153 &idim_max_buf, 1, MPI_UNSIGNED_LONG, origin, 0,
154 MPI_COMM_WORLD, &statusMPI);
156 ierr = MPI_Sendrecv(tmp_v1, X->
Check.
idim_max + 1, MPI_DOUBLE_COMPLEX, origin, 0,
157 v1buf, idim_max_buf + 1, MPI_DOUBLE_COMPLEX, origin, 0,
158 MPI_COMM_WORLD, &statusMPI);
162 #pragma omp parallel default(none) reduction(+:dam_pr) private(j, dmv) \ 163 firstprivate(idim_max_buf, Jint, X) shared(v1buf, tmp_v1, tmp_v0) 167 for (j = 1; j <= idim_max_buf; j++) {
168 dmv = Jint *
v1buf[j];
170 dam_pr += conj(tmp_v1[j]) * dmv;
175 for (j = 1; j <= idim_max_buf; j++) {
176 dmv = Jint *
v1buf[j];
177 dam_pr += conj(tmp_v1[j]) * dmv;
192 unsigned long int i_int ,
194 double complex *tmp_v0 ,
195 double complex *tmp_v1
198 double complex dam_pr;
218 double complex tmp_J,
220 double complex *tmp_v0,
221 double complex *tmp_v1
224 int mask1, mask2, state2, ierr;
225 long int origin, num1;
226 unsigned long int idim_max_buf, j;
227 MPI_Status statusMPI;
228 double complex Jint, dmv, dam_pr;
230 if (org_isite1 == org_isite3 && org_ispin1 == org_ispin4) {
234 mask1 = (int)X->
Def.
Tpow[org_isite1];
235 mask2 = (
int)X->
Def.
Tpow[org_isite3];
237 state2 = (origin & mask2) / mask2;
239 if (num1 != 0 && state2 == org_ispin4) {
242 else if (
X_SpinGC_CisAis(origin + 1, X, mask1, org_ispin1) ==
TRUE && state2 == org_ispin3) {
250 ierr = MPI_Sendrecv(&X->
Check.
idim_max, 1, MPI_UNSIGNED_LONG, origin, 0,
251 &idim_max_buf, 1, MPI_UNSIGNED_LONG, origin, 0,
252 MPI_COMM_WORLD, &statusMPI);
254 ierr = MPI_Sendrecv(tmp_v1, X->
Check.
idim_max + 1, MPI_DOUBLE_COMPLEX, origin, 0,
255 v1buf, idim_max_buf + 1, MPI_DOUBLE_COMPLEX, origin, 0,
256 MPI_COMM_WORLD, &statusMPI);
261 #pragma omp parallel for default(none) reduction(+:dam_pr) private(j, dmv) \ 262 firstprivate(idim_max_buf, Jint, X) shared(v1buf, tmp_v1, tmp_v0) 263 for (j = 1; j <= idim_max_buf; j++) {
264 dmv = Jint *
v1buf[j];
266 dam_pr += conj(tmp_v1[j]) * dmv;
270 #pragma omp parallel for default(none) reduction(+:dam_pr) private(j, dmv) \ 271 firstprivate(idim_max_buf, Jint, X) shared(v1buf, tmp_v1, tmp_v0) 272 for (j = 1; j <= idim_max_buf; j++) {
273 dmv = Jint *
v1buf[j];
274 dam_pr += conj(tmp_v1[j]) * dmv;
288 unsigned long int i_int,
290 double complex *tmp_v0,
291 double complex *tmp_v1
295 double complex dam_pr;
315 double complex tmp_J,
317 double complex *tmp_v0,
318 double complex *tmp_v1
321 int mask1, mask2, state1, ierr, num1;
323 unsigned long int idim_max_buf, j;
324 MPI_Status statusMPI;
325 double complex Jint, dmv, dam_pr;
327 if (org_isite1 == org_isite3 && org_ispin1 == org_ispin3) {
331 mask1 = (int)X->
Def.
Tpow[org_isite1];
333 state1 = (origin & mask1) / mask1;
334 mask2 = (int)X->
Def.
Tpow[org_isite3];
336 if (state1 == org_ispin2) {
357 ierr = MPI_Sendrecv(&X->
Check.
idim_max, 1, MPI_UNSIGNED_LONG, origin, 0,
358 &idim_max_buf, 1, MPI_UNSIGNED_LONG, origin, 0,
359 MPI_COMM_WORLD, &statusMPI);
361 ierr = MPI_Sendrecv(tmp_v1, X->
Check.
idim_max + 1, MPI_DOUBLE_COMPLEX, origin, 0,
362 v1buf, idim_max_buf + 1, MPI_DOUBLE_COMPLEX, origin, 0,
363 MPI_COMM_WORLD, &statusMPI);
367 #pragma omp parallel default(none) reduction(+:dam_pr) private(j, dmv) \ 368 firstprivate(idim_max_buf, Jint, X) shared(v1buf, tmp_v1, tmp_v0) 372 for (j = 1; j <= idim_max_buf; j++) {
373 dmv = Jint *
v1buf[j];
375 dam_pr += conj(tmp_v1[j]) * dmv;
380 for (j = 1; j <= idim_max_buf; j++) {
381 dmv = Jint *
v1buf[j];
382 dam_pr += conj(tmp_v1[j]) * dmv;
402 double complex tmp_J,
404 double complex *tmp_v0,
405 double complex *tmp_v1
408 long unsigned int mask1, mask2, num1,num2;
411 double complex dmv, dam_pr;
412 mask1 = (int)X->
Def.
Tpow[org_isite1];
413 mask2 = (
int)X->
Def.
Tpow[org_isite3];
418 #pragma omp parallel default(none) reduction(+:dam_pr) private(j, dmv) \ 419 firstprivate(tmp_J, X, num1, num2) shared(tmp_v1, tmp_v0) 424 dmv = num1*num2*tmp_v1[j] * tmp_J;
426 dam_pr += conj(tmp_v1[j]) * dmv;
432 dmv = num1 * num2 * tmp_v1[j] * tmp_J;
433 dam_pr += conj(tmp_v1[j]) * dmv;
453 double complex tmp_J,
455 double complex *tmp_v0,
456 double complex *tmp_v1
459 long unsigned int mask1, mask2, num1, num2;
462 double complex Jint, dmv, dam_pr;
464 mask1 = (int)X->
Def.
Tpow[org_isite1];
465 mask2 = (
int)X->
Def.
Tpow[org_isite3];
469 #pragma omp parallel default(none) reduction(+:dam_pr) private(j, dmv, num1) \ 470 firstprivate(Jint, X, num2, mask1, org_ispin1) shared(tmp_v1, tmp_v0) 476 dmv = Jint * num1 * num2 * tmp_v1[j];
478 dam_pr += conj(tmp_v1[j]) * dmv;
485 dmv = Jint * num1 * num2 * tmp_v1[j];
486 dam_pr += conj(tmp_v1[j]) * dmv;
501 unsigned long int i_int,
503 double complex *tmp_v0,
504 double complex *tmp_v1
507 double complex dam_pr;
529 double complex tmp_J,
531 double complex *tmp_v0,
532 double complex *tmp_v1
535 int mask2, state2, ierr, origin;
536 unsigned long int mask1, idim_max_buf, j, ioff, state1, state1check;
537 MPI_Status statusMPI;
538 double complex Jint, dmv, dam_pr;
542 mask2 = (int)X->
Def.
Tpow[org_isite3];
544 state2 = (origin & mask2) / mask2;
546 if (state2 == org_ispin4) {
547 state1check = (
unsigned long int) org_ispin2;
550 else if (state2 == org_ispin3) {
551 state1check = (
unsigned long int) org_ispin1;
559 ierr = MPI_Sendrecv(&X->
Check.
idim_max, 1, MPI_UNSIGNED_LONG, origin, 0,
560 &idim_max_buf, 1, MPI_UNSIGNED_LONG, origin, 0,
561 MPI_COMM_WORLD, &statusMPI);
563 ierr = MPI_Sendrecv(tmp_v1, X->
Check.
idim_max + 1, MPI_DOUBLE_COMPLEX, origin, 0,
564 v1buf, idim_max_buf + 1, MPI_DOUBLE_COMPLEX, origin, 0,
565 MPI_COMM_WORLD, &statusMPI);
570 mask1 = X->
Def.
Tpow[org_isite1];
573 #pragma omp parallel default(none) reduction(+:dam_pr) private(j, dmv, state1, ioff) \ 574 firstprivate(idim_max_buf, Jint, X, state1check, mask1) shared(v1buf, tmp_v1, tmp_v0) 578 for (j = 0; j < idim_max_buf; j++) {
581 dmv = Jint *
v1buf[j + 1];
582 tmp_v0[ioff + 1] += dmv;
583 dam_pr += conj(tmp_v1[ioff + 1]) * dmv;
589 for (j = 0; j < idim_max_buf; j++) {
592 dmv = Jint *
v1buf[j + 1];
593 dam_pr += conj(tmp_v1[ioff + 1]) * dmv;
609 unsigned long int i_int,
611 double complex *tmp_v0,
612 double complex *tmp_v1
615 double complex dam_pr;
635 double complex tmp_J,
637 double complex *tmp_v0,
638 double complex *tmp_v1
641 int mask2, state2, ierr, origin;
642 unsigned long int mask1, idim_max_buf, j, state1, state1check;
643 MPI_Status statusMPI;
644 double complex Jint, dmv, dam_pr;
648 mask2 = (int)X->
Def.
Tpow[org_isite3];
650 state2 = (origin & mask2) / mask2;
651 if (state2 == org_ispin4) {
652 state1check = (
unsigned long int) org_ispin1;
655 else if (state2 == org_ispin3) {
656 state1check = (
unsigned long int) org_ispin1;
664 ierr = MPI_Sendrecv(&X->
Check.
idim_max, 1, MPI_UNSIGNED_LONG, origin, 0,
665 &idim_max_buf, 1, MPI_UNSIGNED_LONG, origin, 0,
666 MPI_COMM_WORLD, &statusMPI);
668 ierr = MPI_Sendrecv(tmp_v1, X->
Check.
idim_max + 1, MPI_DOUBLE_COMPLEX, origin, 0,
669 v1buf, idim_max_buf + 1, MPI_DOUBLE_COMPLEX, origin, 0,
670 MPI_COMM_WORLD, &statusMPI);
675 mask1 = X->
Def.
Tpow[org_isite1];
678 #pragma omp parallel default(none) reduction(+:dam_pr) private(j, dmv, state1) \ 679 firstprivate(idim_max_buf, Jint, X, state1check, mask1) shared(v1buf, tmp_v1, tmp_v0) 683 for (j = 0; j < idim_max_buf; j++) {
684 state1 = (j & mask1) / mask1;
685 if (state1 == state1check) {
686 dmv = Jint *
v1buf[j + 1];
687 tmp_v0[j + 1] += dmv;
688 dam_pr += conj(tmp_v1[j + 1]) * dmv;
694 for (j = 0; j < idim_max_buf; j++) {
695 state1 = (j & mask1) / mask1;
696 if (state1 == state1check) {
697 dmv = Jint *
v1buf[j + 1];
698 dam_pr += conj(tmp_v1[j + 1]) * dmv;
714 unsigned long int i_int,
716 double complex *tmp_v0,
717 double complex *tmp_v1
720 double complex dam_pr;
740 double complex tmp_J,
742 double complex *tmp_v0,
743 double complex *tmp_v1
747 unsigned long int mask1, j, ioff, state1, state1check;
749 double complex Jint, dmv, dam_pr;
753 mask2 = (int)X->
Def.
Tpow[org_isite3];
754 state2 = (
myrank & mask2) / mask2;
756 if (state2 == org_ispin3) {
757 state1check = org_ispin2;
764 mask1 = (int)X->
Def.
Tpow[org_isite1];
767 #pragma omp parallel
default(none) reduction(+:dam_pr)
private(j, dmv, state1, ioff) \
768 firstprivate(Jint, X, state1check, mask1) shared(tmp_v1, tmp_v0)
774 state1 = (j & mask1) / mask1;
776 if (state1 == state1check) {
777 dmv = Jint * tmp_v1[j + 1];
780 dmv = conj(Jint) * tmp_v1[j + 1];
782 tmp_v0[ioff + 1] += dmv;
783 dam_pr += conj(tmp_v1[ioff + 1]) * dmv;
790 state1 = (j & mask1) / mask1;
792 if (state1 == state1check) {
793 dmv = Jint * tmp_v1[j + 1];
798 dam_pr += conj(tmp_v1[ioff + 1]) * dmv;
804 state1 = (j & mask1) / mask1;
806 if (state1 == state1check) {
807 dmv = Jint * tmp_v1[j + 1];
810 dmv = conj(Jint) * tmp_v1[j + 1];
812 dam_pr += conj(tmp_v1[ioff + 1]) * dmv;
832 double complex tmp_J,
834 double complex *tmp_v0,
835 double complex *tmp_v1
838 unsigned long int off, j;
840 double complex tmp_V, dmv, dam_pr;
841 MPI_Status statusMPI;
843 if (org_isite1 == org_isite3 && org_ispin1 == org_ispin4) {
866 ierr = MPI_Sendrecv(tmp_v1, X->
Check.
idim_max + 1, MPI_DOUBLE_COMPLEX, origin, 0,
868 MPI_COMM_WORLD, &statusMPI);
872 #pragma omp parallel default(none) reduction(+:dam_pr) firstprivate(X, tmp_V) \ 873 private(j, dmv) shared (tmp_v0, tmp_v1, v1buf) 878 dmv =
v1buf[j] * tmp_V;
880 dam_pr += conj(tmp_v1[j]) * dmv;
886 dmv =
v1buf[j] * tmp_V;
887 dam_pr += conj(tmp_v1[j]) * dmv;
907 double complex tmp_J,
909 double complex *tmp_v0,
910 double complex *tmp_v1
913 unsigned long int j, off;
915 double complex tmp_V, dmv, dam_pr;
916 MPI_Status statusMPI;
918 if (org_isite1 == org_isite3 && org_ispin1 == org_ispin3) {
932 if (
BitCheckGeneral((
unsigned long int)off, org_isite3 + 1, org_ispin3,
942 ierr = MPI_Sendrecv(tmp_v1, X->
Check.
idim_max + 1, MPI_DOUBLE_COMPLEX, origin, 0,
944 MPI_COMM_WORLD, &statusMPI);
948 #pragma omp parallel default(none) reduction(+:dam_pr) firstprivate(X, tmp_V) private(j, dmv) \ 949 shared (tmp_v0, tmp_v1, v1buf) 954 dmv =
v1buf[j] * tmp_V;
956 dam_pr += conj(tmp_v1[j]) * dmv;
962 dmv =
v1buf[j] * tmp_V;
963 dam_pr += conj(tmp_v1[j]) * dmv;
984 double complex tmp_J,
986 double complex *tmp_v0,
987 double complex *tmp_v1
990 unsigned long int tmp_off, off, j;
991 int origin, ierr, ihermite;
992 double complex tmp_V, dmv, dam_pr;
993 MPI_Status statusMPI;
997 if (org_isite1 == org_isite3 && org_ispin1 == org_ispin4 &&
998 org_ispin2 == org_ispin3) {
1011 else ihermite =
FALSE;
1017 if (ihermite ==
FALSE) {
1018 if (
GetOffCompGeneralSpin((
unsigned long int) myrank, org_isite3 + 1, org_ispin4, org_ispin3, &tmp_off,
1023 tmp_V = conj(tmp_J);
1033 ierr = MPI_Sendrecv(tmp_v1, X->
Check.
idim_max + 1, MPI_DOUBLE_COMPLEX, origin, 0,
1035 MPI_COMM_WORLD, &statusMPI);
1039 #pragma omp parallel default(none) reduction(+:dam_pr) firstprivate(X, tmp_V) private(j, dmv) \ 1040 shared (tmp_v0, tmp_v1, v1buf) 1045 dmv =
v1buf[j] * tmp_V;
1047 dam_pr += conj(tmp_v1[j]) * dmv;
1053 dmv =
v1buf[j] * tmp_V;
1054 dam_pr += conj(tmp_v1[j]) * dmv;
1073 double complex tmp_J,
1075 double complex *tmp_v0,
1076 double complex *tmp_v1
1079 unsigned long int j, num1;
1080 double complex tmp_V, dmv, dam_pr;
1095 #pragma omp parallel default(none) reduction(+:dam_pr) firstprivate(X, tmp_V) private(j, dmv) \ 1096 shared (tmp_v0, tmp_v1) 1101 dmv = tmp_v1[j] * tmp_V;
1103 dam_pr += conj(tmp_v1[j]) * dmv;
1109 dmv = tmp_v1[j] * tmp_V;
1110 dam_pr += conj(tmp_v1[j]) * dmv;
1128 double complex tmp_trans,
1130 double complex *tmp_v0,
1131 double complex *tmp_v1
1134 unsigned long int off, j;
1136 double complex tmp_V, dmv, dam_pr;
1137 MPI_Status statusMPI;
1144 org_isite1 + 1, org_ispin2, org_ispin1, &off,
1146 tmp_V = conj(tmp_trans);
1153 ierr = MPI_Sendrecv(tmp_v1, X->
Check.
idim_max + 1, MPI_DOUBLE_COMPLEX, origin, 0,
1155 MPI_COMM_WORLD, &statusMPI);
1159 #pragma omp parallel default(none) reduction(+:dam_pr) firstprivate(X, tmp_V) private(j, dmv) \ 1160 shared (tmp_v0, tmp_v1, v1buf) 1165 dmv =
v1buf[j] * tmp_V;
1167 dam_pr += conj(tmp_v1[j]) * dmv;
1173 dmv =
v1buf[j] * tmp_V;
1174 dam_pr += conj(tmp_v1[j]) * dmv;
1191 double complex tmp_trans,
1193 double complex *tmp_v0,
1194 double complex *tmp_v1
1197 unsigned long int j, num1;
1198 double complex tmp_V, dmv, dam_pr;
1209 #pragma omp parallel default(none) reduction(+:dam_pr) firstprivate(X, tmp_V) private(j, dmv) \ 1210 shared (tmp_v0, tmp_v1) 1215 dmv = tmp_v1[j] * tmp_V;
1217 dam_pr += conj(tmp_v1[j]) * dmv;
1223 dmv = tmp_v1[j] * tmp_V;
1224 dam_pr += conj(tmp_v1[j]) * dmv;
1241 double complex tmp_trans,
1243 double complex *tmp_v0,
1244 double complex *tmp_v1
1247 unsigned long int j, num1;
1248 double complex tmp_V, dmv, dam_pr;
1259 #pragma omp parallel default(none) reduction(+:dam_pr) firstprivate(X, tmp_V) private(j, dmv) \ 1260 shared (tmp_v0, tmp_v1) 1265 dmv = tmp_v1[j] * tmp_V;
1267 dam_pr += conj(tmp_v1[j]) * dmv;
1273 dmv = tmp_v1[j] * tmp_V;
1274 dam_pr += conj(tmp_v1[j]) * dmv;
1292 double complex tmp_trans,
1294 double complex *tmp_v0,
1295 double complex *tmp_v1,
1296 double complex *tmp_v1buf,
1297 unsigned long int idim_max,
1300 long unsigned int _ihfbit
1304 unsigned long int off, j, tmp_off,idim_max_buf;
1306 double complex tmp_V, dmv;
1307 MPI_Status statusMPI;
1314 org_isite1 + 1, org_ispin2, org_ispin1, &off,
1316 tmp_V = conj(tmp_trans);
1323 ierr = MPI_Sendrecv(&idim_max, 1, MPI_UNSIGNED_LONG, origin, 0,
1324 &idim_max_buf, 1, MPI_UNSIGNED_LONG, origin, 0,
1325 MPI_COMM_WORLD, &statusMPI);
1328 ierr = MPI_Sendrecv(list_1_org, idim_max + 1, MPI_UNSIGNED_LONG, origin, 0,
1329 list_1buf_org, idim_max_buf + 1, MPI_UNSIGNED_LONG, origin, 0,
1330 MPI_COMM_WORLD, &statusMPI);
1333 ierr = MPI_Sendrecv(tmp_v1, idim_max + 1, MPI_DOUBLE_COMPLEX, origin, 0,
1334 v1buf, idim_max_buf + 1, MPI_DOUBLE_COMPLEX, origin, 0,
1335 MPI_COMM_WORLD, &statusMPI);
1339 #pragma omp parallel for default(none)\ 1340 firstprivate(X, tmp_V, idim_max_buf, list_1buf_org) private(j, dmv, tmp_off) \ 1341 shared (tmp_v0, tmp_v1, v1buf) 1342 for (j = 1; j <= idim_max_buf; j++) {
1344 dmv =
v1buf[j] * tmp_V;
1345 tmp_v0[tmp_off] += dmv;
1368 double complex tmp_J,
1370 double complex *tmp_v0,
1371 double complex *tmp_v1
1374 unsigned long int off, j, num1;
1375 int origin, ierr, isite, IniSpin;
1376 double complex tmp_V, dmv, dam_pr;
1377 MPI_Status statusMPI;
1380 org_isite3 + 1, org_ispin3, org_ispin4, &off,
1384 isite = org_isite1 + 1;
1385 IniSpin = org_ispin1;
1388 org_isite3 + 1, org_ispin4, org_ispin3, &off,
1391 tmp_V = conj(tmp_J);
1393 isite = org_isite1 + 1;
1394 IniSpin = org_ispin1;
1400 ierr = MPI_Sendrecv(tmp_v1, X->
Check.
idim_max + 1, MPI_DOUBLE_COMPLEX, origin, 0,
1402 MPI_COMM_WORLD, &statusMPI);
1406 #pragma omp parallel default(none) reduction(+:dam_pr) firstprivate(X, tmp_V, isite, IniSpin) \ 1407 private(j, dmv, num1) shared (tmp_v0, tmp_v1, v1buf) 1414 dmv =
v1buf[j] * tmp_V;
1416 dam_pr += conj(tmp_v1[j]) * dmv;
1425 dmv =
v1buf[j] * tmp_V;
1426 dam_pr += conj(tmp_v1[j]) * dmv;
1447 double complex tmp_J,
1449 double complex *tmp_v0,
1450 double complex *tmp_v1
1453 unsigned long int num1, j, off;
1454 int isite, IniSpin, FinSpin;
1455 double complex tmp_V, dmv, dam_pr;
1462 isite = org_isite1 + 1;
1463 IniSpin = org_ispin2;
1464 FinSpin = org_ispin1;
1469 #pragma omp parallel default(none) reduction(+:dam_pr) \ 1470 firstprivate(X, tmp_V, isite, IniSpin, FinSpin) private(j, dmv, num1, off) \ 1471 shared (tmp_v0, tmp_v1, v1buf) 1479 dmv = tmp_v1[j] * tmp_V;
1480 tmp_v0[off + 1] += dmv;
1481 dam_pr += conj(tmp_v1[off + 1]) * dmv;
1486 dmv = tmp_v1[j] * conj(tmp_V);
1487 tmp_v0[off + 1] += dmv;
1488 dam_pr += conj(tmp_v1[off + 1]) * dmv;
1498 dmv = tmp_v1[j] * tmp_V;
1499 dam_pr += conj(tmp_v1[off + 1]) * dmv;
1521 double complex tmp_J,
1523 double complex *tmp_v0,
1524 double complex *tmp_v1
1527 unsigned long int off, j;
1528 int origin, ierr, isite, IniSpin, FinSpin;
1529 double complex tmp_V, dmv, dam_pr;
1530 MPI_Status statusMPI;
1533 org_isite3 + 1, org_ispin3, org_ispin4, &off,
1537 isite = org_isite1 + 1;
1538 IniSpin = org_ispin2;
1539 FinSpin = org_ispin1;
1542 org_isite3 + 1, org_ispin4, org_ispin3, &off,
1545 tmp_V = conj(tmp_J);
1547 isite = org_isite1 + 1;
1548 IniSpin = org_ispin1;
1549 FinSpin = org_ispin2;
1555 ierr = MPI_Sendrecv(tmp_v1, X->
Check.
idim_max + 1, MPI_DOUBLE_COMPLEX, origin, 0,
1557 MPI_COMM_WORLD, &statusMPI);
1561 #pragma omp parallel default(none) reduction(+:dam_pr) \ 1562 firstprivate(X, tmp_V, isite, IniSpin, FinSpin) private(j, dmv, off) shared (tmp_v0, tmp_v1, v1buf) 1570 dmv =
v1buf[j] * tmp_V;
1571 tmp_v0[off + 1] += dmv;
1572 dam_pr += conj(tmp_v1[off + 1]) * dmv;
1582 dmv =
v1buf[j] * tmp_V;
1583 dam_pr += conj(tmp_v1[off + 1]) * dmv;
1603 double complex tmp_J,
1605 double complex *tmp_v0,
1606 double complex *tmp_v1
1609 unsigned long int j, num1;
1610 double complex tmp_V, dmv, dam_pr;
1614 if (num1 !=
FALSE) {
1620 #pragma omp parallel default(none) reduction(+:dam_pr) \ 1621 firstprivate(X, tmp_V, org_isite1, org_ispin1) private(j, dmv, num1) shared (tmp_v0, tmp_v1) 1628 dmv = tmp_v1[j] * tmp_V * num1;
1630 dam_pr += conj(tmp_v1[j]) * dmv;
1637 dmv = tmp_v1[j] * tmp_V * num1;
1638 dam_pr += conj(tmp_v1[j]) * dmv;
1659 double complex tmp_J,
1661 double complex *tmp_v0,
1662 double complex *tmp_v1
1665 unsigned long int tmp_off, off, j, idim_max_buf;
1667 double complex tmp_V, dmv, dam_pr;
1668 MPI_Status statusMPI;
1685 if(ihermite==
FALSE){
1690 tmp_V = conj(tmp_J);
1703 ierr = MPI_Sendrecv(&X->
Check.
idim_max, 1, MPI_UNSIGNED_LONG, origin, 0,
1704 &idim_max_buf, 1, MPI_UNSIGNED_LONG, origin, 0,
1705 MPI_COMM_WORLD, &statusMPI);
1708 list_1buf, idim_max_buf + 1, MPI_UNSIGNED_LONG, origin, 0,
1709 MPI_COMM_WORLD, &statusMPI);
1711 ierr = MPI_Sendrecv(tmp_v1, X->
Check.
idim_max + 1, MPI_DOUBLE_COMPLEX, origin, 0,
1712 v1buf, idim_max_buf + 1, MPI_DOUBLE_COMPLEX, origin, 0,
1713 MPI_COMM_WORLD, &statusMPI);
1717 #pragma omp parallel default(none) reduction(+:dam_pr) firstprivate(X, tmp_V, idim_max_buf) \ 1718 private(j, dmv, off) shared (tmp_v0, tmp_v1, list_1buf, v1buf) 1722 for (j = 1; j <= idim_max_buf; j++) {
1724 dmv =
v1buf[j] * tmp_V;
1726 dam_pr += conj(tmp_v1[off]) * dmv;
1731 for (j = 1; j <= idim_max_buf; j++) {
1733 dmv =
v1buf[j] * tmp_V;
1734 dam_pr += conj(tmp_v1[off]) * dmv;
1753 double complex tmp_J,
1755 double complex *tmp_v0,
1756 double complex *tmp_v1
1759 unsigned long int j, num1;
1760 double complex tmp_V, dmv, dam_pr;
1762 if (org_isite1 == org_isite3 && org_ispin1 == org_ispin3) {
1764 if (num1 !=
FALSE) {
1773 if (num1 !=
FALSE) {
1776 if (num1 !=
FALSE) {
1788 #pragma omp parallel default(none) reduction(+:dam_pr) firstprivate(X, tmp_V) private(j, dmv) \ 1789 shared (tmp_v0, tmp_v1) 1794 dmv = tmp_v1[j] * tmp_V;
1796 dam_pr += conj(tmp_v1[j]) * dmv;
1802 dmv = tmp_v1[j] * tmp_V;
1803 dam_pr += conj(tmp_v1[j]) * dmv;
1822 double complex tmp_J,
1824 double complex *tmp_v0,
1825 double complex *tmp_v1
1829 unsigned long int j, num1;
1830 double complex tmp_V, dmv, dam_pr;
1834 if (num1 !=
FALSE) {
1840 #pragma omp parallel default(none) reduction(+:dam_pr) \ 1841 firstprivate(X, tmp_V, org_isite1, org_ispin1) private(j, dmv, num1) shared (tmp_v0, tmp_v1, list_1) 1848 dmv = tmp_v1[j] * tmp_V * num1;
1850 dam_pr += conj(tmp_v1[j]) * dmv;
1858 dmv = tmp_v1[j] * tmp_V * num1;
1859 dam_pr += conj(tmp_v1[j]) * dmv;
1880 double complex tmp_J,
1882 double complex *tmp_v0,
1883 double complex *tmp_v1
1886 unsigned long int tmp_off, off, j, idim_max_buf;
1887 int origin, ierr, isite, IniSpin, FinSpin;
1888 double complex tmp_V, dmv, dam_pr;
1889 MPI_Status statusMPI;
1892 org_isite3 + 1, org_ispin3, org_ispin4, &off,
1896 isite = org_isite1 + 1;
1897 IniSpin = org_ispin2;
1898 FinSpin = org_ispin1;
1903 tmp_V = conj(tmp_J);
1905 isite = org_isite1 + 1;
1906 IniSpin = org_ispin1;
1907 FinSpin = org_ispin2;
1913 ierr = MPI_Sendrecv(&X->
Check.
idim_max, 1, MPI_UNSIGNED_LONG, origin, 0,
1914 &idim_max_buf, 1, MPI_UNSIGNED_LONG, origin, 0,
1915 MPI_COMM_WORLD, &statusMPI);
1918 list_1buf, idim_max_buf + 1, MPI_UNSIGNED_LONG, origin, 0,
1919 MPI_COMM_WORLD, &statusMPI);
1921 ierr = MPI_Sendrecv(tmp_v1, X->
Check.
idim_max + 1, MPI_DOUBLE_COMPLEX, origin, 0,
1922 v1buf, idim_max_buf + 1, MPI_DOUBLE_COMPLEX, origin, 0,
1923 MPI_COMM_WORLD, &statusMPI);
1927 #pragma omp parallel default(none) reduction(+:dam_pr) \ 1928 firstprivate(X, tmp_V, idim_max_buf, IniSpin, FinSpin, isite) \ 1929 private(j, dmv, off, tmp_off) shared (tmp_v0, tmp_v1, list_1buf, v1buf) 1933 for (j = 1; j <= idim_max_buf; j++) {
1939 dmv =
v1buf[j] * tmp_V;
1941 dam_pr += conj(tmp_v1[off]) * dmv;
1947 for (j = 1; j <= idim_max_buf; j++) {
1953 dmv =
v1buf[j] * tmp_V;
1954 dam_pr += conj(tmp_v1[off]) * dmv;
1974 double complex tmp_trans,
1976 double complex *tmp_v0 ,
1977 double complex *tmp_v1 )
1980 int mask1, state1, ierr, origin;
1981 unsigned long int idim_max_buf, j;
1982 MPI_Status statusMPI;
1983 double complex trans, dmv, dam_pr;
1985 mask1 = (int)X->
Def.
Tpow[org_isite1];
1987 state1 = (origin & mask1)/mask1;
1991 if(state1 == org_ispin2){
1994 else if(state1 == org_ispin1) {
1995 trans = conj(tmp_trans);
2004 ierr = MPI_Sendrecv(&X->
Check.
idim_max, 1, MPI_UNSIGNED_LONG, origin, 0,
2005 &idim_max_buf, 1, MPI_UNSIGNED_LONG, origin, 0,
2006 MPI_COMM_WORLD, &statusMPI);
2008 ierr = MPI_Sendrecv(tmp_v1, X->
Check.
idim_max + 1, MPI_DOUBLE_COMPLEX, origin, 0,
2009 v1buf, idim_max_buf + 1, MPI_DOUBLE_COMPLEX, origin, 0,
2010 MPI_COMM_WORLD, &statusMPI);
2014 #pragma omp parallel default(none) reduction(+:dam_pr) private(j, dmv) \ 2015 firstprivate(idim_max_buf, trans, X) shared(v1buf, tmp_v1, tmp_v0) 2020 dmv = trans *
v1buf[j];
2022 dam_pr += conj(tmp_v1[j]) * dmv;
2028 dmv = trans *
v1buf[j];
2029 dam_pr += conj(tmp_v1[j]) * dmv;
2047 double complex tmp_trans,
2049 double complex *tmp_v0 ,
2050 double complex *tmp_v1,
2051 double complex *tmp_v1buf,
2052 unsigned long int idim_max,
2053 long unsigned int *Tpow,
2056 long unsigned int *list_2_1_target,
2057 long unsigned int *list_2_2_target,
2058 long unsigned int _irght,
2059 long unsigned int _ilft,
2060 long unsigned int _ihfbit
2063 int mask1, state1, ierr, origin;
2064 unsigned long int idim_max_buf, j;
2065 unsigned long int tmp_off;
2066 MPI_Status statusMPI;
2067 double complex trans, dmv;
2069 mask1 = (int)X->
Def.
Tpow[org_isite1];
2071 state1 = (origin & mask1)/mask1;
2073 if(state1 == org_ispin2){
2082 ierr = MPI_Sendrecv(&idim_max, 1, MPI_UNSIGNED_LONG, origin, 0,
2083 &idim_max_buf, 1, MPI_UNSIGNED_LONG, origin, 0,
2084 MPI_COMM_WORLD, &statusMPI);
2087 ierr = MPI_Sendrecv(list_1_org, idim_max + 1, MPI_UNSIGNED_LONG, origin, 0,
2088 list_1buf_org, idim_max_buf + 1, MPI_UNSIGNED_LONG, origin, 0,
2089 MPI_COMM_WORLD, &statusMPI);
2092 ierr = MPI_Sendrecv(tmp_v1, idim_max + 1, MPI_DOUBLE_COMPLEX, origin, 0,
2093 v1buf, idim_max_buf + 1, MPI_DOUBLE_COMPLEX, origin, 0,
2094 MPI_COMM_WORLD, &statusMPI);
2098 #pragma omp parallel for default(none) private(j, dmv, tmp_off) \ 2099 firstprivate(idim_max_buf, trans, X, list_1buf_org, list_2_1_target, list_2_2_target) \ 2100 shared(v1buf, tmp_v0) 2101 for (j = 1; j <= idim_max_buf; j++) {
2103 dmv = trans *
v1buf[j];
2104 tmp_v0[tmp_off] += dmv;
2125 double complex tmp_trans,
2127 double complex *tmp_v0 ,
2128 double complex *tmp_v1
2131 long unsigned int j;
2134 double complex dam_pr;
2135 mask1 = (int)X->
Def.
Tpow[org_isite1];
2136 ibit1 = (((
unsigned long int)
myrank& mask1)/mask1)^(1-org_ispin1);
2139 #pragma omp parallel reduction(+:dam_pr)default(none) shared(tmp_v1, tmp_v0, ibit1) \ 2140 firstprivate(X, tmp_trans) private(j) 2146 tmp_v0[j] += tmp_v1[j] * tmp_trans;
2147 dam_pr += tmp_trans * conj(tmp_v1[j]) * tmp_v1[j];
2153 dam_pr += tmp_trans * conj(tmp_v1[j]) * tmp_v1[j];
2172 double complex tmp_trans,
2174 double complex *tmp_v0 ,
2175 double complex *tmp_v1
2178 long unsigned int j;
2181 double complex dam_pr;
2182 mask1 = (int)X->
Def.
Tpow[org_isite1];
2183 ibit1 = (((
unsigned long int)
myrank& mask1) / mask1) ^ (1 - org_ispin1);
2186 #pragma omp parallel reduction(+:dam_pr)default(none) shared(tmp_v1, tmp_v0, ibit1) \ 2187 firstprivate(X, tmp_trans) private(j) 2193 tmp_v0[j] += tmp_v1[j] * tmp_trans;
2194 dam_pr += tmp_trans * conj(tmp_v1[j]) * tmp_v1[j];
2200 dam_pr += tmp_trans * conj(tmp_v1[j]) * tmp_v1[j];
void GC_child_CisAitCiuAiv_spin_MPIdouble(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Exchange and Pairlifting term in Spin model + GC When both site1 and site2 are in the inter process r...
void exitMPI(int errorcode)
MPI Abortation wrapper.
struct DefineList Def
Definision of system (Hamiltonian) etc.
double complex X_child_CisAitCjuAjv_GeneralSpin_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)
Compute term in the canonical general spin system when one of these sites is in the inter process re...
double complex X_GC_child_CisAisCjuAju_spin_MPIdouble(int org_isite1, int org_ispin1, int org_isite3, int org_ispin3, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
CisAisCjuAjv term in Spin model + GC When both site1 and site2 are in the inter process region...
double complex X_GC_child_CisAitCjuAjv_GeneralSpin_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)
Compute term in the grandcanonical general spin system when one of these site is in the inter proces...
double complex X_GC_child_CisAisCjuAjv_GeneralSpin_MPIdouble(int org_isite1, int org_ispin1, 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. When both site1 and site3 are in the inter process region.
void GC_child_CisAitCiuAiv_spin_MPIsingle(unsigned long int i_int, 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...
double complex X_GC_child_CisAis_GeneralSpin_MPIdouble(int org_isite1, int org_ispin1, double complex tmp_trans, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Compute term in the grandcanonical general spin system when both site is in the inter process region...
long unsigned int ihfbit
Used for Ogata-Lin ???
unsigned long int idim_max
The dimension of the Hilbert space of this process.
double complex X_GC_child_CisAis_spin_MPIdouble(int org_isite1, int org_ispin1, double complex tmp_trans, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Hopping term in Spin + GC When both site1 and site2 are in the inter process region.
double complex X_GC_child_CisAitCjuAju_GeneralSpin_MPIsingle(int org_isite1, int org_ispin1, int org_ispin2, int org_isite3, int org_ispin3, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Compute term in the grandcanonical general spin system when one of these site is in the inter proces...
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...
double complex X_GC_child_CisAit_spin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, double complex tmp_trans, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Hopping term in Spin + GC When both site1 and site2 are in the inter process region.
double complex X_child_CisAisCjuAju_GeneralSpin_MPIsingle(int org_isite1, int org_ispin1, int org_isite3, int org_ispin3, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Compute term in the canonical general spin system when one of these sites is in the inter process re...
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.
long unsigned int * list_1buf
struct LargeList Large
Variables for Matrix-Vector product.
double complex X_child_CisAisCjuAju_GeneralSpin_MPIdouble(int org_isite1, int org_ispin1, int org_isite3, int org_ispin3, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Compute term in the canonical general spin system when both sites are in the inter process region...
void GC_child_CisAisCjuAjv_spin_MPIsingle(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Wrapper for CisAisCjuAjv term in Spin model + GC When only site2 is in the inter process region...
int ConvertToList1GeneralSpin(const long unsigned int org_ibit, const long unsigned int ihlfbit, long unsigned int *_ilist1Comp)
function of converting component to list_1
void GC_child_CisAisCjuAjv_spin_MPIdouble(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Wrapper for calculating CisAisCjuAjv term in Spin model + GC When both site1 and site2 are in the int...
double complex * ParaInterAll_OffDiagonal
[DefineList::NInterAll_OffDiagonal] Coupling constant of off-diagonal inter-all term. malloc in setmem_def().
double complex X_child_CisAitCjuAjv_GeneralSpin_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)
Compute term in the canonical general spin system when both sites are in the inter process region...
int mode
multiply or expectation value.
double complex X_GC_child_CisAisCjuAju_GeneralSpin_MPIdouble(int org_isite1, int org_ispin1, int org_isite3, int org_ispin3, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Compute term in the grandcanonical general spin system when both site is in the inter process region...
double complex X_GC_child_CisAisCjuAju_spin_MPIsingle(int org_isite1, int org_ispin1, int org_isite3, int org_ispin3, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
CisAisCjuAjv term in Spin model + GC When both site1 and site2 are in the inter process region...
double complex X_GC_child_CisAitCjuAjv_GeneralSpin_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)
Compute term in the grandcanonical general spin system when both site is in the inter process region...
long unsigned int * list_1buf_org
double complex X_GC_child_CisAitCjuAju_spin_MPIsingle(int org_isite1, int org_ispin1, int org_ispin2, int org_isite3, int org_ispin3, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
CisAisCjuAjv term in Spin model + GC When only site2 is in the inter process region.
double complex X_GC_child_CisAisCjuAjv_spin_MPIdouble(int org_isite1, int org_ispin1, int org_isite3, int org_ispin3, int org_ispin4, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
CisAisCjuAjv term in Spin model + GC When both site1 and site2 are in the inter process region...
double complex X_GC_child_CisAit_GeneralSpin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, double complex tmp_trans, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Compute term in the grandcanonical general spin system when both site is in the inter process region...
unsigned long int sdim
Dimension for Ogata-Lin ???
int ** InterAll_OffDiagonal
[DefineList::NinterAll_OffDiagonal][8] Interacted quartet
double complex X_child_CisAit_spin_MPIdouble(int org_isite1, int org_ispin2, double complex tmp_trans, struct BindStruct *X, 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)
Hopping term in Spin + Canonical for CalcSpectrum When both site1 and site2 are in the inter process ...
void GC_child_CisAitCjuAju_spin_MPIsingle(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Wrapper for CisAisCjuAjv term in Spin model + GC When only site2 is in the inter process region...
long unsigned int * Tpow
[2 * DefineList::NsiteMPI] malloc in setmem_def().
long unsigned int ilft
Used for Ogata-Lin ???
long unsigned int * list_1_org
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
long unsigned int * list_1
void GC_child_CisAitCjuAju_spin_MPIdouble(unsigned long int i_int, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Wrapper for calculating CisAitCjuAju term in Spin model + GC When both site1 and site2 are in the int...
double complex X_GC_child_AisCis_GeneralSpin_MPIdouble(int org_isite1, int org_ispin1, double complex tmp_trans, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Compute term in the grandcanonical general spin system when both site is in the inter process region...
long int * SiteToBit
[DefineList::NsiteMPI] Similar to DefineList::Tpow. For general spin.
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
double complex X_GC_child_AisCis_spin_MPIdouble(int org_isite1, int org_ispin1, double complex tmp_trans, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Hopping term in Spin + GC When both site1 and site2 are in the inter process region.
double complex X_GC_child_CisAitCjuAju_GeneralSpin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, int org_isite3, int org_ispin3, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
term in Spin model. When both site1 and site3 are in the inter process region.
double complex X_child_CisAit_GeneralSpin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, double complex tmp_trans, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1, double complex *tmp_v1buf, unsigned long int idim_max, long unsigned int *list_1_org, long unsigned int *list_1buf_org, long unsigned int _ihfbit)
Compute term in the canonical general spin system when both site is in the inter process region...
long unsigned int irght
Used for Ogata-Lin ???
double complex X_GC_child_CisAisCjuAjv_GeneralSpin_MPIsingle(int org_isite1, int org_ispin1, int org_isite3, int org_ispin3, int org_ispin4, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Compute term in the grandcanonical general spin system when one of these site is in the inter proces...
double complex X_GC_child_CisAisCjuAjv_spin_MPIsingle(int org_isite1, int org_ispin1, int org_isite3, int org_ispin3, int org_ispin4, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
CisAisCjuAjv term in Spin model + GC When only site2 is in the inter process region.
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 X_SpinGC_CisAit(long unsigned int j, struct BindStruct *X, long unsigned int is1_spin, long unsigned int sigma2, long unsigned int *tmp_off)
Compute index of final wavefunction by term (grandcanonical).
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.
struct CheckList Check
Size of the Hilbert space.
double complex X_GC_child_CisAitCjuAju_spin_MPIdouble(int org_isite1, int org_ispin1, int org_ispin2, int org_isite3, int org_ispin3, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
CisAisCjuAjv term in Spin model + GC When both site1 and site2 are in the inter process region...
double complex X_GC_child_CisAisCjuAju_GeneralSpin_MPIsingle(int org_isite1, int org_ispin1, int org_isite3, int org_ispin3, double complex tmp_J, struct BindStruct *X, double complex *tmp_v0, double complex *tmp_v1)
Compute term in the grandcanonical general spin system when one of these site is in the inter proces...