#include <simulation.h>
|
| SimulatedAnnealing (const Grid< short int > &grid, const float beta, const size_t steps, const float3 temperatureSteps) |
|
template<class M > |
void | operator() (const M &model) const |
|
|
template<class M > |
void | simulate (const M &model) |
| Performs a production-run via simulated annealing.
More...
|
|
Definition at line 102 of file simulation.h.
◆ SimulatedAnnealing()
HB::SimulatedAnnealing::SimulatedAnnealing |
( |
const Grid< short int > & |
grid, |
|
|
const float |
beta, |
|
|
const size_t |
steps, |
|
|
const float3 |
temperatureSteps |
|
) |
| |
|
inline |
◆ operator()()
template<class M >
void HB::SimulatedAnnealing::operator() |
( |
const M & |
model | ) |
const |
|
inline |
◆ simulate()
template<class M >
void HB::SimulatedAnnealing::simulate |
( |
const M & |
model | ) |
|
|
private |
Performs a production-run via simulated annealing.
The run starts at Temperature T = T_begin and ends with T = T_end. In steps of T_steps
a production run computes the initial state for the next run. In the last
one energies and magnetizations are computed. Simulated annealing consists of
\(n = \text{steps}\times \text{floor}\left(\frac{T{\_}\text{begin}-T{\_}\text{end}}{T{\_}\text{step}}\right)\) updates producing correlated energies and magnetizations.
- Parameters
-
Reference | to the model |
beta | Inverse temperature |
V | Volume |
steps | Number of MC sweeps |
energies | Gets overridden with a standard vector of correlated energies (initial and one for each step) |
magnetizations | Gets overridden with a standard vector of correlated magnetizations (initial and one for each step) |
T_begin | Initial temperature value |
T_end | Minimum temperature value |
T_step | Step size from one temperature to another |
cuda | Set to true foe GPU acceleration |
◆ mBeta
float HB::SimulatedAnnealing::mBeta {1.0f} |
|
private |
◆ mEnergies
std::vector<float> HB::SimulatedAnnealing::mEnergies {} |
|
private |
◆ mGrid
std::shared_ptr<Grid<short int> > HB::SimulatedAnnealing::mGrid {} |
|
private |
◆ mMagnetization
std::vector<float> HB::SimulatedAnnealing::mMagnetization {} |
|
private |
◆ mSteps
size_t HB::SimulatedAnnealing::mSteps {1000} |
|
private |
◆ mTemperatureSteps
float3 HB::SimulatedAnnealing::mTemperatureSteps {1.0f,0.0f,0.1f} |
|
private |
The documentation for this class was generated from the following file: