numerics
Loading...
Searching...
No Matches
markov.cpp
Go to the documentation of this file.
1/// @file markov/backends/omp/markov.cpp
2/// @brief OpenMP Markov chain Monte Carlo backend.
3///
4/// Target: parallel tempering (replica exchange Monte Carlo).
5/// Multiple independent chains at different inverse temperatures run in
6/// parallel; adjacent replicas periodically attempt configuration swaps.
7///
8/// TODO: implement parallel_tempering():
9/// - Allocate N_replicas independent system states and RNGs
10/// - #pragma omp parallel for over replicas (each runs metropolis_sweep_prob)
11/// - After each block of sweeps, attempt swap between replica i and i+1:
12/// dE_swap = (beta[i+1] - beta[i]) * (E[i] - E[i+1])
13/// accept if u01 < exp(dE_swap) (detailed balance is maintained)
14
16// (TODO: parallel tempering implementation)
17} // namespace num::markov::backends::omp