diff --git a/triqs/gf/imfreq.hpp b/triqs/gf/imfreq.hpp index 01ef422f..f3dd85f8 100644 --- a/triqs/gf/imfreq.hpp +++ b/triqs/gf/imfreq.hpp @@ -70,7 +70,6 @@ namespace triqs { namespace gf { // matrix_valued template struct factories { typedef gf gf_t; - typedef gf_view gf_view_t; template static gf_t make_gf(MeshType && m, tqa::mini_vector shape, local::tail_view const & t) { @@ -91,7 +90,6 @@ namespace triqs { namespace gf { // scalar_valued template struct factories { typedef gf gf_t; - typedef gf_view gf_view_t; template static gf_t make_gf(MeshType && m, local::tail_view const & t) { diff --git a/triqs/gf/re_im_time.hpp b/triqs/gf/re_im_time.hpp index 80142c24..270c93a2 100644 --- a/triqs/gf/re_im_time.hpp +++ b/triqs/gf/re_im_time.hpp @@ -78,7 +78,13 @@ namespace triqs { namespace gf { template struct factories { typedef gf gf_t; - // typedef typename mesh::type mesh_t; + + template + 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() ) ; + } 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) { auto m = make_gf_mesh(tmin,tmax, nt, beta, S, ntau, mk); diff --git a/triqs/gf/refreq_imtime.hpp b/triqs/gf/refreq_imtime.hpp index 9015d021..9f292986 100644 --- a/triqs/gf/refreq_imtime.hpp +++ b/triqs/gf/refreq_imtime.hpp @@ -78,6 +78,13 @@ namespace triqs { namespace gf { template struct factories { typedef gf gf_t; + template + 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() ) ; + } + 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) { auto m = make_gf_mesh(wmin, wmax, n_freq, beta,S, nt, mk); typename gf_t::data_non_view_t A(m.size()); diff --git a/triqs/gf/retime.hpp b/triqs/gf/retime.hpp index cb48e8bf..e25f1215 100644 --- a/triqs/gf/retime.hpp +++ b/triqs/gf/retime.hpp @@ -81,6 +81,12 @@ namespace triqs { namespace gf { template struct factories { typedef gf gf_t; + template + static gf_t make_gf(MeshType && m, tqa::mini_vector shape, local::tail_view const t) { + typename gf_t::data_non_view_t A(shape.front_append(m.size())); A() =0; + return gf_t ( std::forward(m), std::move(A), t, nothing() ) ; + } + static gf_t make_gf(double tmin, double tmax, size_t n_points, tqa::mini_vector shape, mesh_kind mk) { typename gf_t::data_non_view_t A(shape.front_append(n_points)); A() =0; return gf_t(mesh::make(tmin, tmax, n_points,mk), std::move(A), local::tail(shape), nothing()); @@ -97,6 +103,12 @@ namespace triqs { namespace gf { template struct factories { typedef gf gf_t; + template + static gf_t make_gf(MeshType && m, local::tail_view const t) { + typename gf_t::data_non_view_t A(m.size()); A() =0; + return gf_t ( std::forward(m), std::move(A), t, nothing() ) ; + } + static gf_t make_gf(double tmin, double tmax, size_t n_points, mesh_kind mk) { typename gf_t::data_non_view_t A(n_points); A() =0; return gf_t(mesh::make(tmin, tmax, n_points,mk), std::move(A), local::tail(tqa::mini_vector(1,1)), nothing());