3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-24 13:23:37 +01:00
- A silly error : forgot to resize when rereading indices...
This commit is contained in:
Olivier Parcollet 2014-06-21 16:15:56 +02:00
parent c8eefe0ad6
commit 6d12c4b7f6

View File

@ -87,6 +87,8 @@ namespace gfs {
bool is_empty() const { return ind.size() == 0; }
void resize(int s) { ind.resize(s);}
template <typename G> 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]);
}