#define TRIQS_ARRAYS_ENFORCE_BOUNDCHECK #include using namespace triqs::gfs; using namespace triqs::arrays; #define TEST(X) std::cout << BOOST_PP_STRINGIZE((X)) << " ---> "<< (X) < #include #include #define TEST(X) std::cout << BOOST_PP_STRINGIZE((X)) << " ---> "<< (X) < const & gt){ std::ofstream mfile(s); if(mfile.is_open()){ for(int i=0;i {{beta, Fermion, 100}, {1,1}}; triqs::clef::placeholder<0> om_; G(om_) << 1./(om_ - 2.1); /* ---------- Fourier transform ---------------------*/ auto Gt = gf {{beta, Fermion, Ntau, full_bins}, {1,1}}; Gt() = inverse_fourier(G); TEST(Gt(0.0)); TEST(Gt.data()); TEST(Gt.mesh().index_to_point(0)); TEST(Gt.mesh().index_to_point(1)); } catch(std::exception const & e) { std::cout << e.what()<< std::endl;} } void test_1(){ try { double beta=10; /* ----- Fourier ----- */ auto Gt = gf {{beta, Fermion, 201, full_bins}, {1,1}}; auto Gw = gf {{beta, Fermion, 100}, {1,1}}; Gw.singularity()(1) = 1; Gt() = inverse_fourier(Gw); } catch(std::exception const & e) { std::cout << e.what()<< std::endl;} } int main() { test_0(); test_1(); }