A parallel C++ Library for Simulations in the Heisenberg Model
Public Member Functions | Private Member Functions | Private Attributes | List of all members
HB::SimulatedAnnealing Class Reference

#include <simulation.h>

Public Member Functions

 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
 

Private Member Functions

template<class M >
void simulate (const M &model)
 Performs a production-run via simulated annealing.
More...
 

Private Attributes

float mBeta {1.0f}
 
size_t mSteps {1000}
 
float3 mTemperatureSteps {1.0f,0.0f,0.1f}
 
std::shared_ptr< Grid< short int > > mGrid {}
 
std::vector< float > mEnergies {}
 
std::vector< float > mMagnetization {}
 

Detailed Description

Definition at line 102 of file simulation.h.

Constructor & Destructor Documentation

◆ SimulatedAnnealing()

HB::SimulatedAnnealing::SimulatedAnnealing ( const Grid< short int > &  grid,
const float  beta,
const size_t  steps,
const float3  temperatureSteps 
)
inline

Definition at line 105 of file simulation.h.

Member Function Documentation

◆ operator()()

template<class M >
void HB::SimulatedAnnealing::operator() ( const M &  model) const
inline

Definition at line 111 of file simulation.h.

Here is the call graph for this function:

◆ 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
Referenceto the model
betaInverse temperature
VVolume
stepsNumber of MC sweeps
energiesGets overridden with a standard vector of correlated energies (initial and one for each step)
magnetizationsGets overridden with a standard vector of correlated magnetizations (initial and one for each step)
T_beginInitial temperature value
T_endMinimum temperature value
T_stepStep size from one temperature to another
cudaSet to true foe GPU acceleration
Here is the caller graph for this function:

Member Data Documentation

◆ mBeta

float HB::SimulatedAnnealing::mBeta {1.0f}
private

Definition at line 116 of file simulation.h.

◆ mEnergies

std::vector<float> HB::SimulatedAnnealing::mEnergies {}
private

Definition at line 120 of file simulation.h.

◆ mGrid

std::shared_ptr<Grid<short int> > HB::SimulatedAnnealing::mGrid {}
private

Definition at line 119 of file simulation.h.

◆ mMagnetization

std::vector<float> HB::SimulatedAnnealing::mMagnetization {}
private

Definition at line 121 of file simulation.h.

◆ mSteps

size_t HB::SimulatedAnnealing::mSteps {1000}
private

Definition at line 117 of file simulation.h.

◆ mTemperatureSteps

float3 HB::SimulatedAnnealing::mTemperatureSteps {1.0f,0.0f,0.1f}
private

Definition at line 118 of file simulation.h.


The documentation for this class was generated from the following file: