From 5a12b7eeb5e12ed48932fc4664269b48004420a1 Mon Sep 17 00:00:00 2001 From: Olivier Parcollet Date: Fri, 30 Aug 2013 12:37:12 +0200 Subject: [PATCH] gf : correction for block - forgot a constructor on the domain (was a pb for cthyb_krylov code). - a few details (better make_gf). --- triqs/arrays/indexmaps/cuboid/domain.hpp | 4 ++++ triqs/gfs/block.hpp | 1 + triqs/gfs/gf.hpp | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/triqs/arrays/indexmaps/cuboid/domain.hpp b/triqs/arrays/indexmaps/cuboid/domain.hpp index 2ea41240..b58f61a9 100644 --- a/triqs/arrays/indexmaps/cuboid/domain.hpp +++ b/triqs/arrays/indexmaps/cuboid/domain.hpp @@ -190,5 +190,9 @@ template indexmaps::cuboid::domain_t make_cuboid_domain(U ... u) { return {u...};} //cuboid_array_domain make_cuboid_domain(U ... u) { return {u...};} +typedef indexmaps::cuboid::domain_t<2> matrix_shape_t; +typedef indexmaps::cuboid::domain_t<1> vector_shape_t; + + }} #endif diff --git a/triqs/gfs/block.hpp b/triqs/gfs/block.hpp index 45b4c9c4..27c50f67 100644 --- a/triqs/gfs/block.hpp +++ b/triqs/gfs/block.hpp @@ -32,6 +32,7 @@ namespace triqs { namespace gfs { template struct gf_mesh : discrete_mesh { gf_mesh() = default; gf_mesh(size_t s) : discrete_mesh(s) {} + gf_mesh(discrete_domain const & d) : discrete_mesh(d) {} }; namespace gfs_implementation { diff --git a/triqs/gfs/gf.hpp b/triqs/gfs/gf.hpp index 08e51865..f05ca47c 100644 --- a/triqs/gfs/gf.hpp +++ b/triqs/gfs/gf.hpp @@ -73,6 +73,10 @@ namespace triqs { namespace gfs { } // gfs_implementation // make_gf and make_gf_view forward any args to them + template + gf make_gf(gf_mesh m, U && ... x) + { return gfs_implementation::factories::make_gf(std::move(m),std::forward(x)...);} + template gf make_gf(U && ... x) { return gfs_implementation::factories::make_gf(std::forward(x)...);}