Algorithms
IntegralProblem algorithms
AutoBZCore.IntegralAlgorithm — TypeIntegralAlgorithmAbstract supertype for integration algorithms.
Quadrature
AutoBZCore.QuadratureFunction — TypeQuadratureFunction(; fun=trapz, npt=50, nthreads=1)Quadrature rule for the standard interval [-1,1] computed from a function x, w = fun(npt). The nodes and weights should be set so the integral of f on [-1,1] is sum(w .* f.(x)). The default quadrature rule is trapz, although other packages provide rules, e.g.
using FastGaussQuadrature
alg = QuadratureFunction(fun=gausslegendre, npt=100)nthreads sets the numbers of threads used to parallelize the quadrature only when the integrand is a , in which case the user must parallelize the integrand evaluations. For no threading set nthreads=1.
AutoBZCore.QuadGKJL — TypeQuadGKJL(; order = 7, norm = norm)Duplicate of the QuadGKJL provided by Integrals.jl.
AutoBZCore.AuxQuadGKJL — TypeAuxQuadGKJL(; order = 7, norm = norm)Generalization of the QuadGKJL provided by Integrals.jl that allows for AuxValued integrands for auxiliary integration and multi-threaded evaluation with the batch argument to IntegralProblem
AutoBZCore.ContQuadGKJL — TypeContQuadGKJL(; order = 7, norm = norm, rho = 1.0, rootmeth = IteratedIntegration.ContQuadGK.NewtonDeflation())A 1d contour deformation quadrature scheme for scalar, complex-valued integrands. It defaults to regular quadgk behavior on the real axis, but if it finds a root of 1/f nearby, in the sense of Bernstein ellipse for the standard segment [-1,1] with semiaxes cosh(rho) and sinh(rho), on either the upper/lower half planes, then it dents the contour away from the presumable pole.
AutoBZCore.MeroQuadGKJL — TypeMeroQuadGKJL(; order = 7, norm = norm, rho = 1.0, rootmeth = IteratedIntegration.MeroQuadGK.NewtonDeflation())A 1d pole subtraction quadrature scheme for scalar, complex-valued integrands that are meromorphic. It defaults to regular quadgk behavior on the real axis, but if it finds nearby roots of 1/f, in the sense of Bernstein ellipse for the standard segment [-1,1] with semiaxes cosh(rho) and sinh(rho), it attempts pole subtraction on that segment.
Cubature
AutoBZCore.HCubatureJL — TypeHCubatureJL(; norm=norm, initdiv=1)Multi-dimensional h-adaptive cubature from HCubature.jl.
AutoBZCore.MonkhorstPack — TypeMonkhorstPack(; npt=50, syms=nothing, nthreads=1)Periodic trapezoidal rule with a fixed number of k-points per dimension, npt, using the PTR rule from AutoSymPTR.jl. nthreads sets the numbers of threads used to parallelize the quadrature only when the integrand is a , in which case the user must parallelize the integrand evaluations. For no threading set nthreads=1. The caller should check that the integral is converged w.r.t. npt.
AutoBZCore.AutoSymPTRJL — TypeAutoSymPTRJL(; norm=norm, a=1.0, nmin=50, nmax=1000, n₀=6, Δn=log(10), keepmost=2, nthreads=1)Periodic trapezoidal rule with automatic convergence to tolerances passed to the solver with respect to norm using the routine autosymptr from AutoSymPTR.jl. nthreads sets the numbers of threads used to parallelize the quadrature only when the integrand is a  in which case the user must parallelize the integrand evaluations. For no threading set nthreads=1. This algorithm is the most efficient for smooth integrands.
Meta-algorithms
AutoBZCore.NestedQuad — TypeNestedQuad(alg::IntegralAlgorithm)
NestedQuad(algs::IntegralAlgorithm...)Nested integration by repeating one quadrature algorithm or composing a list of algorithms. The domain of integration must be an AbstractIteratedLimits from the IteratedIntegration.jl package. Analogous to nested_quad from IteratedIntegration.jl. The integrand should expect SVector inputs. Do not use this for very high-dimensional integrals, since the compilation time scales very poorly with respect to dimensionality. In order to improve the compilation time, FunctionWrappers.jl is used to enforce type stability of the integrand, so you should always pick the widest integration limit type so that inference works properly. For example, if ContQuadGKJL is used as an algorithm in the nested scheme, then the limits of integration should be made complex.
AutoBZProblem algorithms
In order to make algorithms domain-agnostic, the BZ loaded from load_bz can be called with the algorithms below, which are aliases for algorithms above
AutoBZCore.AutoBZAlgorithm — TypeAutoBZAlgorithmAbstract supertype for Brillouin zone integration algorithms. All integration problems on the BZ get rescaled to fractional coordinates so that the Brillouin zone becomes [0,1]^d, and integrands should have this periodicity. If the integrand depends on the Brillouin zone basis, then it may have to be transformed to the Cartesian coordinates as a post-processing step. These algorithms also use the symmetries of the Brillouin zone and the integrand.
AutoBZCore.IAI — TypeIAI(alg::IntegralAlgorithm=AuxQuadGKJL())
IAI(algs::IntegralAlgorithm...)Iterated-adaptive integration using nested_quad from IteratedIntegration.jl. This algorithm is the most efficient for localized integrands.
AutoBZCore.TAI — TypeTAI(; norm=norm, initdivs=1)Tree-adaptive integration using hcubature from HCubature.jl. This routine is limited to integration over hypercube domains and may not use all symmetries.
AutoBZCore.PTR — TypePTR(; npt=50, nthreads=1)Periodic trapezoidal rule with a fixed number of k-points per dimension, npt, using the routine ptr from AutoSymPTR.jl. The caller should check that the integral is converged w.r.t. npt.
AutoBZCore.AutoPTR — TypeAutoPTR(; norm=norm, a=1.0, nmin=50, nmax=1000, n₀=6, Δn=log(10), keepmost=2, nthreads=1)Periodic trapezoidal rule with automatic convergence to tolerances passed to the solver with respect to norm using the routine autosymptr from AutoSymPTR.jl. This algorithm is the most efficient for smooth integrands.
DOSProblem algorithms
Currently the available algorithms are an initial release and we would like to include the following reference algorithms that are also common in the literature in a future release:
- (Linear) Tetrahedron Method
 - Adaptive Gaussian broadening
 
AutoBZCore.DOSAlgorithm — TypeDOSAlgorithmAbstract supertype for algorithms for computing density of states
AutoBZCore.GGR — TypeGGR(; npt=50)Generalized Gilat-Raubenheimer method as in "Generalized Gilat–Raubenheimer method for density-of-states calculation in photonic crystals". This method requires the Hamiltonian and its derivatives, and performs a linear extrapolation at each k-point in an equispace grid. The algorithm is expected to show second-order convergence and suffer reduced error at band crossings compared to interpolatory methods.
Arguments
npt: the number of k-points per dimension