q-Potts Model¶
-
template<int
Q>
classPottsMagnetization¶ - #include <Potts.h>
Magnetization of the Q-state Potts model.
- Template Parameters
Q: the number of spin values
Public Functions
-
template<class
StateSpace, classGrid>
doublemeasure(const StateSpace &statespace, const Grid &grid)¶
-
PottsMagnetization()¶
-
template<class
StateVector>
classPottsInteraction¶ - #include <Potts.h>
The Potts interaction term.
- Note
This term does not match the required canonical interaction form and his hence implented as a Flex Term
- Template Parameters
StateSpace: the type of the state spaceStateVector: the type of the state vector
Public Functions
-
PottsInteraction(const double k)¶
-
template<class
StateSpace>
doublediff(const int rsite, const StateVector &svold, const StateVector &svnew, const decltype(std::declval<typename StateSpace::Lattice>().nbrs(0, 0)) &nbrs, StateSpace &s)¶
-
template<class
StateSpace>
doubleenergy(const StateSpace &s, const typename StateSpace::Lattice &grid, int c)¶
Public Members
-
const double
k¶ Scalar prefactor.
-
template<int
Q>
classPotts¶ - #include <Potts.h>
Potts Hamiltonian with Q states.
- Template Parameters
Q: defines the number of spin values 0,1,…,Q-1
Public Functions
-
Potts(double J)¶
-
template<class
StateSpace, classLattice, classRNG>
voidinitstatespace(StateSpace &statespace, Lattice &grid, RNG &rng) const¶
Public Members
-
std::string
name= {"Potts"}¶
-
PottsInteraction<StateVector>
potts_interaction¶
-
std::array<decltype(potts_interaction)*, 1>
multisite= {&potts_interaction}¶
-
PottsMagnetization<Q>
obs_m¶
-
template<int
Q>
classInitializer<Potts<Q>>¶ - #include <Potts.h>
Specialization of the Metropolis initialier for the Q-state Potts model.
- Template Parameters
Q: the number of the spin values
-
namespace
MARQOV The MARQOV namespace.
This namespace collects all things that are related to MARQOV.
-
template<int
Q, classLattice>
classEmbedder<Potts<Q>, Lattice>¶ - #include <Potts.h>
Specialization of the Embedding class for the Potts model.
- Template Parameters
Q: number of spin valuesLattice: the type of the lattice
Public Functions
-
Embedder(const Hamiltonian &ham, const Lattice &lat, StateSpace &statespace)¶ Constructs a Potts embedding object.
- Parameters
ham: The corresponding Hamiltonianlat: The corresponding latticestatespace: The statespace of the simulation
-
template<class
RNG>
voiddraw(RNG &rng, StateVector &sv)¶ Set new embedding variable.
- Template Parameters
RNG: the type of the random number generator
- Parameters
rng: reference to the random number generatorsv: current state of the cluster seed
-
double
coupling(int pos1, int pos2) const¶ Computes the Wolff coupling when attempting to add a spin to the cluster.
- Return
The scalar Wolff coupling (a double)
- Parameters
pos1: The position (index) of the current state vectorpos2: The position (index) of a neighbour being checked whether it will become part of the cluster
-
void
flip(StateVector &sv) const¶ Specifies how a spin flip in the embedded (reduced) model is performed.
- Parameters
sv: the spin to flipped
Private Types
-
typedef Hamiltonian::StateVector
StateVector¶
-
typedef Space<typename Hamiltonian::StateVector, Lattice>
StateSpace¶
Private Static Attributes
-
constexpr int
SymD= Hamiltonian::SymD¶
-
template<class
Lattice, intQ>
structWolff<Potts<Q>, Lattice>¶ - #include <Potts.h>
Specialization of the Wolff cluster algorithm for the Q-state Potts model.
- Note
this is an example how you can apply a Wolff update to a flex term
- Template Parameters
Lattice: the type of the latticeQ: number of spin values
Public Functions
Public Members
-
std::vector<int>
cstack= std::vector<int>(4096 / sizeof(int), 0)¶ the size of the stack is meant to be preserved across different cluster processes.
-
template<int