GLAC  1.0
supersampler.h
Go to the documentation of this file.
1 
32 #ifndef SUPERSAMPLER_H
33 #define SUPERSAMPLER_H
34 
35 #include "math/lattice.h"
37 #include <map>
38 
39 class SuperSampler : public Correlator
40 {
41 private:
42  const std::string m_observableName = "Weinberg operator";
43  const std::string m_observableNameCompact = "weinberg";
44 
45  int mu, rho, sigma;
46  double m_plaqMultiplicationFactor, m_topcMultiplicationFactor, m_energyMultiplicationFactor, m_wMultiplicationFactor;
47  double m_topCharge, m_energy, m_plaquette, m_weinberg;
48  Lattice <double> m_tempDiag;
49  Lattice<SU3> m_fieldTensorG[6];
50  Lattice<SU3> m_clov1, m_clov2, m_U2Temp, m_U3Temp, m_temp;
51 
52  // Container for the spatial observables
53  std::vector<double> m_topctGatherVector;
54  std::vector<double> m_wtGatherVector;
55  std::vector<double> m_tempEucl;
56 
57  // Creates a object that store the observable
58  ObservableStorer * m_plaqObservable = nullptr;
59  ObservableStorer * m_topcObservable = nullptr;
60  ObservableStorer * m_energyObservable = nullptr;
61  ObservableStorer * m_topctObservable = nullptr;
62  ObservableStorer * m_wObservable = nullptr; // Weinberg
63  ObservableStorer * m_wtObservable = nullptr;
64 
65  std::map<int, std::map<int, int>> m_indexMap = {
66  {0, {{1, 0}, {2, 1}, {3, 2}}},
67  {1, {{2, 4}}},
68  {3, {{1, 3}}},
69  {2, {{3, 5}}},
70  };
71 
72  inline int next_index(int i)
73  {
74  /*Function for getting the next index.*/
75  return i % 3 + 1;
76  }
77 
78 public:
79  SuperSampler(bool flow);
80  ~SuperSampler();
81  void calculate(Lattice<SU3> * lattice, unsigned int iObs);
82  void initializeObservableStorer(bool storeFlowObservable);
83 
84  void writeObservableToFile(double acceptanceRatio);
85  void writeFlowObservablesToFile(unsigned int configNumber);
86  void reset();
87  void runStatistics();
88  void printHeader();
89  void printObservable(unsigned int iObs);
90  void printStatistics();
91  std::string getObservableName() { return m_observableName; }
92  std::vector<double> getObservablesVector(unsigned int iObs);
93  void copyObservable(unsigned int iObs, std::vector<double> obs);
94 };
95 
96 #endif // SUPERSAMPLER_H
~SuperSampler()
Definition: supersampler.cpp:43
void runStatistics()
Correlator::runStatistics.
Definition: supersampler.cpp:161
A class for storing the observable data.
Definition: observablestorer.h:19
std::vector< double > getObservablesVector(unsigned int iObs)
Correlator::getObservablesVector.
Definition: supersampler.cpp:283
SuperSampler(bool flow)
Definition: supersampler.cpp:8
void initializeObservableStorer(bool storeFlowObservable)
Correlator::initializeObservableStorer initializes ObservableStorer.
Definition: supersampler.cpp:54
void printHeader()
Correlator::printHeader prints a the observable name for output in header.
Definition: supersampler.cpp:176
void writeObservableToFile(double acceptanceRatio)
Correlator::writeObservableToFile calls the ObservableStorer for writing observable to file.
Definition: supersampler.cpp:130
void writeFlowObservablesToFile(unsigned int configNumber)
Correlator::writeFlowObservablesToFile.
Definition: supersampler.cpp:103
base class for observables.
Definition: correlator.h:20
void copyObservable(unsigned int iObs, std::vector< double > obs)
Correlator::copyObservable copies the observable if has already been calculated at zero flow time.
Definition: supersampler.cpp:269
std::string getObservableName()
Definition: supersampler.h:91
void printObservable(unsigned int iObs)
Correlator::printObservable prints the observable for the output.
Definition: supersampler.cpp:197
Observable for calculating the Weinberg operator, plaquette, energy and euclidean time topological ch...
Definition: supersampler.h:39
void calculate(Lattice< SU3 > *lattice, unsigned int iObs)
Correlator::calculate calculates a observable.
Definition: supersampler.cpp:298
void reset()
Correlator::reset resets ObservableStorer.
Definition: supersampler.cpp:145
void printStatistics()
Correlator::printStatistics prints statistics from ObservableStorer.
Definition: supersampler.cpp:261