mirror of
https://github.com/triqs/dft_tools
synced 2024-12-25 13:53:40 +01:00
gf with products of meshes : bug corrected and commented
This commit is contained in:
parent
8b4404c1a9
commit
71c709b0ba
@ -83,7 +83,7 @@ namespace triqs { namespace gf {
|
||||
static gf_t make_gf(MeshType && m) {
|
||||
typename gf_t::data_non_view_t A(m.size());
|
||||
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) {
|
||||
|
@ -82,7 +82,7 @@ namespace triqs { namespace gf {
|
||||
static gf_t make_gf(MeshType && m) {
|
||||
typename gf_t::data_non_view_t A(m.size());
|
||||
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) {
|
||||
|
@ -56,13 +56,11 @@ namespace triqs { namespace gf {
|
||||
struct get_closest_point <two_real_times,matrix_valued,Opt> {
|
||||
typedef typename mesh<two_real_times, Opt>::type mesh_t;
|
||||
|
||||
// NOT FINISHED, NOT TESTED
|
||||
template<typename G, typename T>
|
||||
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());
|
||||
size_t n = std::floor(x/g->mesh().delta());
|
||||
return n;
|
||||
}
|
||||
// // NOT FINISHED, NOT TESTED
|
||||
// template<typename G, typename T>
|
||||
// static typename mesh_t::index_t invoke(G const * g, closest_pt_wrap<T,T> const & p) {
|
||||
// return std::floor( double(p.value) / g->mesh().delta() + 0.5);
|
||||
// }
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user