|
401 | 401 | "function ckio_calc(solver::FLEXSolver)\n", |
402 | 402 | " \"\"\" Calculate irreducible susciptibility chi0(iv,q) \"\"\"\n", |
403 | 403 | " # chi0(tau, r) = -G(tau, r) * G(-tau, -r)\n", |
404 | | - " # For positive taus [0, beta]: G(-tau, -r) = G(beta-tau, r)\n", |
| 404 | + " # For positive taus in (0, beta): G(-tau, -r) = -G(beta-tau, -r) = -G(beta-tau, r) (inversion symmetry),\n", |
| 405 | + " # and G(beta-tau, r) is obtained by reversing the tau array\n", |
405 | 406 | " # => chi0(tau, r) = G(tau, r) * G(beta-tau, r)\n", |
406 | | - " # For symmetric taus [-beta/2, beta/2]: G(-tau, r) is obtained by reversing the tau array\n", |
| 407 | + " # For taus in (-beta/2, beta/2]: G(-tau, r) is obtained by reversing the tau array\n", |
| 408 | + " # only for an even number of points (for an odd number, beta/2 is a point but -beta/2 is not)\n", |
407 | 409 | " # => chi0(tau, r) = -G(tau, r) * G(-tau, r)\n", |
408 | 410 | " grit_reversed = reverse(solver.grit, dims=1)\n", |
409 | 411 | " if solver.mesh.use_positive_taus\n", |
410 | 412 | " # G(tau) * G(beta - tau)\n", |
411 | 413 | " crit = solver.grit .* grit_reversed\n", |
412 | 414 | " else\n", |
413 | 415 | " # - G(tau) * G(- tau)\n", |
| 416 | + " tau = solver.mesh.IR_basis_set.smpl_tau_f.sampling_points\n", |
| 417 | + " @assert reverse(tau) ≈ -tau\n", |
414 | 418 | " crit = -solver.grit .* grit_reversed\n", |
415 | 419 | " end\n", |
416 | 420 | "\n", |
|
497 | 501 | "outputs": [], |
498 | 502 | "source": [ |
499 | 503 | "# initialize calculation\n", |
500 | | - "use_positive_taus = false\n", |
| 504 | + "use_positive_taus = true\n", |
501 | 505 | "\n", |
502 | 506 | "IR_basis_set = FiniteTempBasisSet(beta, Float64(wmax), IR_tol; use_positive_taus=use_positive_taus)\n", |
503 | 507 | "mesh = Mesh(nk1, nk2, IR_basis_set; use_positive_taus=use_positive_taus)\n", |
|
541 | 545 | "source": [ |
542 | 546 | "# plot 2D k-dependence of lowest Matsubara frequency of e.g. chi0\n", |
543 | 547 | "heatmap(myx, myy, real.(solver.ckio[solver.mesh.iw0_b, :, :]),\n", |
544 | | - " title=latexstring(\"\\\\mathrm{Re}\\\\,\\\\chi(k,i\\\\nu_0)\"), xlabel=latexstring(\"k_x/\\\\pi\"), ylabel=latexstring(\"k_y/\\\\pi\"),\n", |
| 548 | + " title=latexstring(\"\\\\mathrm{Re}\\\\,\\\\chi_0(k,\\\\mathrm{i}\\\\nu=0)\"), xlabel=latexstring(\"k_x/\\\\pi\"), ylabel=latexstring(\"k_y/\\\\pi\"),\n", |
545 | 549 | " c=:viridis,\n", |
546 | 550 | " xlim=(0, 2), ylim=(0, 2), aspect_ratio=1.0, size=(370, 300))" |
547 | 551 | ] |
|
681 | 685 | "end\n", |
682 | 686 | "\n", |
683 | 687 | "function frit_calc(gap_solver::LinearizedGapSolver)\n", |
684 | | - " \"\"\" Calculate (linearized) anomalous Green function F = |G|^2 * delta for evaluating the gap equation \"\"\"\n", |
| 688 | + " \"\"\" Calculate (linearized) anomalous Green function F = -|G|^2 * delta for evaluating the gap equation \"\"\"\n", |
685 | 689 | " fkio = -gap_solver.gkio .* conj(gap_solver.gkio) .* gap_solver.delta\n", |
686 | 690 | "\n", |
687 | 691 | " # Fourier transform\n", |
|
793 | 797 | "# numerical parameters\n", |
794 | 798 | "nk1, nk2 = 64, 64 # k-mesh sufficiently dense!\n", |
795 | 799 | "nk = nk1 * nk2\n", |
796 | | - "IR_Lambda = 10^3 # dimensionless IR parameter >= w_max * beta_min = 400\n", |
| 800 | + "IR_Lambda = 10^3 # dimensionless IR parameter >= wmax * beta_max = 400\n", |
797 | 801 | "IR_tol = 1e-7 # accuary for l-cutoff of IR basis functions\n", |
798 | 802 | "sfc_tol = 1e-4 # accuracy for self-consistent iteration\n", |
799 | 803 | "it_max = 30 # maximal number of iterations in self-consistent cycle\n", |
|
802 | 806 | "\n", |
803 | 807 | "# initialize first IR basis set (no recalculation afterwrds)\n", |
804 | 808 | "beta_init = 1.0 / T_values[1]\n", |
805 | | - "use_positive_taus = false\n", |
| 809 | + "use_positive_taus = true\n", |
806 | 810 | "IR_basis_set = FiniteTempBasisSet(beta_init, IR_Lambda / beta_init, IR_tol; use_positive_taus=use_positive_taus)\n", |
807 | 811 | "\n", |
808 | 812 | "# set initial self_energy - will be set to previous calculation step afterwards\n", |
|
0 commit comments