3
0
mirror of https://github.com/triqs/dft_tools synced 2025-01-12 22:18:23 +01:00

gf: minor correction for 2 times, etc...

-> are going to be replaced soon anyway ...
This commit is contained in:
Olivier Parcollet 2013-09-11 20:48:03 +02:00
parent 0586c77307
commit d4c96a9d93
4 changed files with 6 additions and 2 deletions

View File

@ -35,6 +35,7 @@ namespace triqs { namespace gfs {
typedef gf_mesh<refreq,Opt> m1_t;
typedef gf_mesh<imfreq,Opt> m2_t;
typedef mesh_product<m1_t,m2_t> B;
gf_mesh () = default;
gf_mesh (double wmin, double wmax, size_t n_freq_re, double beta, statistic_enum S, size_t n_freq_im) :
B { gf_mesh<refreq,Opt>(wmin,wmax,n_freq_re,full_bins), gf_mesh<imfreq,Opt>(beta, S, n_freq_im)} {}
};

View File

@ -35,6 +35,7 @@ namespace triqs { namespace gfs {
typedef gf_mesh<retime,Opt> m1_t;
typedef gf_mesh<imtime,Opt> m2_t;
typedef mesh_product<m1_t,m2_t> B;
gf_mesh () = default;
gf_mesh (double tmin, double tmax, size_t nt, double beta, statistic_enum S, size_t ntau, mesh_kind mk=full_bins) :
B {gf_mesh<retime,Opt>(tmin,tmax,nt), gf_mesh<imtime,Opt>(beta,S, ntau, mk)} {}
};

View File

@ -35,6 +35,8 @@ namespace triqs { namespace gfs {
typedef gf_mesh<refreq,Opt> m1_t;
typedef gf_mesh<imtime,Opt> m2_t;
typedef mesh_product<m1_t,m2_t> B;
gf_mesh () = default;
gf_mesh(B const & x) : B(x) {}
gf_mesh (double wmin, double wmax, size_t n_freq, double beta, statistic_enum S, size_t nt, mesh_kind mk=full_bins ) :
B {gf_mesh<refreq,Opt>(wmin,wmax,n_freq), gf_mesh<imtime,Opt>(beta,S,nt,mk)} {}
};

View File

@ -101,7 +101,7 @@ namespace triqs { namespace gfs {
static gf_t make_gf(double tmax, double n_time_slices) {
auto m = gf_mesh<two_real_times,Opt>(tmax, n_time_slices);
typename gf_t::data_non_view_t A(m.size()); A() =0;
typename gf_t::data_regular_t A(m.size()); A() =0;
return gf_t (m, std::move(A), nothing(), nothing() ) ;
}
};
@ -112,7 +112,7 @@ namespace triqs { namespace gfs {
// from g(t,t') and t, return g(t-t') for any t'>t
//
gf<retime> slice (gf_view<two_real_times> const & g, double t) {
inline gf<retime> slice (gf_view<two_real_times> const & g, double t) {
auto const & m = std::get<0> (g.mesh().components()); //one-time mesh
long it = get_closest_mesh_pt_index(m, t); //index of t on this mesh
long nt = m.size() - it;