GLAC  1.0
mastersampler.h
Go to the documentation of this file.
1 
30 #ifndef MASTERSAMPLER_H
31 #define MASTERSAMPLER_H
32 
33 #include "math/lattice.h"
35 
36 class MasterSampler : public Correlator
37 {
38 private:
39  int mu, rho, sigma;
40  double m_plaqMultiplicationFactor, m_topcMultiplicationFactor, m_energyMultiplicationFactor;
41  double m_topCharge, m_energy, m_plaquette;
42  Lattice <double> m_tempDiag;
43  Lattice<SU3> m_clov1, m_clov2, m_U2Temp, m_U3Temp, m_temp;
44 
45  // Creates a object that store the observable
46  ObservableStorer * m_plaqObservable = nullptr;
47  ObservableStorer * m_topcObservable = nullptr;
48  ObservableStorer * m_energyObservable = nullptr;
49 public:
50  MasterSampler(bool flow);
52  void calculate(Lattice<SU3> * lattice, unsigned int iObs);
53  void initializeObservableStorer(bool storeFlowObservable);
54 
55  void writeObservableToFile(double acceptanceRatio);
56  void writeFlowObservablesToFile(unsigned int iFlow);
57  void reset();
58  void runStatistics();
59  void printHeader();
60  void printObservable(unsigned int iObs);
61  void printStatistics();
62  std::vector<double> getObservablesVector(unsigned int iObs);
63  void copyObservable(unsigned int iObs, std::vector<double> obs);
64 };
65 
66 #endif // MASTERSAMPLER_H
Observable for calculating the plaquette, topological charge and energy.
Definition: mastersampler.h:36
A class for storing the observable data.
Definition: observablestorer.h:19
std::vector< double > getObservablesVector(unsigned int iObs)
Correlator::getObservablesVector.
Definition: mastersampler.cpp:152
void printStatistics()
Correlator::printStatistics prints statistics from ObservableStorer.
Definition: mastersampler.cpp:138
void calculate(Lattice< SU3 > *lattice, unsigned int iObs)
Correlator::calculate calculates a observable.
Definition: mastersampler.cpp:161
void writeObservableToFile(double acceptanceRatio)
Correlator::writeObservableToFile calls the ObservableStorer for writing observable to file.
Definition: mastersampler.cpp:71
MasterSampler(bool flow)
Definition: mastersampler.cpp:7
void copyObservable(unsigned int iObs, std::vector< double > obs)
Correlator::copyObservable copies the observable if has already been calculated at zero flow time.
Definition: mastersampler.cpp:145
void printObservable(unsigned int iObs)
Correlator::printObservable prints the observable for the output.
Definition: mastersampler.cpp:111
void initializeObservableStorer(bool storeFlowObservable)
Correlator::initializeObservableStorer initializes ObservableStorer.
Definition: mastersampler.cpp:33
void reset()
Correlator::reset resets ObservableStorer.
Definition: mastersampler.cpp:78
~MasterSampler()
Definition: mastersampler.cpp:25
base class for observables.
Definition: correlator.h:20
void runStatistics()
Correlator::runStatistics.
Definition: mastersampler.cpp:89
void printHeader()
Correlator::printHeader prints a the observable name for output in header.
Definition: mastersampler.cpp:96
void writeFlowObservablesToFile(unsigned int iFlow)
Correlator::writeFlowObservablesToFile.
Definition: mastersampler.cpp:58