1 #ifndef CASM_MonteCounter_HH
2 #define CASM_MonteCounter_HH
9 class EquilibriumMonteSettings;
31 size_type
pass()
const;
34 size_type
step()
const;
53 void set(size_type _pass,
bool minimums_met() const
Check if minimum number of pass, step, and samples has been met.
size_type m_step
Number of steps taken during the current pass.
void increment_samples()
Increments the number of samples taken and resets counter until the next sample should be taken...
MonteCounter & operator++()
Prefix increment step and updates pass.
Monte::SAMPLE_MODE m_sample_mode
Whether sampling mode is by Monte::SAMPLE_MODE::PASS or Monte::SAMPLE_MODE::STEP. ...
void debugprint(std::ostream &sout) const
bool is_complete() const
Check if requested number of pass, step, or samples has been met.
bool m_is_max_pass
Maximum allowed number of passes.
size_type m_since_last_sample
Number of passes or steps since last sample.
bool m_is_N_step
Requested number of steps.
bool m_is_max_sample
Maximum allowed number of samples to take.
bool m_is_N_sample
Requested number of samples.
Track the number of passes, steps and samples taken in a Monte Carlo calculation. ...
size_type pass() const
Number of complete passes performed.
bool maximums_met() const
Check if maximum number of pass, step, and samples has been met.
void reset()
Set all counter variables back to 0.
int m_steps_per_pass
Number of steps per pass is equal to the number of sites with variable degrees of freedom in the supe...
bool m_is_min_step
Minimum allowed number of steps.
EigenIndex Index
For long integer indexing:
size_type m_pass
One pass is equal to the number of sites with variable degrees of freedom in the supercell.
size_type step() const
Number of steps into the current pass.
bool sample_time() const
Returns true if based on period and current number of steps it is time to take a sample.
SAMPLE_MODE
How often to sample runs.
MonteCounter(const EquilibriumMonteSettings &settings, size_type _steps_per_pass)
Construct a MonteCounter and initialize to all counts to zero.
int m_sample_period
How often to sample data. In terms of m_sample_mode. If == 1 sample every pass/step.
bool m_is_min_sample
Minimum allowed number of samples to take.
bool m_is_min_pass
Minimum allowed number of passes.
size_type samples() const
Number of samples taken.
bool m_is_N_pass
Requested number of passes.
size_type steps_per_pass() const
Number of steps per pass.
void set(size_type _pass, size_type _step, size_type _samples)
Set all counter variables for performing a restart.
size_type m_samples
Number of data samples taken.
bool m_is_max_step
Maximum allowed number of steps.