triqs::mc_tools::mc_generic::accumulate

#include <triqs/mc_tools/mc_generic.hpp>

Synopsis

int accumulate (int64_t n_accumulation_cycles,
int64_t length_cycle,
std::function<bool ()> stop_callback,
communicator c = mpi::communicator{})

Accumulate/Measure

Parameters

  • n_accumulation_cycles Number of QMC cycles in the accumulation (measures are done after each cycle).

    If negative, the accumulation is done until the stop_callback returns true or signal is received.

  • length_cycle Number of QMC move attempts in one cycle

  • stop_callback

    Callback function () -> bool. It is called after each cycle to and the computation stops when it returns true. Typically used to set up the time limit, cf doc.

Returns

0

if the computation has run until the end

1

if it has been stopped by stop_callback

2

if it has been stopped by receiving a signal