Skip to content

Commit

Permalink
[mc_generic] In clear_statistics of move_set, properly recurse into o…
Browse files Browse the repository at this point in the history
…ther move_sets
  • Loading branch information
Wentzell committed Sep 28, 2021
1 parent 06c7db9 commit 370d648
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions c++/triqs/mc_tools/mc_move_set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ namespace triqs {
uint64_t n_accepted_config() const { return Naccepted; }

void clear_statistics() {
collect_statistics_ = make_collect_statistics(impl_.get());
NProposed = 0;
Naccepted = 0;
acceptance_rate_ = -1;
Expand Down Expand Up @@ -245,7 +244,11 @@ namespace triqs {

///
void clear_statistics() {
for (auto &m : move_vec) m.clear_statistics();
for (auto &m : move_vec) {
m.clear_statistics();
auto ms = m.as_move_set();
if (ms) ms->clear_statistics();
}
}

///
Expand Down

0 comments on commit 370d648

Please sign in to comment.