#define TRIQS_ARRAYS_ENFORCE_BOUNDCHECK #include using namespace triqs::gfs; using namespace triqs::arrays; #define TEST(X) std::cout << BOOST_PP_STRINGIZE((X)) << " ---> "<< (X) < namespace triqs { namespace gfs { // defined in the cpp file void inverse_fourier_impl(gf_view gt, gf_const_view gw); void inverse_fourier_impl(gf_view gt, gf_const_view gw); template void fourier_impl(gf_view gw, gf_const_view gt); template void fourier_impl(gf_view gw, gf_const_view gt); }} int main() { double precision=10e-9; H5::H5File file("test_fourier_matsubara.h5",H5F_ACC_TRUNC); triqs::clef::placeholder<0> om_; double beta =1; int N=10000; double E=1; auto Gw1 = gf {{beta, Fermion, N}, {1,1}}; Gw1(om_) << 1/(om_-E); // for(auto const& w:Gw1.mesh()){ // std::cout<<"w="<(w)<<", Gw1=" << Gw1[w](0,0)< {{beta, Fermion, N}, {1,1}}; inverse_fourier_impl(Gt1, Gw1); // for(auto const& t:Gt1.mesh()){ // std::cout<<"t="< {{beta, Fermion, N}, {1,1}}; fourier_impl(Gw1b, Gt1); for(auto const& w:Gw1.mesh()){ // std::cout<<"w="<(w)<<",Gw1b=" << Gw1b(w)(0,0)<0?-1:0)+1/(1+exp(E*beta)) ); if ( std::abs(Gt1[t](0,0)) > precision) TRIQS_RUNTIME_ERROR<<" fourier_matsubara error : t="< {{beta, Fermion}, {1,1}}; Gw2() = fourier(Gt1); }