A parallel C++ Library for Simulations in the Heisenberg Model
include
model
hb
hb.h
Go to the documentation of this file.
1
#ifndef HEISENBERG_H
2
#define Heisenberg_H
3
4
#include <
model.h
>
5
6
using
std::vector;
7
8
class
Heisenberg
:
public
Model
9
{
10
public
:
11
using
SimulationStrategy
= std::function<void(
const
Heisenberg
&)>;
12
13
/******************************************************************************************/
19
Heisenberg
(
double
beta,
double
J,
double
B,
unsigned
int
Nx,
unsigned
int
Ny,
unsigned
int
Nz,
bool
hc =
true
) : Model(beta, J, B, Nx, Ny, Nz)
20
{
21
if
(hc)
hot_start
();
22
else
cold_start
();
23
};
24
25
~Heisenberg
() =
default
;
26
27
28
//functions
29
double
compute_energy
() final;
30
void
hot_start
() final;
31
void
cold_start
() final;
32
33
34
protected:
35
double
delta_energy
(
unsigned
int
) final;
36
void
flip
(
unsigned
int
, gsl_rng*) final;
37
38
private:
39
void
simulate
()
const override
{
mS
(*
this
);}
40
41
SimulationStrategy
mS
;
42
};
43
44
#endif
Heisenberg::flip
void flip(unsigned int, gsl_rng *) final
Heisenberg::hot_start
void hot_start() final
model.h
Heisenberg::delta_energy
double delta_energy(unsigned int) final
Heisenberg::SimulationStrategy
std::function< void(const Heisenberg &)> SimulationStrategy
Definition:
hb.h:11
Heisenberg::~Heisenberg
~Heisenberg()=default
Heisenberg
Definition:
hb.h:9
Heisenberg::Heisenberg
Heisenberg(double beta, double J, double B, unsigned int Nx, unsigned int Ny, unsigned int Nz, bool hc=true)
Constructs a Heisenberg Model.
Definition:
hb.h:19
Heisenberg::mS
SimulationStrategy mS
Definition:
hb.h:41
Heisenberg::cold_start
void cold_start() final
Heisenberg::compute_energy
double compute_energy() final
Heisenberg::simulate
void simulate() const override
Definition:
hb.h:39
Generated by
1.8.20