GLAC  1.0
Public Member Functions | Protected Attributes
Correlator Class Reference

base class for observables. More...

#include <correlator.h>

Inheritance diagram for Correlator:
[legend]
Collaboration diagram for Correlator:
[legend]

Public Member Functions

 Correlator (bool storeFlowObservable)
 Correlator::Correlator. More...
 
 Correlator ()
 Correlator::Correlator. More...
 
virtual ~Correlator ()
 
virtual void calculate (Lattice< SU3 > *lattice, unsigned int iObs)
 Correlator::calculate calculates a observable. More...
 
virtual void writeObservableToFile (double acceptanceRatio)
 Correlator::writeObservableToFile calls the ObservableStorer for writing observable to file. More...
 
virtual void writeFlowObservablesToFile (unsigned int iFlow)
 Correlator::writeFlowObservablesToFile. More...
 
virtual void runStatistics ()
 Correlator::runStatistics. More...
 
virtual void printObservable (unsigned int iObs)
 Correlator::printObservable prints the observable for the output. More...
 
virtual void printHeader ()
 Correlator::printHeader prints a the observable name for output in header. More...
 
virtual void printStatistics ()
 Correlator::printStatistics prints statistics from ObservableStorer. More...
 
virtual void copyObservable (unsigned int iObs, std::vector< double > obs)
 Correlator::copyObservable copies the observable if has already been calculated at zero flow time. More...
 
virtual std::vector< double > getObservablesVector (unsigned int iObs)
 Correlator::getObservablesVector. More...
 
virtual double getObservable (unsigned int iObs)
 Correlator::getObservable. More...
 
virtual std::string getObservableName ()
 
virtual int getHeaderWidth ()
 
virtual void reset ()
 Correlator::reset resets ObservableStorer. More...
 
virtual void initializeObservableStorer (bool storeFlowObservable)
 Correlator::initializeObservableStorer initializes ObservableStorer. More...
 

Protected Attributes

std::vector< unsigned int > m_N
 
double m_latticeSize
 
double m_a
 
const int m_headerWidth = 20
 
const std::string m_observableName = "Correlator"
 
const std::string m_observableNameCompact = "correlator"
 
ObservableStorerm_observable = nullptr
 
bool m_storeFlowObservable = false
 

Detailed Description

base class for observables.

Todo:
Rename to observable, as correlator is a bit misleading.
Author
Mathias M. Vege
Version
1.0
Date
2017-2019

Constructor & Destructor Documentation

◆ Correlator() [1/2]

Correlator::Correlator ( bool  storeFlowObservable)

Correlator::Correlator.

Parameters
storeFlowObservablespecifies if one is to sample (and store) a flow observable when initialized.
Here is the call graph for this function:

◆ Correlator() [2/2]

Correlator::Correlator ( )

Correlator::Correlator.

When no storeFlowObservable is passed, default is to store observables for the configurations.

Here is the call graph for this function:

◆ ~Correlator()

Correlator::~Correlator ( )
virtual

Member Function Documentation

◆ calculate()

void Correlator::calculate ( Lattice< SU3 > *  lattice,
unsigned int  iObs 
)
virtual

Correlator::calculate calculates a observable.

Parameters
latticepointer to lattice of SU3 matrices
iObsnumber of the observable

Reimplemented in SuperSampler, MasterSamplerTopcXYZ, MasterSampler, LatticeActionChargeDensity, Plaquette, TopologicalCharge, and EnergyDensity.

Here is the call graph for this function:

◆ copyObservable()

void Correlator::copyObservable ( unsigned int  iObs,
std::vector< double >  obs 
)
virtual

Correlator::copyObservable copies the observable if has already been calculated at zero flow time.

Parameters
iObsobservable number.
obsvector containing observable information. Is a vector in case it consists of multiple values(e.g. topc in Euclidean time).

Reimplemented in SuperSampler, MasterSamplerTopcXYZ, MasterSampler, and LatticeActionChargeDensity.

◆ getHeaderWidth()

virtual int Correlator::getHeaderWidth ( )
inlinevirtual

◆ getObservable()

double Correlator::getObservable ( unsigned int  iObs)
virtual

Correlator::getObservable.

Parameters
iObsnumber of the observable to print.
Returns
the observable for given iObs.

◆ getObservableName()

virtual std::string Correlator::getObservableName ( )
inlinevirtual

◆ getObservablesVector()

std::vector< double > Correlator::getObservablesVector ( unsigned int  iObs)
virtual

Correlator::getObservablesVector.

Parameters
iObs
Returns
a vector containing the observables at given iObs.

Reimplemented in SuperSampler, MasterSamplerTopcXYZ, MasterSampler, and LatticeActionChargeDensity.

◆ initializeObservableStorer()

void Correlator::initializeObservableStorer ( bool  storeFlowObservable)
virtual

Correlator::initializeObservableStorer initializes ObservableStorer.

Parameters
storeFlowObservable

Reimplemented in SuperSampler, MasterSamplerTopcXYZ, MasterSampler, and LatticeActionChargeDensity.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printHeader()

void Correlator::printHeader ( )
virtual

Correlator::printHeader prints a the observable name for output in header.

Reimplemented in SuperSampler, MasterSamplerTopcXYZ, MasterSampler, LatticeActionChargeDensity, and Plaquette.

◆ printObservable()

void Correlator::printObservable ( unsigned int  iObs)
virtual

Correlator::printObservable prints the observable for the output.

Parameters
iObs

Reimplemented in SuperSampler, MasterSamplerTopcXYZ, MasterSampler, LatticeActionChargeDensity, and Plaquette.

Here is the call graph for this function:

◆ printStatistics()

void Correlator::printStatistics ( )
virtual

Correlator::printStatistics prints statistics from ObservableStorer.

Reimplemented in SuperSampler, MasterSamplerTopcXYZ, MasterSampler, LatticeActionChargeDensity, TopologicalCharge, and EnergyDensity.

Here is the call graph for this function:

◆ reset()

void Correlator::reset ( )
virtual

Correlator::reset resets ObservableStorer.

Reimplemented in SuperSampler, MasterSamplerTopcXYZ, MasterSampler, and LatticeActionChargeDensity.

Here is the call graph for this function:

◆ runStatistics()

void Correlator::runStatistics ( )
virtual

Correlator::runStatistics.

Gathers results and performs statistics in the ObservableStorer object.

Reimplemented in SuperSampler, MasterSamplerTopcXYZ, MasterSampler, LatticeActionChargeDensity, EnergyDensity, Plaquette, and TopologicalCharge.

Here is the call graph for this function:

◆ writeFlowObservablesToFile()

void Correlator::writeFlowObservablesToFile ( unsigned int  iFlow)
virtual

Correlator::writeFlowObservablesToFile.

Parameters
iFlowGathers results and performs statistics in the ObservableStorer object.

Reimplemented in SuperSampler, MasterSamplerTopcXYZ, MasterSampler, and LatticeActionChargeDensity.

Here is the call graph for this function:

◆ writeObservableToFile()

void Correlator::writeObservableToFile ( double  acceptanceRatio)
virtual

Correlator::writeObservableToFile calls the ObservableStorer for writing observable to file.

Parameters
acceptanceRatio

Reimplemented in SuperSampler, MasterSamplerTopcXYZ, MasterSampler, and LatticeActionChargeDensity.

Here is the call graph for this function:

Field Documentation

◆ m_a

double Correlator::m_a
protected

◆ m_headerWidth

const int Correlator::m_headerWidth = 20
protected

◆ m_latticeSize

double Correlator::m_latticeSize
protected

◆ m_N

std::vector<unsigned int> Correlator::m_N
protected

◆ m_observable

ObservableStorer* Correlator::m_observable = nullptr
protected

◆ m_observableName

const std::string Correlator::m_observableName = "Correlator"
protected

◆ m_observableNameCompact

const std::string Correlator::m_observableNameCompact = "correlator"
protected

◆ m_storeFlowObservable

bool Correlator::m_storeFlowObservable = false
protected

The documentation for this class was generated from the following files: