triqs.gfs.gf_factories.gf_factories_dlr_imfreq.find_w_max
- triqs.gfs.gf_factories.gf_factories_dlr_imfreq.find_w_max()
Dispatched C++ function(s).
[1] (g: Gf[MeshImFreq, 0], eps: float = 1e-10, symmetrize: bool = True, w_max_init: float = 1, w_max_max: float = 200) -> float [2] (g: BlockGf[MeshImFreq, 0], eps: float = 1e-10, symmetrize: bool = True, w_max_init: float = 1, w_max_max: float = 200) -> float [3] (g: Gf[MeshImFreq, 1], eps: float = 1e-10, symmetrize: bool = True, w_max_init: float = 1, w_max_max: float = 200) -> float [4] (g: BlockGf[MeshImFreq, 1], eps: float = 1e-10, symmetrize: bool = True, w_max_init: float = 1, w_max_max: float = 200) -> float [5] (g: Gf[MeshImFreq, 2], eps: float = 1e-10, symmetrize: bool = True, w_max_init: float = 1, w_max_max: float = 200) -> float [6] (g: BlockGf[MeshImFreq, 2], eps: float = 1e-10, symmetrize: bool = True, w_max_init: float = 1, w_max_max: float = 200) -> float [7] (g: Gf[MeshImFreq, 3], eps: float = 1e-10, symmetrize: bool = True, w_max_init: float = 1, w_max_max: float = 200) -> float [8] (g: BlockGf[MeshImFreq, 3], eps: float = 1e-10, symmetrize: bool = True, w_max_init: float = 1, w_max_max: float = 200) -> float [9] (g: Gf[MeshImFreq, 4], eps: float = 1e-10, symmetrize: bool = True, w_max_init: float = 1, w_max_max: float = 200) -> float [10] (g: BlockGf[MeshImFreq, 4], eps: float = 1e-10, symmetrize: bool = True, w_max_init: float = 1, w_max_max: float = 200) -> float
Find the smallest DLR energy cutoff that reproduces a Matsubara Green’s function within a target accuracy.
Applies to every overload. Starting from
w_max_init, the cutoff is grown by a factor of 1.5 per iteration. For each candidate cutoff, the function builds a DLR Matsubara mesh from (w_max,eps,symmetrize), samplesgon that DLR mesh, reconstructs the Green’s function on the original Matsubara mesh via the DLR coefficients, and measures the worst-case round-trip error across Matsubara indices and target indices. The smallestw_maxnot exceedingw_max_maxwhose round-trip error is belowepsis returned.Candidate cutoffs whose DLR frequency range exceeds the Matsubara range of the input are skipped. For a block Green’s function, the reported per-iteration error is the worst case across all blocks. An exception is raised if
w_max_initexceedsw_max_max, or if no candidate cutoff up tow_max_maxachieves an error beloweps.- Parameters:
- gGf[MeshImFreq, 0]
Input Green’s function on a Matsubara frequency mesh.
- epsfloat
Target DLR accuracy and round-trip error tolerance.
- symmetrizebool
If true, use particle-hole symmetric DLR meshes.
- w_max_initfloat
Initial value of the DLR cutoff to try (must not exceed
w_max_max).- w_max_maxfloat
Maximum DLR cutoff to try before giving up.
- Returns:
- float
The smallest
w_maxnot exceedingw_max_maxfor which the round-trip error is beloweps.