3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-26 06:14:14 +01:00
dft_tools/pytriqs/wrap_test/g.hpp
2014-05-21 23:01:52 +02:00

27 lines
459 B
C++

#include <triqs/gfs.hpp>
using namespace triqs::gfs;
using namespace triqs;
block_gf_view<imfreq> make_bgf(double a) {
double beta = 1;
auto G1 = gf<imfreq>({beta, Fermion}, {2, 2});
auto B1 = make_block_gf<imfreq>(3, G1);
{
H5::H5File file("ess_test_g1.h5", H5F_ACC_TRUNC);
h5_write(file, "g", B1);
}
return B1;
}
void pass_bgf(block_gf_view<imfreq> g) {
{
H5::H5File file("ess_test_g2.h5", H5F_ACC_TRUNC);
h5_write(file, "g", g);
}
}