3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-26 06:14:14 +01:00

gf with products of meshes : bug corrected and commented

This commit is contained in:
Laura Messio 2013-07-22 17:52:05 +02:00 committed by Olivier Parcollet
parent 8b4404c1a9
commit 71c709b0ba
3 changed files with 7 additions and 9 deletions

View File

@ -83,7 +83,7 @@ namespace triqs { namespace gf {
static gf_t make_gf(MeshType && m) { static gf_t make_gf(MeshType && m) {
typename gf_t::data_non_view_t A(m.size()); typename gf_t::data_non_view_t A(m.size());
A() =0; A() =0;
return gf_t (m, std::move(A), nothing(), nothing(), nothing() ) ; return gf_t (m, std::move(A), nothing(), nothing() ) ;
} }
static gf_t make_gf(double tmin, double tmax, size_t nt, double beta, statistic_enum S, size_t ntau, mesh_kind mk=full_bins) { static gf_t make_gf(double tmin, double tmax, size_t nt, double beta, statistic_enum S, size_t ntau, mesh_kind mk=full_bins) {

View File

@ -82,7 +82,7 @@ namespace triqs { namespace gf {
static gf_t make_gf(MeshType && m) { static gf_t make_gf(MeshType && m) {
typename gf_t::data_non_view_t A(m.size()); typename gf_t::data_non_view_t A(m.size());
A() =0; A() =0;
return gf_t (m, std::move(A), nothing(), nothing(), nothing() ) ; return gf_t (m, std::move(A), nothing(), nothing() ) ;
} }
static gf_t make_gf(double wmin, double wmax, size_t n_freq, double beta, statistic_enum S, size_t nt, mesh_kind mk=full_bins) { static gf_t make_gf(double wmin, double wmax, size_t n_freq, double beta, statistic_enum S, size_t nt, mesh_kind mk=full_bins) {

View File

@ -56,13 +56,11 @@ namespace triqs { namespace gf {
struct get_closest_point <two_real_times,matrix_valued,Opt> { struct get_closest_point <two_real_times,matrix_valued,Opt> {
typedef typename mesh<two_real_times, Opt>::type mesh_t; typedef typename mesh<two_real_times, Opt>::type mesh_t;
// NOT FINISHED, NOT TESTED // // NOT FINISHED, NOT TESTED
template<typename G, typename T> // template<typename G, typename T>
static typename mesh_t::index_t invoke(G const * g, closest_pt_wrap<T,T> const & p) { // static typename mesh_t::index_t invoke(G const * g, closest_pt_wrap<T,T> const & p) {
double x = (g->mesh().kind()==half_bins ? double(p.value) : double(p.value)+ 0.5*g->mesh().delta()); // return std::floor( double(p.value) / g->mesh().delta() + 0.5);
size_t n = std::floor(x/g->mesh().delta()); // }
return n;
}
}; };