42 fprintf(stdout,
"\n\n ####### You DO NOT have to WORRY about the following MPI-ERROR MESSAGE. #######\n\n");
43 ierr = MPI_Abort(MPI_COMM_WORLD, errorcode);
44 ierr = MPI_Finalize();
46 if (ierr != 0) fprintf(stderr,
"\n MPI_Finalize() = %d\n\n", ierr);
57 double complex trans0,
77 double complex trans0,
84 double complex Cphase, coef;
91 if (strcmp(StdI->
method,
"timeevolution") == 0 && StdI->
PumpBody == 1) {
94 for (ii = 0; ii < 3; ii++) Cphase += StdI->
At[it][ii] * dR[ii];
95 coef = cos(Cphase) + I * sin(-Cphase);
96 for (ispin = 0; ispin < 2; ispin++) {
97 StdI->
pump[it][StdI->
npump[it]] = coef * trans0;
104 StdI->
pump[it][StdI->
npump[it]] = conj(coef * trans0);
115 for (ispin = 0; ispin < 2; ispin++) {
117 StdFace_trans(StdI, conj(trans0), isite, ispin, jsite, ispin);
162 S = (double)S2 * 0.5;
166 for (ispin = 0; ispin <=
S2; ispin++){
173 Sz = (double)ispin - S;
186 StdFace_trans(StdI, -0.5 * Gamma * sqrt(S*(S + 1.0) - Sz*(Sz + 1.0)),
187 isite, ispin + 1, isite, ispin);
188 StdFace_trans(StdI, -0.5 * Gamma * sqrt(S*(S + 1.0) - Sz*(Sz + 1.0)),
189 isite, ispin, isite, ispin + 1);
201 double complex intr0,
232 int ispin, jspin, ZGeneral, ExGeneral;
233 double Si, Sj, Siz, Sjz;
234 double complex intr0;
240 if (Si2 == 1 || Sj2 == 1) {
249 StdI->
Hund[StdI->
NHund] = -0.5 * J[2][2];
259 if (fabs(J[0][1]) < 0.000001 && fabs(J[1][0]) < 0.000001
261 && abs(J[0][0] - J[1][1]) < 0.000001
273 StdI->
Ex[StdI->
NEx] = - 0.25 * (J[0][0] + J[1][1]);
275 if (strcmp(StdI->
model,
"kondo") == 0)
276 StdI->
Ex[StdI->
NEx] = -0.25 * (J[0][0] + J[1][1]);
278 StdI->
Ex[StdI->
NEx] = 0.25 * (J[0][0] + J[1][1]);
294 Si = 0.5 * (double)Si2;
295 Sj = 0.5 * (double)Sj2;
297 for (ispin = 0; ispin <= Si2; ispin++) {
298 Siz = (double)ispin - Si;
299 for (jspin = 0; jspin <= Sj2; jspin++) {
300 Sjz = (double)jspin - Sj;
309 intr0 = J[2][2] * Siz * Sjz;
311 isite, ispin, isite, ispin, jsite, jspin, jsite, jspin);
324 if ((ispin < Si2 && jspin < Sj2) && ExGeneral == 1) {
325 intr0 = 0.25 * (J[0][0] + J[1][1] + I*(J[0][1] - J[1][0]))
326 * sqrt(Si * (Si + 1.0) - Siz * (Siz + 1.0))
327 * sqrt(Sj * (Sj + 1.0) - Sjz * (Sjz + 1.0));
329 isite, ispin + 1, isite, ispin, jsite, jspin, jsite, jspin + 1);
331 isite, ispin, isite, ispin + 1, jsite, jspin + 1, jsite, jspin);
344 if ((ispin < Si2 && jspin < Sj2) && ExGeneral == 1) {
345 intr0 = 0.5 * 0.5 * (J[0][0] - J[1][1] - I*(J[0][1] + J[1][0]))
346 * sqrt(Si * (Si + 1.0) - Siz * (Siz + 1.0))
347 * sqrt(Sj * (Sj + 1.0) - Sjz * (Sjz + 1.0));
349 isite, ispin + 1, isite, ispin, jsite, jspin + 1, jsite, jspin);
351 isite, ispin, isite, ispin + 1, jsite, jspin, jsite, jspin + 1);
364 intr0 = 0.5 * (J[0][2] - I * J[1][2]) * sqrt(Si * (Si + 1.0) - Siz * (Siz + 1.0)) * Sjz;
366 isite, ispin + 1, isite, ispin, jsite, jspin, jsite, jspin);
368 jsite, jspin, jsite, jspin, isite, ispin, isite, ispin + 1);
381 intr0 = 0.5 * (J[2][0] - I * J[2][1]) * Siz * sqrt(Sj * (Sj + 1.0) - Sjz * (Sjz + 1.0));
383 isite, ispin, isite, ispin, jsite, jspin + 1, jsite, jspin);
385 jsite, jspin, jsite, jspin + 1, isite, ispin, isite, ispin);
420 if (isnan(*val) == 1) {
422 fprintf(stdout,
" %15s = %-10.5f ###### DEFAULT VALUE IS USED ######\n", valname, *val);
424 else fprintf(stdout,
" %15s = %-10.5f\n", valname, *val);
439 if (isnan(*val) == 1) {
443 if (isnan(val0) == 1) *val = val1;
445 fprintf(stdout,
" %15s = %-10.5f ###### DEFAULT VALUE IS USED ######\n", valname, *val);
447 else fprintf(stdout,
" %15s = %-10.5f\n", valname, *val);
461 if (isnan(creal(*val)) == 1) {
463 fprintf(stdout,
" %15s = %-10.5f %-10.5f ###### DEFAULT VALUE IS USED ######\n", valname, creal(*val), cimag(*val));
465 else fprintf(stdout,
" %15s = %-10.5f %-10.5f\n", valname, creal(*val), cimag(*val));
479 int NaN_i = 2147483647;
483 fprintf(stdout,
" %15s = %-10d ###### DEFAULT VALUE IS USED ######\n", valname, *val);
485 else fprintf(stdout,
" %15s = %-10d\n", valname, *val);
497 if (isnan(val) == 0) {
498 fprintf(stdout,
"\n Check ! %s is SPECIFIED but will NOT be USED. \n", valname);
499 fprintf(stdout,
" Please COMMENT-OUT this line \n");
500 fprintf(stdout,
" or check this input is REALLY APPROPRIATE for your purpose ! \n\n");
514 if (isnan(creal(val)) == 0) {
515 fprintf(stdout,
"\n Check ! %s is SPECIFIED but will NOT be USED. \n", valname);
516 fprintf(stdout,
" Please COMMENT-OUT this line \n");
517 fprintf(stdout,
" or check this input is REALLY APPROPRIATE for your purpose ! \n\n");
533 char Jname[3][3][10];
535 sprintf(Jname[0][0],
"%sx", valname);
536 sprintf(Jname[0][1],
"%sxy", valname);
537 sprintf(Jname[0][2],
"%sxz", valname);
538 sprintf(Jname[1][0],
"%syx", valname);
539 sprintf(Jname[1][1],
"%sy", valname);
540 sprintf(Jname[1][2],
"%syz", valname);
541 sprintf(Jname[2][0],
"%szx", valname);
542 sprintf(Jname[2][1],
"%szy", valname);
543 sprintf(Jname[2][2],
"%sz", valname);
547 for (i1 = 0; i1 < 3; i1++) {
548 for (i2 = 0; i2 < 3; i2++) {
563 int NaN_i = 2147483647;
566 fprintf(stdout,
"\n Check ! %s is SPECIFIED but will NOT be USED. \n", valname);
567 fprintf(stdout,
" Please COMMENT-OUT this line \n");
568 fprintf(stdout,
" or check this input is REALLY APPROPRIATE for your purpose ! \n\n");
582 int NaN_i = 2147483647;
585 fprintf(stdout,
"ERROR ! %s is NOT specified !\n", valname);
588 else fprintf(stdout,
" %15s = %-3d\n", valname, val);
603 int ii, jj, iCellV_frac[3];
607 for (ii = 0; ii < 3; ii++) {
609 for (jj = 0; jj < 3; jj++)iCellV_frac[ii] += StdI->
rbox[ii][jj] * iCellV[jj];
614 for (ii = 0; ii < 3; ii++)
615 nBox[ii] = (iCellV_frac[ii] + StdI->
NCell * 1000) / StdI->
NCell - 1000;
619 for (ii = 0; ii < 3; ii++)
620 iCellV_frac[ii] -= StdI->
NCell*(nBox[ii]);
622 for (ii = 0; ii < 3; ii++) {
624 for (jj = 0; jj < 3; jj++) iCellV_fold[ii] += StdI->
box[jj][ii] * iCellV_frac[jj];
625 iCellV_fold[ii] = (iCellV_fold[ii] + StdI->
NCell * 1000) / StdI->
NCell - 1000;
638 int bound[3][2], edge, ii, jj;
640 int nBox[3], iCellV_fold[3], iCellV[3];
641 double pos[4][2], xmin, xmax;
643 fprintf(stdout,
"\n @ Super-Lattice setting\n\n");
655 fprintf(stdout,
"\nERROR ! (L, W, Height) and (a0W, ..., a2H) conflict !\n\n");
663 for (ii = 0; ii < 3; ii++)
for (jj = 0; jj < 3; jj++)
664 StdI->
box[ii][jj] = 0;
665 StdI->
box[0][0] = StdI->
W;
666 StdI->
box[1][1] = StdI->
L;
695 if (dim == 2) StdI->
phase[2] = 0.0;
696 for (ii = 0; ii < 3; ii++) {
704 StdI->
tau = (
double **)malloc(
sizeof(
double*) * StdI->
NsiteUC);
705 for (ii = 0; ii < StdI->
NsiteUC; ii++) {
706 StdI->
tau[ii] = (
double *)malloc(
sizeof(
double) * 3);
713 for (ii = 0; ii < 3; ii++) {
715 * StdI->
box[1][(ii + 1) % 3]
716 * StdI->
box[2][(ii + 2) % 3]
718 * StdI->
box[1][(ii + 2) % 3]
719 * StdI->
box[2][(ii + 1) % 3];
721 printf(
" Number of Cell = %d\n", abs(StdI->
NCell));
722 if (StdI->
NCell == 0) {
726 for (ii = 0; ii < 3; ii++) {
727 for (jj = 0; jj < 3; jj++) {
728 StdI->
rbox[ii][jj] = StdI->
box[(ii + 1) % 3][(jj + 1) % 3] * StdI->
box[(ii + 2) % 3][(jj + 2) % 3]
729 - StdI->
box[(ii + 1) % 3][(jj + 2) % 3] * StdI->
box[(ii + 2) % 3][(jj + 1) % 3];
732 if (StdI->
NCell < 0) {
733 for (ii = 0; ii < 3; ii++)
734 for (jj = 0; jj < 3; jj++)
735 StdI->
rbox[ii][jj] *= -1;
742 for (ii = 0; ii < 3; ii++) {
745 for (nBox[2] = 0; nBox[2] < 2; nBox[2]++) {
746 for (nBox[1] = 0; nBox[1] < 2; nBox[1]++) {
747 for (nBox[0] = 0; nBox[0] < 2; nBox[0]++) {
749 for (jj = 0; jj < 3; jj++) edge += nBox[jj] * StdI->
box[jj][ii];
750 if (edge < bound[ii][0]) bound[ii][0] = edge;
751 if (edge > bound[ii][1]) bound[ii][1] = edge;
759 StdI->
Cell = (
int **)malloc(
sizeof(
int*) * StdI->
NCell);
760 for (ii = 0; ii < StdI->
NCell; ii++) {
761 StdI->
Cell[ii] = (
int *)malloc(
sizeof(
int) * 3);
764 for (iCellV[2] = bound[2][0]; iCellV[2] <= bound[2][1]; iCellV[2]++) {
765 for (iCellV[1] = bound[1][0]; iCellV[1] <= bound[1][1]; iCellV[1]++) {
766 for (iCellV[0] = bound[0][0]; iCellV[0] <= bound[0][1]; iCellV[0]++) {
768 if (nBox[0] == 0 && nBox[1] == 0 && nBox[2] == 0) {
769 for (ii = 0; ii < 3; ii++)
770 StdI->
Cell[jj][ii] = iCellV[ii];
782 pos[1][0] = StdI->
direct[0][0] * (double)StdI->
box[0][0] + StdI->
direct[1][0] * (
double)StdI->
box[0][1];
783 pos[1][1] = StdI->
direct[0][1] * (double)StdI->
box[0][0] + StdI->
direct[1][1] * (
double)StdI->
box[0][1];
784 pos[2][0] = StdI->
direct[0][0] * (double)StdI->
box[1][0] + StdI->
direct[1][0] * (
double)StdI->
box[1][1];
785 pos[2][1] = StdI->
direct[0][1] * (double)StdI->
box[1][0] + StdI->
direct[1][1] * (
double)StdI->
box[1][1];
786 pos[3][0] = pos[1][0] + pos[2][0];
787 pos[3][1] = pos[1][1] + pos[2][1];
791 for (ipos = 0; ipos < 4; ipos++) {
792 if (pos[ipos][0] < xmin) xmin = pos[ipos][0];
793 if (pos[ipos][0] > xmax) xmax = pos[ipos][0];
794 if (pos[ipos][1] < xmin) xmin = pos[ipos][1];
795 if (pos[ipos][1] > xmax) xmax = pos[ipos][1];
800 fprintf(fp,
"#set terminal pdf color enhanced \\\n");
801 fprintf(fp,
"#dashed dl 1.0 size 20.0cm, 20.0cm \n");
802 fprintf(fp,
"#set output \"lattice.pdf\"\n");
803 fprintf(fp,
"set xrange [%f: %f]\n", xmin, xmax);
804 fprintf(fp,
"set yrange [%f: %f]\n", xmin, xmax);
805 fprintf(fp,
"set size square\n");
806 fprintf(fp,
"unset key\n");
807 fprintf(fp,
"unset tics\n");
808 fprintf(fp,
"unset border\n");
810 fprintf(fp,
"set style line 1 lc 1 lt 1\n");
811 fprintf(fp,
"set style line 2 lc 5 lt 1\n");
812 fprintf(fp,
"set style line 3 lc 0 lt 1\n");
814 fprintf(fp,
"set arrow from %f, %f to %f, %f nohead front ls 3\n", pos[0][0], pos[0][1], pos[1][0], pos[1][1]);
815 fprintf(fp,
"set arrow from %f, %f to %f, %f nohead front ls 3\n", pos[1][0], pos[1][1], pos[3][0], pos[3][1]);
816 fprintf(fp,
"set arrow from %f, %f to %f, %f nohead front ls 3\n", pos[3][0], pos[3][1], pos[2][0], pos[2][1]);
817 fprintf(fp,
"set arrow from %f, %f to %f, %f nohead front ls 3\n", pos[2][0], pos[2][1], pos[0][0], pos[0][1]);
835 double complex *Cphase,
839 int iCell, jCell, kCell, ii;
840 int nBox[3], jCellV[3];
842 dR[0] = - (double)diW + StdI->
tau[isiteUC][0] - StdI->
tau[jsiteUC][0];
843 dR[1] = - (
double)diL + StdI->
tau[isiteUC][1] - StdI->
tau[jsiteUC][1];
844 dR[2] = - (double)diH + StdI->
tau[isiteUC][2] - StdI->
tau[jsiteUC][2];
846 jCellV[0] = iW + diW;
847 jCellV[1] = iL + diL;
848 jCellV[2] = iH + diH;
851 for (ii = 0; ii < 3; ii++) *Cphase *= cpow(StdI->
ExpPhase[ii], (
double)nBox[ii]);
853 for (kCell = 0; kCell < StdI->
NCell; kCell++) {
854 if (jCellV[0] == StdI->
Cell[kCell][0] &&
855 jCellV[1] == StdI->
Cell[kCell][1] &&
856 jCellV[2] == StdI->
Cell[kCell][2])
860 if (iW == StdI->
Cell[kCell][0] &&
861 iL == StdI->
Cell[kCell][1] &&
862 iH == StdI->
Cell[kCell][2])
867 *isite = iCell * StdI->
NsiteUC + isiteUC;
868 *jsite = jCell * StdI->
NsiteUC + jsiteUC;
869 if (strcmp(StdI->
model,
"kondo") == 0) {
889 double complex *Cphase,
893 double xi, yi, xj, yj;
897 StdFace_FindSite(StdI, iW, iL, 0, -diW, -diL, 0, jsiteUC, isiteUC, isite, jsite, Cphase, dR);
899 xi = StdI->
direct[0][0] * ((double)iW + StdI->
tau[jsiteUC][0])
900 + StdI->
direct[1][0] * ((double)iL + StdI->
tau[jsiteUC][1]);
901 yi = StdI->
direct[0][1] * ((double)iW + StdI->
tau[jsiteUC][0])
902 + StdI->
direct[1][1] * ((double)iL + StdI->
tau[jsiteUC][1]);
904 xj = StdI->
direct[0][0] * ((double)(iW - diW) + StdI->
tau[isiteUC][0])
905 + StdI->
direct[1][0] * ((
double)(iL - diL) + StdI->
tau[isiteUC][1]);
906 yj = StdI->
direct[0][1] * ((double)(iW - diW) + StdI->
tau[isiteUC][0])
907 + StdI->
direct[1][1] * ((
double)(iL - diL) + StdI->
tau[isiteUC][1]);
909 if (*isite < 10)fprintf(fp,
"set label \"%1d\" at %f, %f center front\n", *isite, xi, yi);
910 else fprintf(fp,
"set label \"%2d\" at %f, %f center front\n", *isite, xi, yi);
911 if (*jsite < 10)fprintf(fp,
"set label \"%1d\" at %f, %f center front\n", *jsite, xj, yj);
912 else fprintf(fp,
"set label \"%2d\" at %f, %f center front\n", *jsite, xj, yj);
914 fprintf(fp,
"set arrow from %f, %f to %f, %f nohead ls %d\n", xi, yi, xj, yj, connect);
918 StdFace_FindSite(StdI, iW, iL, 0, diW, diL, 0, isiteUC, jsiteUC, isite, jsite, Cphase, dR);
920 xi = StdI->
direct[1][0] * ((double)iL + StdI->
tau[isiteUC][1])
921 + StdI->
direct[0][0] * ((double)iW + StdI->
tau[isiteUC][0]);
922 yi = StdI->
direct[1][1] * ((double)iL + StdI->
tau[isiteUC][1])
923 + StdI->
direct[0][1] * ((double)iW + StdI->
tau[isiteUC][0]);
925 xj = StdI->
direct[0][0] * ((double)(iW + diW) + StdI->
tau[jsiteUC][0])
926 + StdI->
direct[1][0] * ((
double)(iL + diL) + StdI->
tau[jsiteUC][1]);
927 yj = StdI->
direct[0][1] * ((double)(iW + diW) + StdI->
tau[jsiteUC][0])
928 + StdI->
direct[1][1] * ((
double)(iL + diL) + StdI->
tau[jsiteUC][1]);
930 if (*isite < 10)fprintf(fp,
"set label \"%1d\" at %f, %f center front\n", *isite, xi, yi);
931 else fprintf(fp,
"set label \"%2d\" at %f, %f center front\n", *isite, xi, yi);
932 if (*jsite < 10)fprintf(fp,
"set label \"%1d\" at %f, %f center front\n", *jsite, xj, yj);
933 else fprintf(fp,
"set label \"%2d\" at %f, %f center front\n", *jsite, xj, yj);
935 fprintf(fp,
"set arrow from %f, %f to %f, %f nohead ls %d\n", xi, yi, xj, yj, connect);
942 int ii, jj, kk, isite, iCell;
945 fp = fopen(
"lattice.xsf",
"w");
946 fprintf(fp,
"CRYSTAL\n");
947 fprintf(fp,
"PRIMVEC\n");
948 for (ii = 0; ii < 3; ii++) {
949 for (jj = 0; jj < 3; jj++) {
951 for (kk = 0; kk < 3; kk++)
952 vec[jj] += (
double)StdI->
box[ii][kk] * StdI->
direct[kk][jj];
954 fprintf(fp,
"%15.5f %15.5f %15.5f\n", vec[0], vec[1], vec[2]);
956 fprintf(fp,
"PRIMCOORD\n");
958 for (iCell = 0; iCell < StdI->
NCell; iCell++) {
959 for (isite = 0; isite < StdI->
NsiteUC; isite++) {
960 for (jj = 0; jj < 3; jj++) {
962 for (kk = 0; kk < 3; kk++)
963 vec[jj] += ((
double)StdI->
Cell[iCell][kk] + StdI->
tau[isite][kk])
966 fprintf(fp,
"H %15.5f %15.5f %15.5f\n", vec[0], vec[1], vec[2]);
984 char Jname[3][3][10];
986 strcpy(Jname[0][0],
"x\0");
987 strcpy(Jname[0][1],
"xy\0");
988 strcpy(Jname[0][2],
"xz\0");
989 strcpy(Jname[1][0],
"yx\0");
990 strcpy(Jname[1][1],
"y\0");
991 strcpy(Jname[1][2],
"yz\0");
992 strcpy(Jname[2][0],
"zx\0");
993 strcpy(Jname[2][1],
"zy\0");
994 strcpy(Jname[2][2],
"z\0");
996 if (isnan(JAll) == 0 && isnan(J0All) == 0) {
997 fprintf(stdout,
"\n ERROR! %s conflict !\n\n", J0name);
1000 for (i1 = 0; i1 < 3; i1++) {
1001 for (i2 = 0; i2 < 3; i2++) {
1002 if (isnan(JAll) == 0 && isnan(J[i1][i2]) == 0) {
1003 fprintf(stdout,
"\n ERROR! J%s conflict !\n\n", Jname[i1][i2]);
1006 else if (isnan(J0All) == 0 && isnan(J[i1][i2]) == 0) {
1007 fprintf(stdout,
"\n ERROR! %s and J%s conflict !\n\n",
1008 J0name, Jname[i1][i2]);
1011 else if (isnan(J0All) == 0 && isnan(J0[i1][i2]) == 0) {
1012 fprintf(stdout,
"\n ERROR! %s and %s%s conflict !\n\n", J0name,
1013 J0name, Jname[i1][i2]);
1016 else if (isnan(J0[i1][i2]) == 0 && isnan(JAll) == 0) {
1017 fprintf(stdout,
"\n ERROR! %s%s conflict !\n\n",
1018 J0name, Jname[i1][i2]);
1024 for (i1 = 0; i1 < 3; i1++) {
1025 for (i2 = 0; i2 < 3; i2++) {
1026 for (i3 = 0; i3 < 3; i3++) {
1027 for (i4 = 0; i4 < 3; i4++) {
1028 if (isnan(J0[i1][i2]) == 0 && isnan(J[i3][i4]) == 0) {
1029 fprintf(stdout,
"\n ERROR! %s%s and J%s conflict !\n\n",
1030 J0name, Jname[i1][i2], Jname[i3][i4]);
1038 for (i1 = 0; i1 < 3; i1++) {
1039 for (i2 = 0; i2 < 3; i2++) {
1040 if (isnan(J0[i1][i2]) == 0)
1041 fprintf(stdout,
" %14s%s = %-10.5f\n", J0name, Jname[i1][i2], J0[i1][i2]);
1042 else if (isnan(J[i1][i2]) == 0) {
1043 J0[i1][i2] = J[i1][i2];
1044 fprintf(stdout,
" %14s%s = %-10.5f\n", J0name, Jname[i1][i2], J0[i1][i2]);
1046 else if (i1 == i2 && isnan(J0All) == 0) {
1048 fprintf(stdout,
" %14s%s = %-10.5f\n", J0name, Jname[i1][i2], J0[i1][i2]);
1050 else if (i1 == i2 && isnan(JAll) == 0) {
1052 fprintf(stdout,
" %14s%s = %-10.5f\n", J0name, Jname[i1][i2], J0[i1][i2]);
1070 char Jname[3][3][10];
1072 strcpy(Jname[0][0],
"x\0");
1073 strcpy(Jname[0][1],
"xy\0");
1074 strcpy(Jname[0][2],
"xz\0");
1075 strcpy(Jname[1][0],
"yx\0");
1076 strcpy(Jname[1][1],
"y\0");
1077 strcpy(Jname[1][2],
"yz\0");
1078 strcpy(Jname[2][0],
"zx\0");
1079 strcpy(Jname[2][1],
"zy\0");
1080 strcpy(Jname[2][2],
"z\0");
1082 for (i1 = 0; i1 < 3; i1++) {
1083 for (i2 = 0; i2 < 3; i2++) {
1084 if (isnan(JpAll) == 0 && isnan(Jp[i1][i2]) == 0) {
1085 fprintf(stdout,
"\n ERROR! %s and %s%s conflict !\n\n", Jpname,
1086 Jpname, Jname[i1][i2]);
1092 for (i1 = 0; i1 < 3; i1++) {
1093 for (i2 = 0; i2 < 3; i2++) {
1094 if (isnan(Jp[i1][i2]) == 0)
1095 fprintf(stdout,
" %14s%s = %-10.5f\n", Jpname, Jname[i1][i2], Jp[i1][i2]);
1096 else if (i1 == i2 && isnan(JpAll) == 0) {
1098 fprintf(stdout,
" %14s%s = %-10.5f\n", Jpname, Jname[i1][i2], Jp[i1][i2]);
1117 if (isnan(V) == 0 && isnan(*V0) == 0) {
1118 fprintf(stdout,
"\n ERROR! %s conflicts !\n\n", V0name);
1121 else if (isnan(*V0) == 0)
1122 fprintf(stdout,
" %15s = %-10.5f\n", V0name, *V0);
1123 else if (isnan(V) == 0) {
1125 fprintf(stdout,
" %15s = %-10.5f\n", V0name, *V0);
1142 if (isnan(creal(t)) == 0 && isnan(creal(*t0)) == 0) {
1143 fprintf(stdout,
"\n ERROR! %s conflicts !\n\n", t0name);
1146 else if (isnan(creal(*t0)) == 0)
1147 fprintf(stdout,
" %15s = %-10.5f %-10.5f\n", t0name, creal(*t0), cimag(*t0));
1148 else if (isnan(creal(t)) == 0) {
1150 fprintf(stdout,
" %15s = %-10.5f %-10.5f\n", t0name, creal(*t0), cimag(*t0));
1161 int isite, iCell, ii;
1163 fp = fopen(
"geometry.dat",
"w");
1165 for (ii = 0; ii < 3; ii++)
1166 fprintf(fp,
"%25.15e %25.15e %25.15e\n",
1168 fprintf(fp,
"%25.15e %25.15e %25.15e\n",
1170 for (ii = 0; ii < 3; ii++)
1171 fprintf(fp,
"%d %d %d\n",
1172 StdI->
box[ii][0], StdI->
box[ii][1], StdI->
box[ii][2]);
1174 for (iCell = 0; iCell < StdI->
NCell; iCell++) {
1175 for (isite = 0; isite < StdI->
NsiteUC; isite++) {
1176 fprintf(fp,
"%d %d %d %d\n",
1177 StdI->
Cell[iCell][0] - StdI->
Cell[0][0],
1178 StdI->
Cell[iCell][1] - StdI->
Cell[0][1],
1179 StdI->
Cell[iCell][2] - StdI->
Cell[0][2],
1183 if (strcmp(StdI->
model,
"kondo") == 0) {
1184 for (iCell = 0; iCell < StdI->
NCell; iCell++) {
1185 for (isite = 0; isite < StdI->
NsiteUC; isite++) {
1186 fprintf(fp,
"%d %d %d %d\n",
1187 StdI->
Cell[iCell][0] - StdI->
Cell[0][0],
1188 StdI->
Cell[iCell][1] - StdI->
Cell[0][1],
1189 StdI->
Cell[iCell][2] - StdI->
Cell[0][2],
1212 StdI->
transindx = (
int **)malloc(
sizeof(
int*) * ntransMax);
1213 StdI->
trans = (
double complex *)malloc(
sizeof(
double complex) * ntransMax);
1214 for (ii = 0; ii < ntransMax; ii++) {
1215 StdI->
transindx[ii] = (
int *)malloc(
sizeof(
int) * 4);
1219 if (strcmp(StdI->
method,
"timeevolution") == 0 && StdI->
PumpBody == 1) {
1222 StdI->
pump = (
double complex **)malloc(
sizeof(
double complex*) * StdI->
Lanczos_max);
1224 StdI->
npump[it] = 0;
1225 StdI->
pumpindx[it] = (
int **)malloc(
sizeof(
int*) * ntransMax);
1226 StdI->
pump[it] = (
double complex *)malloc(
sizeof(
double complex) * ntransMax);
1227 for (ii = 0; ii < ntransMax; ii++) {
1228 StdI->
pumpindx[it][ii] = (
int *)malloc(
sizeof(
int) * 4);
1236 StdI->
intrindx = (
int **)malloc(
sizeof(
int*) * nintrMax);
1237 StdI->
intr = (
double complex *)malloc(
sizeof(
double complex) * nintrMax);
1238 for (ii = 0; ii < nintrMax; ii++) {
1239 StdI->
intrindx[ii] = (
int *)malloc(
sizeof(
int) * 8);
1245 StdI->
CintraIndx = (
int **)malloc(
sizeof(
int*) * nintrMax);
1246 StdI->
Cintra = (
double *)malloc(
sizeof(
double) * nintrMax);
1247 for (ii = 0; ii < nintrMax; ii++) {
1248 StdI->
CintraIndx[ii] = (
int *)malloc(
sizeof(
int) * 1);
1254 StdI->
CinterIndx = (
int **)malloc(
sizeof(
int*) * nintrMax);
1255 StdI->
Cinter = (
double *)malloc(
sizeof(
double) * nintrMax);
1256 for (ii = 0; ii < nintrMax; ii++) {
1257 StdI->
CinterIndx[ii] = (
int *)malloc(
sizeof(
int) * 2);
1263 StdI->
HundIndx = (
int **)malloc(
sizeof(
int*) * nintrMax);
1264 StdI->
Hund = (
double *)malloc(
sizeof(
double) * nintrMax);
1265 for (ii = 0; ii < nintrMax; ii++) {
1266 StdI->
HundIndx[ii] = (
int *)malloc(
sizeof(
int) * 2);
1272 StdI->
ExIndx = (
int **)malloc(
sizeof(
int*) * nintrMax);
1273 StdI->
Ex = (
double *)malloc(
sizeof(
double) * nintrMax);
1274 for (ii = 0; ii < nintrMax; ii++) {
1275 StdI->
ExIndx[ii] = (
int *)malloc(
sizeof(
int) * 2);
1281 StdI->
PLIndx = (
int **)malloc(
sizeof(
int*) * nintrMax);
1282 StdI->
PairLift = (
double *)malloc(
sizeof(
double) * nintrMax);
1283 for (ii = 0; ii < nintrMax; ii++) {
1284 StdI->
PLIndx[ii] = (
int *)malloc(
sizeof(
int) * 2);
1290 StdI->
PHIndx = (
int **)malloc(
sizeof(
int*) * nintrMax);
1291 StdI->
PairHopp = (
double *)malloc(
sizeof(
double) * nintrMax);
1292 for (ii = 0; ii < nintrMax; ii++) {
1293 StdI->
PHIndx[ii] = (
int *)malloc(
sizeof(
int) * 2);
1302 static void StdFace_FoldSiteSub(
1309 int ii, jj, iCellV_frac[3];
1313 for (ii = 0; ii < 3; ii++) {
1314 iCellV_frac[ii] = 0;
1315 for (jj = 0; jj < 3; jj++)iCellV_frac[ii] += StdI->rboxsub[ii][jj] * iCellV[jj];
1320 for (ii = 0; ii < 3; ii++)
1321 nBox[ii] = (iCellV_frac[ii] + StdI->NCellsub * 1000) / StdI->NCellsub - 1000;
1325 for (ii = 0; ii < 3; ii++)
1326 iCellV_frac[ii] -= StdI->NCellsub*(nBox[ii]);
1328 for (ii = 0; ii < 3; ii++) {
1329 iCellV_fold[ii] = 0;
1330 for (jj = 0; jj < 3; jj++) iCellV_fold[ii] += StdI->boxsub[jj][ii] * iCellV_frac[jj];
1331 iCellV_fold[ii] = (iCellV_fold[ii] + StdI->NCellsub * 1000) / StdI->NCellsub - 1000;
1341 int jsite, iCell, jCell, kCell;
1342 int nBox[3], iCellV[3], jCellV[3], ii;
1346 Sym = (
int **)malloc(
sizeof(
int*) * StdI->
nsite);
1347 Anti = (
int **)malloc(
sizeof(
int*) * StdI->
nsite);
1348 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
1349 Sym[jsite] = (
int *)malloc(
sizeof(
int) * StdI->
nsite);
1350 Anti[jsite] = (
int *)malloc(
sizeof(
int) * StdI->
nsite);
1356 for (iCell = 0; iCell < StdI->
NCell; iCell++) {
1358 StdFace_FoldSiteSub(StdI, StdI->
Cell[iCell], nBox, iCellV);
1362 if (iCellV[0] == StdI->
Cell[iCell][0] &&
1363 iCellV[1] == StdI->
Cell[iCell][1] &&
1364 iCellV[2] == StdI->
Cell[iCell][2]) {
1368 for (jCell = 0; jCell < StdI->
NCell; jCell++) {
1370 for (ii = 0; ii < 3; ii++)jCellV[ii] = StdI->
Cell[jCell][ii] + iCellV[ii];
1373 for (kCell = 0; kCell < StdI->
NCell; kCell++) {
1374 if (jCellV[0] == StdI->
Cell[kCell][0] &&
1375 jCellV[1] == StdI->
Cell[kCell][1] &&
1376 jCellV[2] == StdI->
Cell[kCell][2])
1379 for (jsite = 0; jsite < StdI->
NsiteUC; jsite++) {
1381 Sym[StdI->NSym][jCell*StdI->
NsiteUC + jsite] = kCell*StdI->
NsiteUC + jsite;
1382 Anti[StdI->NSym][jCell*StdI->
NsiteUC + jsite]
1387 if (strcmp(StdI->
model,
"kondo") == 0) {
1389 Anti[StdI->NSym][StdI->
nsite / 2 + jCell*StdI->
NsiteUC + jsite]
1404 fp = fopen(
"qptransidx.def",
"w");
1405 fprintf(fp,
"=============================================\n");
1406 fprintf(fp,
"NQPTrans %10d\n", StdI->NSym);
1407 fprintf(fp,
"=============================================\n");
1408 fprintf(fp,
"======== TrIdx_TrWeight_and_TrIdx_i_xi ======\n");
1409 fprintf(fp,
"=============================================\n");
1410 for (iSym = 0; iSym < StdI->NSym; iSym++) {
1411 fprintf(fp,
"%d %10.5f\n", iSym, 1.0);
1413 for (iSym = 0; iSym < StdI->NSym; iSym++) {
1414 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
1415 if (Anti[iSym][jsite] % 2 == 0) Anti[iSym][jsite] = 1;
1416 else Anti[iSym][jsite] = -1;
1418 fprintf(fp,
"%5d %5d %5d %5d\n", iSym, jsite, Sym[iSym][jsite], Anti[iSym][jsite]);
1421 fprintf(fp,
"%5d %5d %5d\n", iSym, jsite, Sym[iSym][jsite]);
1427 fprintf(stdout,
" qptransidx.def is written.\n");
1429 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
1440 static void StdFace_InitSiteSub(
struct StdIntList *StdI)
1442 int ii, jj, kk, prod;
1446 if ((StdI->Lsub != StdI->
NaN_i || StdI->Wsub != StdI->
NaN_i || StdI->Hsub != StdI->
NaN_i)
1447 && (StdI->boxsub[0][0] != StdI->
NaN_i || StdI->boxsub[0][1] != StdI->
NaN_i || StdI->boxsub[0][2] != StdI->
NaN_i ||
1448 StdI->boxsub[1][0] != StdI->
NaN_i || StdI->boxsub[1][1] != StdI->
NaN_i || StdI->boxsub[1][2] != StdI->
NaN_i ||
1449 StdI->boxsub[2][0] != StdI->
NaN_i || StdI->boxsub[2][1] != StdI->
NaN_i || StdI->boxsub[2][2] != StdI->
NaN_i))
1451 fprintf(stdout,
"\nERROR ! (Lsub, Wsub, Hsub) and (a0Wsub, ..., a2Hsub) conflict !\n\n");
1454 else if (StdI->Wsub != StdI->
NaN_i || StdI->Lsub != StdI->
NaN_i || StdI->Hsub != StdI->
NaN_i) {
1458 for (ii = 0; ii < 3; ii++)
for (jj = 0; jj < 3; jj++)
1459 StdI->boxsub[ii][jj] = 0;
1460 StdI->boxsub[0][0] = StdI->Wsub;
1461 StdI->boxsub[1][1] = StdI->Lsub;
1462 StdI->boxsub[2][2] = StdI->Hsub;
1479 for (ii = 0; ii < 3; ii++) {
1480 StdI->NCellsub += StdI->boxsub[0][ii]
1481 * StdI->boxsub[1][(ii + 1) % 3]
1482 * StdI->boxsub[2][(ii + 2) % 3]
1483 - StdI->boxsub[0][ii]
1484 * StdI->boxsub[1][(ii + 2) % 3]
1485 * StdI->boxsub[2][(ii + 1) % 3];
1487 printf(
" Number of Cell in the sublattice: %d\n", abs(StdI->NCellsub));
1488 if (StdI->NCellsub == 0) {
1492 for (ii = 0; ii < 3; ii++) {
1493 for (jj = 0; jj < 3; jj++) {
1494 StdI->rboxsub[ii][jj] = StdI->boxsub[(ii + 1) % 3][(jj + 1) % 3] * StdI->boxsub[(ii + 2) % 3][(jj + 2) % 3]
1495 - StdI->boxsub[(ii + 1) % 3][(jj + 2) % 3] * StdI->boxsub[(ii + 2) % 3][(jj + 1) % 3];
1498 if (StdI->NCellsub < 0) {
1499 for (ii = 0; ii < 3; ii++)
1500 for (jj = 0; jj < 3; jj++)
1501 StdI->rboxsub[ii][jj] *= -1;
1502 StdI->NCellsub *= -1;
1507 for (ii = 0; ii < 3; ii++) {
1508 for (jj = 0; jj < 3; jj++) {
1510 for (kk = 0; kk < 3; kk++) prod += StdI->rboxsub[ii][kk] * (
double)StdI->
box[jj][kk];
1511 if (prod % StdI->NCellsub != 0) {
1512 printf(
"\n ERROR ! Sublattice is INCOMMENSURATE !\n\n");
1521 void StdFace_generate_orb(
struct StdIntList *StdI) {
1522 int iCell, jCell, kCell, iCell2, jCell2, iOrb, isite, jsite, Anti;
1523 int nBox[3], iCellV[3], jCellV[3], dCellV[3], ii;
1526 StdFace_InitSiteSub(StdI);
1528 StdI->Orb = (
int **)malloc(
sizeof(
int*) * StdI->
nsite);
1529 StdI->AntiOrb = (
int **)malloc(
sizeof(
int*) * StdI->
nsite);
1530 for (isite = 0; isite < StdI->
nsite; isite++) {
1531 StdI->Orb[isite] = (
int *)malloc(
sizeof(
int) * StdI->
nsite);
1532 StdI->AntiOrb[isite] = (
int *)malloc(
sizeof(
int) * StdI->
nsite);
1534 CellDone = (
int **)malloc(
sizeof(
int*) * StdI->
NCell);
1535 for (iCell = 0; iCell < StdI->
NCell; iCell++) {
1536 CellDone[iCell] = (
int *)malloc(
sizeof(
int) * StdI->
NCell);
1537 for (jCell = 0; jCell < StdI->
NCell; jCell++) {
1538 CellDone[iCell][jCell] = 0;
1543 for (iCell = 0; iCell < StdI->
NCell; iCell++) {
1545 StdFace_FoldSiteSub(StdI, StdI->
Cell[iCell], nBox, iCellV);
1549 for (kCell = 0; kCell < StdI->
NCell; kCell++) {
1550 if (iCellV[0] == StdI->
Cell[kCell][0] &&
1551 iCellV[1] == StdI->
Cell[kCell][1] &&
1552 iCellV[2] == StdI->
Cell[kCell][2])
1558 for (jCell = 0; jCell < StdI->
NCell; jCell++) {
1560 for (ii = 0; ii < 3; ii++)
1561 jCellV[ii] = StdI->
Cell[jCell][ii] + iCellV[ii] - StdI->
Cell[iCell][ii];
1565 for (kCell = 0; kCell < StdI->
NCell; kCell++) {
1566 if (jCellV[0] == StdI->
Cell[kCell][0] &&
1567 jCellV[1] == StdI->
Cell[kCell][1] &&
1568 jCellV[2] == StdI->
Cell[kCell][2])
1576 for (ii = 0; ii < 3; ii++)
1577 dCellV[ii] = StdI->
Cell[jCell][ii] - StdI->
Cell[iCell][ii];
1580 for (ii = 0; ii < 3; ii++)Anti += StdI->
AntiPeriod[ii] * nBox[ii];
1581 if (Anti % 2 == 0) Anti = 1;
1584 for (isite = 0; isite < StdI->
NsiteUC; isite++) {
1585 for (jsite = 0; jsite < StdI->
NsiteUC; jsite++) {
1587 if (CellDone[iCell2][jCell2] == 0) {
1588 StdI->Orb[iCell2*StdI->
NsiteUC + isite][jCell2*StdI->
NsiteUC + jsite] = iOrb;
1589 StdI->AntiOrb[iCell2*StdI->
NsiteUC + isite][jCell2*StdI->
NsiteUC + jsite] = Anti;
1592 StdI->Orb[iCell*StdI->
NsiteUC + isite][jCell*StdI->
NsiteUC + jsite]
1593 = StdI->Orb[iCell2*StdI->
NsiteUC + isite][jCell2*StdI->
NsiteUC + jsite];
1594 StdI->AntiOrb[iCell*StdI->
NsiteUC + isite][jCell*StdI->
NsiteUC + jsite] = Anti;
1596 if (strcmp(StdI->
model,
"kondo") == 0) {
1597 if (CellDone[iCell2][jCell2] == 0) {
1598 StdI->Orb[StdI->
nsite / 2 + iCell2*StdI->
NsiteUC + isite]
1599 [ jCell2*StdI->
NsiteUC + jsite] = iOrb;
1600 StdI->AntiOrb[StdI->
nsite / 2 + iCell2*StdI->
NsiteUC + isite]
1601 [ jCell2*StdI->
NsiteUC + jsite] = Anti;
1603 StdI->Orb[ iCell2*StdI->
NsiteUC + isite]
1604 [StdI->
nsite / 2 + jCell2*StdI->
NsiteUC + jsite] = iOrb;
1605 StdI->AntiOrb[ iCell2*StdI->
NsiteUC + isite]
1606 [StdI->
nsite / 2 + jCell2*StdI->
NsiteUC + jsite] = Anti;
1608 StdI->Orb[StdI->
nsite / 2 + iCell2*StdI->
NsiteUC + isite]
1609 [StdI->
nsite / 2 + jCell2*StdI->
NsiteUC + jsite] = iOrb;
1610 StdI->AntiOrb[StdI->
nsite / 2 + iCell2*StdI->
NsiteUC + isite]
1611 [StdI->
nsite / 2 + jCell2*StdI->
NsiteUC + jsite] = Anti;
1614 StdI->Orb[StdI->
nsite / 2 + iCell*StdI->
NsiteUC + isite]
1615 [ jCell*StdI->
NsiteUC + jsite]
1616 = StdI->Orb[StdI->
nsite / 2 + iCell2*StdI->
NsiteUC + isite]
1617 [ jCell2*StdI->
NsiteUC + jsite];
1618 StdI->AntiOrb[StdI->
nsite / 2 + iCell*StdI->
NsiteUC + isite]
1619 [ jCell*StdI->
NsiteUC + jsite] = Anti;
1620 StdI->Orb[ iCell*StdI->
NsiteUC + isite]
1622 = StdI->Orb[ iCell2*StdI->
NsiteUC + isite]
1624 StdI->AntiOrb[iCell*StdI->
NsiteUC + isite]
1625 [StdI->
nsite / 2 + jCell*StdI->
NsiteUC + jsite] = Anti;
1626 StdI->Orb[StdI->
nsite / 2 + iCell*StdI->
NsiteUC + isite]
1628 = StdI->Orb[StdI->
nsite / 2 + iCell2*StdI->
NsiteUC + isite]
1630 StdI->AntiOrb[StdI->
nsite / 2 + iCell*StdI->
NsiteUC + isite]
1631 [StdI->
nsite / 2 + jCell*StdI->
NsiteUC + jsite] = Anti;
1636 CellDone[iCell2][jCell2] = 1;
1642 for (iCell = 0; iCell < StdI->
NCell; iCell++) free(CellDone[iCell]);
1651 int isite, jsite, isiteUC, jsiteUC, revarsal, isite1, jsite1, iorb;
1652 int NJastrow, iJastrow;
1655 double complex Cphase;
1658 Jastrow = (
int **)malloc(
sizeof(
int*) * StdI->
nsite);
1659 for (isite = 0; isite < StdI->
nsite; isite++)
1660 Jastrow[isite] = (
int *)malloc(
sizeof(
int) * StdI->
nsite);
1662 if (abs(StdI->NMPTrans) == 1 || StdI->NMPTrans == StdI->
NaN_i) {
1666 for (isite = 0; isite < StdI->
nsite; isite++) {
1667 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
1668 Jastrow[isite][jsite] = StdI->Orb[isite][jsite];
1674 for (iorb = 0; iorb < StdI->NOrb; iorb++) {
1675 for (isite = 0; isite < StdI->
nsite; isite++) {
1676 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
1677 if (Jastrow[isite][jsite] == iorb) {
1678 Jastrow[jsite][isite] = Jastrow[isite][jsite];
1684 if (strcmp(StdI->
model,
"hubbard") == 0) NJastrow = 0;
1686 for (isite = 0; isite < StdI->
nsite; isite++) {
1691 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
1692 Jastrow[isite][jsite] = -1;
1693 Jastrow[jsite][isite] = -1;
1698 for (jsite = 0; jsite < isite; jsite++) {
1699 if (Jastrow[isite][jsite] >= 0) {
1700 iJastrow = Jastrow[isite][jsite];
1702 for (isite1 = 0; isite1 < StdI->
nsite; isite1++) {
1703 for (jsite1 = 0; jsite1 < StdI->
nsite; jsite1++) {
1704 if (Jastrow[isite1][jsite1] == iJastrow)
1705 Jastrow[isite1][jsite1] = NJastrow;
1712 NJastrow = -NJastrow;
1713 for (isite = 0; isite < StdI->
nsite; isite++) {
1714 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
1715 Jastrow[isite][jsite] = -1 - Jastrow[isite][jsite];
1721 if (strcmp(StdI->
model,
"spin") == 0) {
1724 for (isite = 0; isite < StdI->
nsite; isite++) {
1725 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
1726 Jastrow[isite][jsite] = 0;
1734 if (strcmp(StdI->
model,
"kondo") == 0) {
1738 for (isite = 0; isite < StdI->
nsite; isite++) {
1739 for (jsite = 0; jsite < StdI->
nsite / 2; jsite++) {
1740 Jastrow[isite][jsite] = 0;
1741 Jastrow[jsite][isite] = 0;
1748 for (dCell = 0; dCell < StdI->
NCell; dCell++) {
1751 -StdI->
Cell[dCell][0], -StdI->
Cell[dCell][1], -StdI->
Cell[dCell][2],
1752 0, 0, &isite, &jsite, &Cphase, dR);
1754 iCell = jsite / StdI->
NsiteUC;
1755 if (iCell < dCell) {
1761 else if (iCell == dCell) {
1769 for (isiteUC = 0; isiteUC < StdI->
NsiteUC; isiteUC++) {
1770 for (jsiteUC = 0; jsiteUC < StdI->
NsiteUC; jsiteUC++) {
1771 if (revarsal == 1 && jsiteUC > isiteUC)
continue;
1772 if (isiteUC == jsiteUC &&
1773 StdI->
Cell[dCell][0] == 0 &&
1774 StdI->
Cell[dCell][1] == 0 &&
1775 StdI->
Cell[dCell][2] == 0)
continue;
1777 for (iCell = 0; iCell < StdI->
NCell; iCell++) {
1779 StdI->
Cell[iCell][0], StdI->
Cell[iCell][1], StdI->
Cell[iCell][2],
1780 StdI->
Cell[dCell][0], StdI->
Cell[dCell][1], StdI->
Cell[dCell][2],
1781 isiteUC, jsiteUC, &isite, &jsite, &Cphase, dR);
1783 Jastrow[isite][jsite] = NJastrow;
1784 Jastrow[jsite][isite] = NJastrow;
1796 fp = fopen(
"jastrowidx.def",
"w");
1797 fprintf(fp,
"=============================================\n");
1798 fprintf(fp,
"NJastrowIdx %10d\n", NJastrow);
1799 fprintf(fp,
"ComplexType %10d\n", 0);
1800 fprintf(fp,
"=============================================\n");
1801 fprintf(fp,
"=============================================\n");
1803 for (isite = 0; isite < StdI->
nsite; isite++) {
1804 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
1805 if (isite == jsite)
continue;
1806 fprintf(fp,
"%5d %5d %5d\n", isite, jsite, Jastrow[isite][jsite]);
1810 for (iJastrow = 0; iJastrow < NJastrow; iJastrow++){
1811 if (strcmp(StdI->
model,
"hubbard") == 0 || iJastrow > 0)
1812 fprintf(fp,
"%5d %5d\n", iJastrow, 1);
1814 fprintf(fp,
"%5d %5d\n", iJastrow, 0);
1818 fprintf(stdout,
" jastrowidx.def is written.\n");
1820 for (isite = 0; isite < StdI->
nsite; isite++) free(Jastrow[isite]);
void StdFace_trans(struct StdIntList *StdI, double complex trans0, int isite, int ispin, int jsite, int jspin)
Add transfer to the list set StdIntList::trans and StdIntList::transindx and increment StdIntList::nt...
void StdFace_PrintVal_i(char *valname, int *val, int val0)
Print a valiable (integer) read from the input file if it is not specified in the input file (=214748...
int NPairHopp
Number of pair-hopping term, counted in each lattice file.
int NHund
Number of Hund term, counted in each lattice file.
double Jp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J'x, J'y, J'z, J'xy, etc.
int box[3][3]
The shape of the super-cell. Input parameter a0W, a0L, a0H, etc. or defined from StdIntList::W, etc. in StdFace_InitSite().
double complex ExpPhase[3]
.
double J[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter Jx, Jy, Jz, Jxy, etc.
void StdFace_GeneralJ(struct StdIntList *StdI, double J[3][3], int Si2, int Sj2, int isite, int jsite)
Treat J as a 3*3 matrix [(6S + 1)*(6S' + 1) interactions].
int L
Number of sites along the 2nd axis, input parameter.
double complex * intr
[StdIntList::nintr] Coefficient of general two-body term, malloc in StdFace_MallocInteractions() and ...
void StdFace_HubbardLocal(struct StdIntList *StdI, double mu0, double h0, double Gamma0, double U0, int isite)
Add intra-Coulomb, magnetic field, chemical potential for the itenerant electron. ...
double pi180
, set in StdFace_ResetVals().
void StdFace_PrintGeometry(struct StdIntList *StdI)
Print geometry of sites for the pos-process of correlation function.
double ** At
[StdIntList::nt][3] Vector potential.
double * Ex
[StdIntList::NEx] Coefficient of exchange term, malloc in StdFace_MallocInteractions() and set in Std...
double JpAll
Isotropic, diagonal spin coupling (2nd Near), input parameter Jp.
void StdFace_InputHopp(double complex t, double complex *t0, char *t0name)
Input hopping integral from the input file, if it is not specified, use the default value(0 or the is...
int ** PLIndx
[StdIntList::NPairLift][2] Site indices of pair-lift term, malloc in StdFace_MallocInteractions() and...
double complex * trans
[StdIntList::ntrans] Coefficient of one-body term, malloc in StdFace_MallocInteractions() and set in ...
void StdFace_Hopping(struct StdIntList *StdI, double complex trans0, int isite, int jsite, double *dR)
Add Hopping for the both spin.
double complex t
Nearest-neighbor hopping, input parameter.
void StdFace_MallocInteractions(struct StdIntList *StdI, int ntransMax, int nintrMax)
Malloc Arrays for interactions.
double JAll
Isotropic, diagonal spin coupling (1st Near.), input parameter J.
int S2
Total spin |S| of a local spin, input from file.
int ** ExIndx
[StdIntList::NEx][2] Site indices of exchange term, malloc in StdFace_MallocInteractions() and set in...
int NsiteUC
Number of sites in the unit cell. Defined in the beginning of each lattice function.
void StdFace_InputSpin(double Jp[3][3], double JpAll, char *Jpname)
Input spin-spin interaction other than nearest-neighbor.
void StdFace_InitSite(struct StdIntList *StdI, FILE *fp, int dim)
Initialize the super-cell where simulation is performed.
int W
Number of sites along the 1st axis, input parameter.
int ntrans
Number of transfer, counted in each lattice file.
char model[256]
Name of model, input parameter.
void StdFace_NotUsed_J(char *valname, double JAll, double J[3][3])
Stop HPhi if variables (real) not used is specified in the input file (!=NaN).
void StdFace_PrintVal_dd(char *valname, double *val, double val0, double val1)
Print a valiable (real) read from the input file if it is not specified in the input file (=NaN)...
int AntiPeriod[3]
If corresponding StdIntList::phase = 180, it becomes 1.
int ** CintraIndx
[StdIntList::NCintra][1] Site indices of intra-site Coulomb term, malloc in StdFace_MallocInteraction...
int NCinter
Number of inter-site Coulomb interaction, counted in each lattice file.
double Gamma
Transvars magnetic field, input parameter.
int NCintra
Number of intra-site Coulomb interaction, counted in each lattice file.
int rbox[3][3]
The inversion of StdIntList::box. Set in StdFace_InitSite().
double J0All
Anisotropic, diagonal spin coupling (1st Near), input parameter J0.
double J0[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter J0x, J0y, J0z, J0xy, etc. or set in StdFace_InputSpinNN().
double * Hund
[StdIntList::NHund] Coefficient of Hund term, malloc in StdFace_MallocInteractions() and set in StdFa...
int ** Cell
[StdIntList][3] The cell position in the fractional coordinate. Malloc and Set in StdFace_InitSite()...
double * PairLift
[StdIntList::NPairLift] Coefficient of pair-lift term, malloc in StdFace_MallocInteractions() and set...
double phase[3]
Boundary phase, input parameter phase0, etc.
int *** pumpindx
[StdIntList::nt][StdIntList::npump][4] Site/spin indices of one-body term, malloc in StdFace_MallocIn...
int NPairLift
Number of pair-lift term, counted in each lattice file.
int PumpBody
one- or two-body pumping, defined from StdIntList::PumpType
int * npump
[StdIntList::nt] Number of transfer, counted in each lattice file.
int * locspinflag
[StdIntList::nsite] LocSpin in Expert mode, malloc and set in each lattice file.
int ** HundIndx
[StdIntList::NHund][2] Site indices of Hund term, malloc in StdFace_MallocInteractions() and set in S...
int Lanczos_max
The maxixmum number of iterations, input from file.
double V
Off-site Coulomb potential (1st), input parameter.
double complex t0
Anisotropic hopping (1st), input parameter.
double direct[3][3]
The unit direct lattice vector. Set in StdFace_InitSite().
void StdFace_MagField(struct StdIntList *StdI, int S2, double h, double Gamma, int isite)
Add longitudinal and transvars magnetic field to the list.
void StdFace_NotUsed_d(char *valname, double val)
Stop HPhi if a variable (real) not used is specified in the input file (!=NaN).
double V0
Anisotropic Coulomb potential (1st), input parameter.
double complex ** pump
[StdIntList::nt][StdIntList::npump] Coefficient of one-body term, malloc in StdFace_MallocInteraction...
void StdFace_Coulomb(struct StdIntList *StdI, double V, int isite, int jsite)
Add onsite/offsite Coulomb term to the list StdIntList::Cinter and StdIntList::CinterIndx, and increase the number of them (StdIntList::NCinter).
void StdFace_InputCoulombV(double V, double *V0, char *V0name)
Input off-site Coulomb interaction from the input file, if it is not specified, use the default value...
void StdFace_SetLabel(struct StdIntList *StdI, FILE *fp, int iW, int iL, int diW, int diL, int isiteUC, int jsiteUC, int *isite, int *jsite, int connect, double complex *Cphase, double *dR)
Set Label in the gnuplot display (Only used in 2D system)
int NEx
Number of exchange term, counted in each lattice file.
char method[256]
The name of method, input from file.
int ** intrindx
[StdIntList::nintr][8] Site/spin indices of two-body term, malloc in StdFace_MallocInteractions() and...
void StdFace_PrintVal_d(char *valname, double *val, double val0)
Print a valiable (real) read from the input file if it is not specified in the input file (=NaN)...
int NCell
The number of the unit cell in the super-cell (determinant of StdIntList::box). Set in StdFace_InitSi...
void StdFace_RequiredVal_i(char *valname, int val)
Stop HPhi if a variable (integer) which must be specified is absent in the input file (=2147483647...
static void StdFace_FoldSite(struct StdIntList *StdI, int iCellV[3], int nBox[3], int iCellV_fold[3])
Move a site into the original supercell if it is outside the original supercell.
double * PairHopp
[StdIntList::NPairLift] Coefficient of pair-hopping term, malloc in StdFace_MallocInteractions() and ...
void StdFace_NotUsed_c(char *valname, double complex val)
Stop HPhi if a variable (complex) not used is specified in the input file (!=NaN).
void StdFace_PrintVal_c(char *valname, double complex *val, double complex val0)
Print a valiable (complex) read from the input file if it is not specified in the input file (=NaN)...
int nsite
Number of sites, set in the each lattice file.
int ** transindx
[StdIntList::ntrans][4] Site/spin indices of one-body term, malloc in StdFace_MallocInteractions() an...
int Height
Number of sites along the 3rd axis, input parameter.
Variables used in the Standard mode. These variables are passed as a pointer of the structure(StdIntL...
double * Cintra
[StdIntList::NCintra] Coefficient of intra-site Coulomb term, malloc in StdFace_MallocInteractions() ...
void StdFace_NotUsed_i(char *valname, int val)
Stop HPhi if a variable (integer) not used is specified in the input file (!=2147483647, the upper limt of Int).
void StdFace_PrintXSF(struct StdIntList *StdI)
Print lattice.xsf (XCrysDen format)
int nintr
Number of InterAll, counted in each lattice file.
double h
Longitudinal magnetic field, input parameter.
void StdFace_FindSite(struct StdIntList *StdI, int iW, int iL, int iH, int diW, int diL, int diH, int isiteUC, int jsiteUC, int *isite, int *jsite, double complex *Cphase, double *dR)
Find the index of transfer and interaction.
int ** PHIndx
[StdIntList::NPairLift][2] Site indices of pair-hopping term, malloc in StdFace_MallocInteractions() ...
void StdFace_intr(struct StdIntList *StdI, double complex intr0, int site1, int spin1, int site2, int spin2, int site3, int spin3, int site4, int spin4)
Add interaction (InterAll) to the list Set StdIntList::intr and StdIntList::intrindx and increase the...
int NaN_i
It is used for initializing input parameter. This means that a parameter wich is not specified in inp...
double * Cinter
[StdIntList::NCinter] Coefficient of inter-site Coulomb term, malloc in StdFace_MallocInteractions() ...
double ** tau
Cell-internal site position in the fractional coordinate. Defined in the beginning of each lattice fu...
void StdFace_exit(int errorcode)
MPI Abortation wrapper.
void StdFace_InputSpinNN(double J[3][3], double JAll, double J0[3][3], double J0All, char *J0name)
Input nearest-neighbor spin-spin interaction.
int ** CinterIndx
[StdIntList::NCinter][2] Site indices of inter-site Coulomb term, malloc in StdFace_MallocInteraction...