36 if (n_points < 0 || n_points > gw.
mesh().last_index() + 1)
38 <<
") should be positive and not be greater than the positive number of Matsubara frequencies ("
39 << gw.
mesh().last_index() + 1 <<
")\n";
43 nda::vector<dcomplex> z_in(n_points);
44 nda::vector<dcomplex> u_in(n_points);
46 for (
int i = 0; i < n_points; ++i) {
47 z_in(i) = gw.
mesh()(i);
53 for (
auto om : gr.
mesh()) {
54 dcomplex e = om +
dcomplex(0.0, 1.0) * freq_offset;
A read-only, non-owning view of a Green's function.
mesh_t const & mesh() const
Get the mesh of the Green's function.
A mutable, non-owning view of a Green's function.
mesh_t const & mesh() const
Get the mesh of the Green's function.
Padé approximant of a complex function sampled at with values .
TRIQS exception hierarchy and related macros.
void pade(gf_view< mesh::refreq, scalar_valued > gr, gf_const_view< mesh::imfreq, scalar_valued > gw, int n_points, double freq_offset)
Analytically continue a scalar Matsubara Green's function to the real-frequency axis via Pade.
#define TRIQS_RUNTIME_ERROR
Throw a triqs::runtime_error with the current source location.
std::complex< double > dcomplex
Convenience alias for std::complex<double>.
Provides the Pade analytic continuation from Matsubara to real frequencies.
Padé approximants for analytic continuation, computed with arbitrary-precision GMP arithmetic.