From 6d12c4b7f670c55a547f71e81b24f53b297e0bb4 Mon Sep 17 00:00:00 2001 From: Olivier Parcollet Date: Sat, 21 Jun 2014 16:15:56 +0200 Subject: [PATCH] Fix #92 - A silly error : forgot to resize when rereading indices... --- triqs/gfs/tools.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/triqs/gfs/tools.hpp b/triqs/gfs/tools.hpp index b9f98457..8b845ea5 100644 --- a/triqs/gfs/tools.hpp +++ b/triqs/gfs/tools.hpp @@ -87,6 +87,8 @@ namespace gfs { bool is_empty() const { return ind.size() == 0; } + void resize(int s) { ind.resize(s);} + template bool check_size(G *g) const { return (is_empty() || ((ind.size() == 2) && (ind[0].size() == get_target_shape(*g)[0]) && (ind[1].size() == get_target_shape(*g)[1]))); @@ -127,6 +129,7 @@ namespace gfs { g = indices_2{}; // empty, no file return; } + g.resize(2); h5_read(gr, "left", g.ind[0]); h5_read(gr, "right", g.ind[1]); }