Define kernels. Introduce several functions that apply kernel damping factors on some given Chebychev moments.
For an introduction into the kernels defined here, please refer to the literature [1]. According to the literature [1], in almost all cases you will want the Jackson kernel. However, in the case of calculating Green functions, the Lorentz kernel is said to be better.
[1] Weiße et al., Rev. Mod. Phys. 78, 275 (2006)
To do: –> Implement Wang-and-Zunger kernel.
By Daniel Jung, Jacobs University Bremen, Germany (2012).
Select one of the kernels defined in this module by a given string. For example, this could be an option string from a command line option.
Return a list of all kernels defined in this module.
Apply the Jackson kernel to the given moments. If “limit” is None or smaller than 1, use the length of “moments”.
This function only delegates the work to the corresponding low-level functions, all beginning with “_jackson_”. If no optimal low-level function is found for the given datatype, the plain Python implementation “_jackson” is used.
If “omp” is True, use available OpenMP-parallelized variants of the algorithms. If “num_threads” is not None, set the number of threads accordingly. If “num_threads” is smaller than 1, determine and use the number of processor cores.
Apply the Dirichlet kernel to the given moments. This is the trivial kernel where the moments stay untouched (the kernel damping factors are all equal to 1). It is defined here just for the sake of completeness. All the arguments besides “moments” and “out” are just dummies.
Apply the Fejer kernel to the given moments. If “limit” is None or smaller than 1, use the length of “moments”.
This function only delegates the work to the corresponding low-level functions, all beginning with “_fejer_”. If no optimal low-level function is found for the given datatype, the plain Python implementation “_fejer” is used.
If “omp” is True, use available OpenMP-parallelized variants of the algorithms. If “num_threads” is not None, set the number of threads accordingly. If “num_threads” is smaller than 1, determine and use the number of processor cores.
lorentz(moments, limit=None, param=4., omp=True, num_threads=None, out=None)
Apply the Lorentz kernel to the given moments. If “limit” is None or smaller than 1, use the length of “moments”. “param” is a free real parameter, but it is said to be optimal between 3. and 5. [1].
This function only delegates the work to the corresponding low-level functions, all beginning with “_lorentz_”. If no optimal low-level function is found for the given datatype, the plain Python implementation “_lorentz” is used.
If “omp” is True, use available OpenMP-parallelized variants of the algorithms. If “num_threads” is not None, set the number of threads accordingly. If “num_threads” is smaller than 1, determine and use the number of processor cores.
[1] Weiße et al., Rev. Mod. Phys. 78, 275 (2006)
lanczos(moments, limit=None, param=3, omp=True, num_threads=None, out=None)
Apply the Lanczos kernel to the given moments. If “limit” is None or smaller than 1, use the length of “moments”. “param” is a free integer parameter. It is said that this kernel comes close to the Jackson kernel for param=3 [1].
This function only delegates the work to the corresponding low-level functions, all beginning with “_lanczos_”. If no optimal low-level function is found for the given datatype, the plain Python implementation “_lanczos” is used.
If “omp” is True, use available OpenMP-parallelized variants of the algorithms. If “num_threads” is not None, set the number of threads accordingly. If “num_threads” is smaller than 1, determine and use the number of processor cores.
[1] Weiße et al., Rev. Mod. Phys. 78, 275 (2006)