API Documentation libdlr

This is a directory of all libdlr Fortran subroutines. The subroutines are organized into a collection of .f90 source files, contained in ./libdlr/src. For more specific information about variable types and dimensions for a particular subroutine, take a look at the corresponding source file. To see how to use the various subroutines in practice, take a look at the demos located in ./libdlr/demo.

dlr_build.f90

Functions

subroutine ccfine_init(lambda, p, npt, npo, nt, no)

Set parameters for composite Chebyshev fine grid.

Parameters
  • lambda[in] dimensionless cutoff parameter

  • p[out] Chebyshev degree in each subinterval

  • npt[out] number of subintervals on [0,1/2] in imaginary time (total number of subintervals on [0,1] is 2*npt)

  • npo[out] number of subintervals on [0,lambda] in real frequency (total number of subintervals on [-lambda,lambda is 2*npo)

  • nt[out] number of imaginary time fine grid points (=2*p*npt)

  • no[out] number of Matsubara frequency fine grid points (=2*p*npo)

subroutine ccfine(lambda, p, npt, npo, t, om)

Get composite Chebyshev fine grids in tau and omega.

Note: for accurate discretization of Lehmann kernel, use parameters produced by subroutine gridparams.

Parameters
  • lambda[in] dimensionless cutoff parameter

  • p[in] Chebyshev degree in each subinterval

  • npt[in] number of subintervals on [0,1/2] in imaginary time (total number of subintervals on [0,1] is 2*npt)

  • npo[in] number of subintervals on [0,lambda] in real frequency (total number of subintervals on [-lambda,lambda] is 2*npo)

  • t[out] imaginary time fine grid points in relative format

  • om[out] real frequency fine grid points

subroutine dlr_kfine(lambda, p, npt, npo, t, om, kmat, err)

Get fine discretization of Lehmann kernel.

Note: use parameters produced by subroutine ccfine.

Parameters
  • lambda[in] dimensionless cutoff parameter

  • p[in] Chebyshev degree in each subinterval

  • npt[in] number of subintervals on [0,1/2] in imaginary time (total number of subintervals on [0,1] is 2*npt)

  • npo[in] number of subintervals on [0,lambda] in real frequency (total number of subintervals on [-lambda,lambda] is 2*npo)

  • t[in] imaginary time fine grid points in relative format

  • om[in] real frequency fine grid points

  • kmat[out] matrix of Lehmann kernel K(tau,omega) evaluated on fine grid

  • err[out] Error of composite Chebyshev interpolant of K(tau,omega). err(1) is ~= max relative L^inf error in tau over all omega in fine grid. err(2) is ~= max L^inf error in omega over all tau in fine grid.

subroutine dlr_rf(lambda, eps, nt, no, om, kmat, r, dlrrf, oidx)

Get DLR frequency nodes.

Parameters
  • lambda[in] dimensionless cutoff parameter

  • eps[in] DLR error tolerance

  • nt[in] number of imaginary time fine grid points

  • no[in] number of Matsubara frequency fine grid points

  • om[in] Matsubara frequency fine grid points

  • kmat[in] kernel K(tau,omega), sampled at fine grid points

  • r[inout] On input, maximum possible number of DLR basis functions, defining input size of various arrays; on output, number of DLR basis functions.

  • dlrrf[out] DLR frequency nodes

  • oidx[out] column indices of kmat corresponding to DLR frequency nodes

dlr_it.f90

Functions

subroutine dlr_it_build(lambda, eps, r, dlrrf, dlrit)

Get DLR frequency nodes and DLR imaginary time nodes.

Parameters
  • lambda[in] dimensionless cutoff parameter

  • eps[in] DLR error tolerance

  • r[inout] On input, maximum possible number of DLR basis functions, defining input size of various arrays; on output, number of DLR basis functions.

  • dlrrf[out] DLR frequency nodes

  • dlrit[out] DLR imaginary time nodes

subroutine dlr_it(lambda, nt, no, t, kmat, r, oidx, dlrit)

Get DLR imaginary time nodes.

Parameters
  • lambda[in] dimensionless cutoff parameter

  • nt[in] number of imaginary time fine grid points

  • no[in] number of Matsubara frequency fine grid points

  • t[in] imaginary time fine grid points

  • kmat[in] kernel K(tau,omega), sampled at fine grid points

  • r[in] number of DLR basis functions

  • oidx[in] column indices of kmat corresponding to DLR frequency nodes

  • dlrit[out] DLR imaginary time nodes

subroutine dlr_cf2it_init(r, dlrrf, dlrit, cf2it)

Build transform matrix from DLR coefficients to values of DLR expansion on imaginary time grid.

Use the subroutine dlr_cf2it to apply the transformation.

Parameters
  • r[in] number of DLR basis functions

  • dlrrf[in] DLR frequency nodes

  • dlrit[in] DLR imaginary time nodes

  • cf2it[out] DLR coefficients -> imaginary time grid values transform matrix

subroutine dlr_cf2it(r, n, cf2it, gc, g)

Transform DLR coefficients to values of DLR expansion on imaginary time grid.

Parameters
  • r[in] number of DLR basis functions

  • n[in] number of orbital indices

  • cf2it[in] DLR coefficients -> imaginary time grid values transform matrix

  • gc[in] DLR coefficients of Green’s function

  • g[out] values of Green’s function at imaginary time grid points

subroutine dlr_it2cf_init(r, dlrrf, dlrit, it2cf, it2cfp)

Build transform matrix from values of a Green’s function on imaginary time grid to its DLR coefficients; matrix is stored in LU factored form.

Use the subroutine dlr_it2cf to apply the transformation.

Parameters
  • r[in] number of DLR basis functions

  • dlrrf[in] DLR frequency nodes

  • dlrit[in] DLR imaginary time nodes

  • it2cf[out] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU factors

  • it2cfp[out] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU pivots

subroutine dlr_it2cf(r, n, it2cf, it2cfp, g, gc)

Transform values of DLR expansion on imaginary time grid to DLR coefficients.

Parameters
  • r[in] number of DLR basis functions

  • n[in] number of orbital indices

  • it2cf[in] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU factors

  • it2cfp[in] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU pivots

  • g[in] values of Green’s function at imaginary time grid points

  • gc[out] DLR coefficients of Green’s function

subroutine dlr_it2itr_init(r, dlrrf, dlrit, it2cf, it2cfp, it2itr)

Build transform matrix from values of a Green’s function G on imaginary time grid to values of reflection G(1-tau) on imaginary time grid.

Use the subroutine dlr_it2itr to apply the transformation.

Parameters
  • r[in] number of DLR basis functions

  • dlrrf[in] DLR frequency nodes

  • dlrit[in] DLR imaginary time nodes

  • it2cf[in] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU factors

  • it2cfp[in] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU pivots

  • it2itr[out] imaginary time grid values -> reflected imaginary time grid values transform matrix

subroutine dlr_it2itr(r, n, it2itr, g, gr)

Transform values of a Green’s function G on imaginary time grid to values of reflection G(1-tau) on imaginary time grid.

Parameters
  • r[in] number of DLR basis functions

  • n[in] number of orbital indices

  • it2itr[in] DLR coefficients -> imaginary time grid values transform matrix

  • g[in] values of Green’s function at imaginary time grid points

  • gr[in] values of Green’s function at reflected imaginary time grid points

subroutine dlr_it_eval(r, n, dlrrf, gc, t, gt)

Evaluate a DLR expansion at an imaginary time point.

Parameters
  • r[in] number of DLR basis functions

  • n[in] number of orbital indices

  • dlrrf[in] DLR frequency nodes

  • gc[in] DLR coefficients of expansion

  • t[in] imaginary time point in relative format

  • gt[out] value of DLR expansion at t

subroutine dlr_it_fit(r, n, dlrrf, m, tsamp, gsamp, gc)

Get DLR coefficients from scattered data by least squares fitting.

Parameters
  • r[in] number of DLR basis functions

  • n[in] number of orbital indices

  • dlrrf[in] DLR frequency nodes

  • m[in] number of imaginary time points at which Green’s function G is sampled

  • tsamp[in] imaginary time points at which G is sampled, given in relative format

  • gsamp[in] values of G at sampling points

  • gc[out] DLR coefficients of Green’s function

dlr_mf.f90

Functions

subroutine dlr_mf_build(lambda, eps, nmax, xi, r, dlrrf, dlrmf)

Get DLR frequency nodes and Matsubara frequency nodes.

Note: Matsubara frequencies are given by i*omega_n = i*pi*(2n+1) for fermionic Green’s functions, and i*omega_n = i*pi*2n for bosonic Green’s functions. The integers returned in the array dlrmf are the indices n of these frequencies. The input xi controls whether these are indices into fermionic or bosonic Matsubara frequencies. For example, if dlrmf(j) = 3 for some index j, and xi = -1, then the corresponding Matsubara frequency is i*omega_n = i*pi*(2*3+1); if xi = 1, then it is i*omega_n = i*pi*(2*3).

Parameters
  • lambda[in] dimensionless cutoff parameter

  • eps[in] DLR error tolerance

  • nmax[in] Matsubara frequency cutoff

  • xi[in] xi=-1 for fermionic frequencies; xi=1 for bosonic frequencies

  • r[inout] On input, maximum possible number of DLR basis functions, defining input size of various arrays; on output, number of DLR basis functions.

  • dlrrf[out] DLR frequency nodes

  • dlrmf[out] DLR Matsubara frequency nodes

subroutine dlr_mf(nmax, r, dlrrf, xi, dlrmf)

Get DLR Matsubara frequency nodes.

Note: Matsubara frequencies are given by i*omega_n = i*pi*(2n+1) for fermionic Green’s functions, and i*omega_n = i*pi*2n for bosonic Green’s functions. The integers returned in the array dlrmf are the indices n of these frequencies. The input xi controls whether these are indices into fermionic or bosonic Matsubara frequencies. For example, if dlrmf(j) = 3 for some index j, and xi = -1, then the corresponding Matsubara frequency is i*omega_n = i*pi*(2*3+1); if xi = 1, then it is i*omega_n = i*pi*(2*3).

Parameters
  • nmax[in] Matsubara frequency cutoff

  • r[in] number of DLR basis functions

  • dlrrf[in] DLR frequency nodes

  • xi[in] xi=-1 for fermionic frequencies; xi=1 for bosonic frequencies

  • dlrmf[out] DLR Matsubara frequency nodes

subroutine dlr_cf2mf_init(r, dlrrf, dlrmf, xi, cf2mf)

Build transform matrix from DLR coefficients to values of DLR expansion on Matsubara frequency grid.

Use the subroutine dlr_cf2mf to apply the transformation.

Parameters
  • r[in] number of DLR basis functions

  • dlrrf[in] DLR freq nodes

  • dlrmf[in] DLR Matsubara freq nodes

  • xi[in] xi=-1 for fermionic frequencies; xi=1 for bosonic frequencies

  • cf2mf[out] DLR coeffs -> Matsubara freq grid values transform matrix

subroutine dlr_cf2mf(r, n, cf2mf, gc, gn)

Transform DLR coefficients to values of DLR expansion on Matsubara frequency grid.

Parameters
  • r[in] number of DLR basis functions

  • n[in] number of orbital indices

  • cf2mf[in] DLR coefficients -> imaginary time grid values transform matrix

  • gc[in] DLR coefficients of Green’s function

  • gn[out] values of DLR expansion at Matsubara frequency grid points

subroutine dlr_mf2cf_init(nmax, r, dlrrf, dlrmf, xi, mf2cf, mf2cfp)

Build transform matrix from values of a Green’s function on Matsubara frequency grid to its DLR coefficients; matrix is stored in LU factored form.

Use the subroutine dlr_mf2cf to apply the transformation.

Parameters
  • nmax[in] Matsubara frequency cutoff

  • r[in] number of DLR basis functions

  • dlrrf[in] DLR frequency nodes

  • dlrmf[in] DLR Matsubara frequency nodes

  • xi[in] xi=-1 for fermionic frequencies; xi=1 for bosonic frequencies

  • mf2cf[out] Matsubara frequency grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU factors

  • mf2cfp[out] Matsubra frequency grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU pivots

subroutine dlr_mf2cf(r, n, mf2cf, mf2cfp, g, gc)

Transform values of DLR expansion on Matsubara frequency grid to DLR coefficients.

Parameters
  • r[in] number of DLR basis functions

  • n[in] number of orbital indices

  • mf2cf[in] Matsubara frequency grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU factors

  • mf2cfp[in] Matsubra frequency grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU pivots

  • g[in] values of Green’s function at Matsubara freq grid points

  • gc[out] DLR coefficients of Green’s function

subroutine dlr_mf_eval(r, n, dlrrf, xi, gc, nmf, gn)

Evaluate a DLR expansion at a Matsubara frequency point.

Note: Matsubara frequencies are given by i*omega_n = i*pi*(2n+1) for fermionic Green’s functions, and i*omega_n = i*pi*2n for bosonic Green’s functions. The Matsubara frequency at which the DLR expansion is evaluated it determined by the input index nmf, and xi, which determines whether n is an index into a fermionic or bosonic Matsubara frequency. For example, if nmf=11 and xi = -1, then the DLR expansion will be evaluated at the Matsubara frequency i*omega_n = i*pi*(2*11+1); if xi = 1, then it will be evaluated at i*omega_n = i*pi*(2*11).

Parameters
  • r[in] number of DLR basis functions

  • n[in] number of orbital indices

  • dlrrf[in] DLR frequency nodes

  • xi[in] xi=-1 for fermionic frequencies; xi=1 for bosonic frequencies

  • gc[in] DLR coefficients of expansion

  • nmf[in] Matsubara frequency integer

  • gn[out] value of DLR expansion at i*omega_n

subroutine dlr_mf_fit(r, dlrrf, xi, m, nsamp, gsamp, gc)

Get DLR coefficients from scattered data by least squares fitting.

Parameters
  • r[in] number of DLR basis functions

  • dlrrf[in] DLR frequency nodes

  • xi[in] xi=-1 for fermionic frequencies; xi=1 for bosonic frequencies

  • m[in] number of Matsubara frequency points at which Green’s function G is sampled

  • nsamp[in] Matsubara frequency integers at which G is sampled

  • gsamp[in] values of G at sampling points

  • gc[out] DLR coefficients of Green’s function

dlr_utils.f90

Functions

subroutine eqpts_rel(n, t)

Get equispaced points on [0,1] in relative format.

For the definitions of absolute and relative formats, see the readme.

Endpoints of [0,1] are included

Parameters
  • n[in] number of points on [0,1]

  • t[out] equispaced points on [0,1], in relative format

subroutine rel2abs(n, t, tabs)

Convert points on [0,1] from relative format to absolute format.

For the definitions of absolute and relative formats, see the readme.

Note: converting a point from relative to absolute format will, in general, result in a loss of relative accuracy in the location of the point if the point is close to t = 1. For example, in three-digit arithmetic, the point t = 0.999111 could be stored as t* = -0.889e-3 in the relative format, but only as t = 0.999 in the absolute format.

Parameters
  • n[in] number of points to convert

  • t[in] array of points in relative format

  • tabs[out] array of points in absolute format

subroutine abs2rel(n, tabs, t)

Convert a point on [0,1] from absolute format to relative format.

For the definitions of absolute and relative formats, see the readme.

Note: In order to specify points — for example points at which to sample or evaluate a DLR — in absolute format, those points must first be converted to relative format using this subroutine before using them as inputs into any other subroutines. Of course, in order to maintain full relative precision in all calculations, it is necessary to specify points in relative format from the beginning, but in most cases at most a mild loss of accuracy will result from using the absolute format.

Parameters
  • n[in] number of points to convert

  • tabs[in] array of points in absolute format

  • t[out] array of points in relative format

dlr_conv.f90

Functions

subroutine dlr_convtens(beta, xi, r, dlrrf, dlrit, it2cf, it2cfp, phi)

Get tensor taking a set of DLR coefficients to the matrix of convolution by the corresponding Green’s function.

To obtain the matrix C of convolution by a Green’s function G, use the output of this subroutine with the subroutine dlr_convtens.

Parameters
  • beta[in] inverse temperature

  • xi[in] xi=-1 for fermionic case; xi=1 for bosonic case

  • r[in] number of DLR basis functions

  • dlrrf[in] DLR frequency nodes

  • dlrit[in] DLR imaginary time nodes

  • it2cf[in] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU factors

  • it2cfp[in] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU pivots

  • phi[out] tensor taking DLR coefficients of g to matrix C of convolution by g. C takes DLR coefficients of a function f -> DLR grid values of the convolution g * f.

subroutine dlr_convmat(r, n, it2cf, it2cfp, phi, g, gmat)

Get the matrix of convolution by a Green’s function.

The output of this subroutine is the matrix gmat of convolution by a Green’s function G. The subroutine dlr_conv can be used to apply gmat to a vector of imaginary time grid values of a Green’s function F, giving the values of G * F at the imaginary time grid points.

Parameters
  • r[in] number of DLR basis functions

  • n[in] number of orbital indices

  • it2cf[in] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU factors

  • it2cfp[in] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU pivots

  • phi[in] tensor produced by subroutine dlr_convtens taking DLR coefficients of g to matrix of convolution by g.

  • g[in] values of Green’s function at imaginary time grid points

  • gmat[out] matrix of convolution by g

subroutine dlr_conv(r, n, gmat, f, h)

Convolve two Green’s functions.

This subroutine takes the matrix of convolution by a Green’s function G produced by dlr_convmat, and performs the convolution between G and a Green’s function F, given by its values on the imaginary time grid. It returns the values of the convolution H = G * F at the imaginary time grid points.

Parameters
  • r[in] number of DLR basis functions

  • n[in] number of orbital indices

  • gmat[in] matrix of convolution by G

  • f[in] values of Green’s function F at imaginary time grid points

  • h[out] values of convolution H = G * F at imaginary time grid points

subroutine dlr_fstconv_init(beta, r, dlrrf, dlrit, cf2it, fstconv)

Initialize the fast DLR convolution subroutine dlr_fstconv.

The output fstconv of this subroutine should be used as a parameter in every call to the subroutine dlr_fstconv

Parameters
  • beta[in] inverse temperature

  • r[in] number of DLR basis functions

  • dlrrf[in] DLR frequency nodes

  • dlrit[in] DLR imaginary time nodes

  • cf2it[in] DLR coefficients -> imaginary time grid values transform matrix

  • fstconv[out] arrays used for fast convolution

subroutine dlr_fstconv(r, n, cf2it, it2cf, it2cfp, fstconv, f, g, h)

Convolve two Green’s functions using the fast convolution method, which carries out the convolution directly in the DLR coefficient domain.

This subroutine performs the convolution between Green’s functions F and G, given by their values on the imaginary time grid, and returns the values of the convolution H = G * F on the imaginary time grid.

Parameters
  • r[in] number of DLR basis functions

  • n[in] number of orbital indices

  • cf2it[in] DLR coefficients -> imaginary time grid values transform matrix

  • it2cf[in] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU factors

  • it2cfp[in] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU pivots

  • fstconv[in] arrays used for fast convolution

  • f[in] values of Green’s function F at imaginary time grid points

  • g[in] values of Green’s function G at imaginary time grid points

  • h[out] values of convolution H = F * G at imaginary time grid points

subroutine dlr_convtens_vcc(beta, xi, r, dlrrf, dlrit, phivcc)

Get tensor taking a set of DLR coefficients to the matrix of convolution by the corresponding Green’s function, acting from DLR coefficients to DLR grid values.

Given the DLR coefficients of a Green’s function g, applying this tensor produces a matrix A of convolution by g which takes the DLR coefficients of a function f to the DLR grid values of the convolution f * g. Since we typically want a convolution matrix operating on grid values, we typically use the subroutine dlr_convtens instead of this one. Alternatively, one can use the tensor produced by this subroutine with the subroutine dlr_convmat_vcc to produce a convolution matrix operating on grid values.

Parameters
  • beta[in] inverse temperature

  • xi[in] xi=-1 for fermionic case; xi=1 for bosonic case

  • r[in] number of DLR basis functions

  • dlrrf[in] DLR frequency nodes

  • dlrit[in] DLR imaginary time nodes

  • phivcc[out] tensor taking DLR coefficients of g to matrix C of convolution by g. C takes DLR coefficients of a function f -> DLR grid values of the convolution g * f. “vcc” indicates that for the tensor phi_{ijk}, i indexes grid values, and j,k index DLR coefficients.

subroutine dlr_convmat_vcc(r, it2cf, it2cfp, phivcc, g, gmat)

Get the matrix of convolution by a Green’s function from the tensor produced by the subroutine dlr_convtens_vcc.

The output of this subroutine is the matrix gmat of convolution by G. gmat is applied to a vector of imaginary time grid values of a Green’s function F, and returns the values of G * F at the imaginary time grid points.

Parameters
  • r[in] number of DLR basis functions

  • it2cf[in] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU factors

  • it2cfp[in] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU pivots

  • phivcc[in] tensor produced by subroutine dlr_convtens_vcc taking DLR coefficients of g to matrix of convolution by g, acting from DLR coefficients to DLR grid values.

  • g[in] values of Green’s function at imaginary time grid points

  • gmat[out] matrix of convolution by g

subroutine dlr_ipmat(beta, r, dlrit, dlrrf, it2cf, it2cfp, ipmat)

Get weight matrix for computing L2 inner products of Green’s functions:

int_0^beta F(tau) * G(tau) dtau

is approximated by

sum_jk f(j) ipmat(j,k) g(k)

with f and g the values of F and G at the DLR imaginary time nodes.

Parameters
  • beta[in] inverse temperature

  • r[in] number of DLR basis functions

  • dlrrf[in] DLR frequency nodes

  • it2cf[in] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU factors

  • it2cfp[in] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU pivots

  • ipmat[out] weight matrix for L2 inner products of Green’s functions

real *8 function expfun (om, xi)

Evaluate the function \(f(\omega) = (1-\xi \cdot \exp(-\omega))/(1+\exp(-\omega))\), for \(\xi = \pm 1\).

Parameters
  • om[in] frequency \(\omega\)

  • xi[in] xi=-1 for fermionic case; xi=1 for bosonic case

  • expfun[out] value of the function \(f(\omega)\)

dlr_dyson.f90

Functions

subroutine dyson_it(r, n, it2cf, it2cfp, phi, g0, g0mat, sig, g)

Solve the Dyson equation in imaginary time.

Given a fixed self-energy, this routine forms the DLR discretization of the linear Dyson equation in imaginary time and solves it using Gaussian elimination.

Parameters
  • r[in] number of DLR basis functions

  • n[in] number of orbital indices

  • it2cf[in] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU factors

  • it2cfp[in] imaginary time grid values -> DLR coefficients transform matrix, stored in LAPACK LU factored format; LU pivots

  • phi[in] tensor taking DLR coefficients of g to matrix of convolution by g.

  • g0[in] values of the right hand side G0_ij on the imaginary time grid

  • g0mat[in] matrix of convolution by G0_ij

  • sig[in] values of the self-energy on the imaginary time grid

  • g[out] solution of the linear Dyson equation on imaginary time grid

subroutine dyson_mf(beta, r, n, g0, sigmf, gmf)

Solve the Dyson equation in Matsubara frequency.

Given a fixed self-energy, this routine solves the Dyson equation in the Matsubara frequency domain by diagonal inversion.

Parameters
  • beta[in] inverse temperature

  • r[in] number of DLR basis functions

  • n[in] number of orbital indices

  • g0[in] values of the right hand side G0 on the Matsubara frequency grid

  • sigmf[in] values of the self-energy on the Matsubara frequency grid

  • gmf[out] solution of the Dyson equation on the Matsubara frequency grid

dlr_kernels.f90

Functions

real *8 function kfunf_rel (t, om)

Evaluate Lehmann kernel with imaginary time point given in relative format.

Parameters
  • t[in] imaginary time point, in relative format

  • om[in] real frequency point

real *8 function kfunf (t, om)

Evaluate Lehmann kernel with imaginary time point given in absolute format.

Note: the result will not be accurate if t is very close to 1. To maintain full accuracy, represent t in relative format and use the function kfunf_rel.

Parameters
  • t[in] imaginary time point, in absolute format

  • om[in] real frequency point

complex *16 function kfunmf (n, om)

Evaluate Lehmann kernel at a Matsubara frequency point.

Parameters
  • n[in] index of Matsubara frequency point i*pi*n

  • om[in] real frequency point

real *16 function qkfunf_rel (t, om)

Evaluate Lehmann kernel with imaginary time point given in relative format, quadruple precision.

Parameters
  • t[in] imaginary time point, in relative format

  • om[in] real frequency point

real *16 function qkfunf (t, om)

Evaluate Lehmann kernel with imaginary time point given in absolute format, quadruple precision.

Note: the result will not be accurate if t is very close to 1. To maintain full accuracy, represent t in relative format and use the function qkfunf_rel.

Parameters
  • t[in] imaginary time point, in absolute format

  • om[in] real frequency point

utils.f90

Functions

subroutine barychebinit(n, xc, wc)

Initialize subroutine barycheb for barycentric Lagrange interpolation at Chebyshev nodes.

Parameters
  • n[in] number of Chebyshev nodes

  • xc[out] n Chebyshev nodes of the first kind

  • wc[out] barycentric interpolation weights at Chebyshev nodes of the first kind

subroutine barycheb(n, xc, wc, x, f, val)

Barycentric Lagrange interpolation at Chebyshev nodes of the first kind.

Parameters
  • n[in] number of Chebyshev nodes

  • xc[in] n Chebyshev nodes of the first kind

  • wc[in] barycentric interpolation weights at Chebyshev nodes of the first kind

  • x[in] evaluation point

  • f[in] values of a function F at points xc

  • val[in] value of interpolant of F at x

real *16 function qexpm1 (x)

Evaluate the function \(f(x) = (1- \exp(-x))/(x)\) in quadruple precision.

Parameters
  • x[in] input x

  • qexpm1[out] value of the function \(f(x)\)