void legendre_matsubara_inverse(gf_view<legendre> gl, gf_const_view<imfreq> gw) { gl() = 0.0; // Construct a temporary imaginary-time Green's function gt // I set Nt time bins. This is ugly, one day we must code the direct // transformation without going through imaginary time int Nt = 50000; auto gt = gf<imtime>{{gw.domain(), Nt}, gw.data().shape().front_pop()}; // We first transform to imaginary time because it's been coded with the knowledge of the tails gt() = inverse_fourier(gw); legendre_matsubara_inverse(gl, gt()); }
template <typename G1, typename G2> std::enable_if_t<is_gf_v<G2, imfreq>> legendre_matsubara_inverse(G1 &&gl, G2 const &gw) { static_assert(is_gf_v<G1, legendre>, "First argument to legendre_matsubara_inverse needs to be a Legendre Green function"); static_assert(std::is_same_v<typename std::decay_t<G1>::target_t, typename std::decay_t<G2>::target_t>, "Arguments to legendre_matsubara_inverse require same target_t"); gl() = 0.0; // Construct a temporary imaginary-time Green's function gt // I set Nt time bins. This is ugly, one day we must code the direct // transformation without going through imaginary time int Nt = 50000; auto gt = gf<imtime, typename std::decay_t<G1>::target_t>{{gw.domain(), Nt}, gw.data().shape().front_pop()}; // We first transform to imaginary time because it's been coded with the knowledge of the tails gt() = fourier(gw); legendre_matsubara_inverse(gl, gt()); }
template <typename T> void triqs_gf_view_assign_delegation(gf_view<legendre, T> gl, gf_keeper<tags::legendre, imtime, T> const &L) { legendre_matsubara_inverse(gl, L.g); }
void triqs_gf_view_assign_delegation(gf_view<legendre> gl, gf_keeper<tags::legendre, imtime> const& L) { legendre_matsubara_inverse(gl, L.g); }