q-Potts Model
-
template<int Q>
class PottsMagnetization - #include <Potts.h>
Magnetization of the Q-state Potts model.
- Template Parameters:
Q – the number of spin values
Public Functions
-
template<class StateSpace, class Grid>
inline double measure(const StateSpace &statespace, const Grid &grid)
-
inline PottsMagnetization()
-
template<class StateVector>
class PottsInteraction - #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 space
StateVector – the type of the state vector
Public Functions
-
inline PottsInteraction(const double k)
-
template<class StateSpace>
inline double diff(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>
inline double energy(const StateSpace &s, const typename StateSpace::Lattice &grid, int c)
Public Members
-
const double k
Scalar prefactor.
-
template<int Q>
class Potts - #include <Potts.h>
Potts Hamiltonian with Q states.
- Template Parameters:
Q – defines the number of spin values 0,1,…,Q-1
Public Functions
-
inline Potts(double J)
-
template<class StateSpace, class Lattice, class RNG>
inline void initstatespace(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>
class Initializer<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, class Lattice>
class Embedder<Potts<Q>, Lattice> - #include <Potts.h>
Specialization of the Embedding class for the Potts model.
- Template Parameters:
Q – number of spin values
Lattice – the type of the lattice
Public Functions
-
inline Embedder(const Hamiltonian &ham, const Lattice &lat, StateSpace &statespace)
Constructs a Potts embedding object.
- Parameters:
ham – The corresponding Hamiltonian
lat – The corresponding lattice
statespace – The statespace of the simulation
-
template<class RNG>
inline void draw(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 generator
sv – current state of the cluster seed
-
inline double coupling(int pos1, int pos2) const
Computes the Wolff coupling when attempting to add a spin to the cluster.
- Parameters:
pos1 – The position (index) of the current state vector
pos2 – The position (index) of a neighbour being checked whether it will become part of the cluster
- Returns:
The scalar Wolff coupling (a double)
-
inline 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
-
static constexpr int SymD = Hamiltonian::SymD
-
template<class Lattice, int Q>
struct Wolff<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 lattice
Q – 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 Q, class Lattice>