Architectural Overview

MARQOV consists of quite some moving parts and involves a lot of user definable concepts that are defined via their interfaces:

@startuml

Component HamiltonianConcept
interface HamiltonianInterface

Component LatticeConcept
interface LatticeInterface

Component WolffConcept
interface WolffInterface

Component MetropolisConcept
interface MetropolisInterface

Component EMCSConcept
interface EMCSInterface

Component EmbedderConcept
interface EmbedderInterface

Component ObservableConcept
interface ObservableInterface

Component RNGConcept
interface RNGInterface

Component MARQOVCore
Component MARQOVScheduler

EMCSConcept --> WolffInterface
EMCSConcept --> MetropolisInterface
WolffConcept .up.> WolffInterface
MetropolisConcept .up.> MetropolisInterface
MetropolisConcept --> HamiltonianInterface
MetropolisConcept --> LatticeInterface
EmbedderConcept .up.> EmbedderInterface
WolffConcept ---> EmbedderInterface
WolffConcept --> HamiltonianInterface
WolffConcept --> LatticeInterface
EMCSConcept .up.> EMCSInterface

LatticeConcept .up.> LatticeInterface

ObservableConcept .up.> ObservableInterface

HamiltonianConcept .up.> HamiltonianInterface
HamiltonianConcept -r-> ObservableConcept

RNGConcept .up.> RNGInterface

MARQOVScheduler --> MARQOVCore
MARQOVCore --> EMCSInterface
MARQOVCore -> LatticeInterface
MARQOVCore -> HamiltonianInterface
MARQOVCore -d-----> ObservableInterface
MARQOVCore -> RNGInterface

@enduml

In this diagram solid lines are used to denote interfaces that are used, whereas dotted lines are used to denote implementors of interfaces. The parts closest to the user are MARQOV::Core , which binds everything together, and MARQOV::Scheduler which enables parallelism and, if multiple simulations are scheduled, parallel tempering between these simulations. MARQOV::Core can be adapted in various ways. A simple one is the change of the Random Number Generator(RNG) and hence the RNGConcept can be fulfilled by various implementations. We expect them to follow the interface of the C++11 RNGs. See RNGCache for the expected interface. A different RNG can be selected via MARQOV::Config . Below that we find the concept of an Elementary Monte Carlo Step (EMCS). We have a default implementation but it is fully user customizable. See MARQOV::EMCS for more. Next come the concept of our moves, the spin-flip metropolis update in MARQOV::Metropolis and the Wolff cluster update in MARQOV::Wolff. The Wolff update can be further customized using an Embedder These are the classes that most directly use the concept of a Hamiltonian and a Lattice. An example implementing the concept of a Hamiltonian is e.g. the familiar Ising Modell modell that implements a very small part of the expected interface and more examples can be found in Hamiltonians. Examples for the various lattices can be found in Lattices. The final concept that of course has to be there are the physical observables. Examples of some reusable default observables can be found in Observables .