Path Integral Quantum Monte Carlo
Public Member Functions | Static Public Attributes
SuperfluidFractionEstimator Class Reference

Compute the superfluid fraction, as well as the winding number probability distribution. More...

#include <estimator.h>

+ Inheritance diagram for SuperfluidFractionEstimator:
+ Collaboration diagram for SuperfluidFractionEstimator:

Public Member Functions

 SuperfluidFractionEstimator (const Path &, ActionBase *, const MTRand &, double, int _frequency=1, string _label="super")
 Constructor. More...
 
 ~SuperfluidFractionEstimator ()
 Destructor.
 
string getName () const
 Get the name of the estimator.
 
- Public Member Functions inherited from EstimatorBase
 EstimatorBase (const Path &_path, ActionBase *_actionPtr, const MTRand &_random, double _maxR, int _frequency=1, string _label="")
 Constructor. More...
 
virtual ~EstimatorBase ()
 Destructor.
 
virtual void sample ()
 Sample the estimator. More...
 
void reset ()
 Reset numAccumulated and the estimator to 0.
 
void restart (const uint32, const uint32)
 Restart the measurment process from a previous state.
 
virtual void output ()
 Output the estimator value to disk. More...
 
virtual void outputFlat ()
 Output a flat estimator value to disk. More...
 
virtual void outputFooter ()
 Ouptut the fooder to disk.
 
bool baseSample ()
 Determine the basic sampling condition. More...
 
uint32 getTotNumAccumulated () const
 Get the total number of accumulated measurments.
 
uint32 getNumAccumulated () const
 Get the number of accumulated measurements since the last reset.
 
uint32 getNumSampled () const
 Get the number of samples since the last reset.
 
void prepare ()
 Prepare the estimator for i/o. More...
 
void addEndLine ()
 Add a carriage return to estimator files.
 
void appendLabel (string append)
 Append to default label. More...
 
string getLabel () const
 Get the estimator label.
 

Static Public Attributes

static const string name
 

Additional Inherited Members

- Protected Member Functions inherited from EstimatorBase
void initialize (int)
 Initialize estimator. More...
 
void initialize (vector< string >)
 Initialize estimator. More...
 
- Protected Attributes inherited from EstimatorBase
const Pathpath
 A constant reference to the paths.
 
ActionBaseactionPtr
 A pointer to the action.
 
MTRand random
 
double maxR
 
fstream * outFilePtr
 The output fie.
 
map< string, int > estIndex
 Map estimator labels to indices.
 
Array< double, 1 > estimator
 The estimator array.
 
Array< double, 1 > norm
 The normalization factor for each estimator.
 
int numEst
 The number of individual quantities measured.
 
int frequency
 The frequency at which we accumulate.
 
int startSlice
 Where imaginary time averages begin.
 
int endSlice
 Where imaginary time averages end.
 
int endDiagSlice
 Where imaginary time averages end for diagonal estimiators.
 
vector< double > sliceFactor
 Used to properly incorporate end affects.
 
string label
 The label used for the output file.
 
uint32 numSampled
 The number of times we have sampled.
 
uint32 numAccumulated
 The number of accumulated values.
 
uint32 totNumAccumulated
 The total number of accumulated values.
 
int numBeads0
 The target number of beads for the canonical ensemble.
 
bool diagonal
 Is this a diagonal estimator?
 
bool endLine
 Should we output a carriage return?
 
bool canonical
 Are we in the canonical ensemble?
 
string header
 The data file header.
 

Detailed Description

Compute the superfluid fraction, as well as the winding number probability distribution.

Definition at line 416 of file estimator.h.

Constructor & Destructor Documentation

◆ SuperfluidFractionEstimator()

SuperfluidFractionEstimator::SuperfluidFractionEstimator ( const Path _path,
ActionBase _actionPtr,
const MTRand &  _random,
double  _maxR,
int  _frequency = 1,
string  _label = "super" 
)

Constructor.

Measure the superfluid fraction from the value of the winding number in all directions with periodic boundary conditions. We also measure the individual values of the winding numbers and their probability distribution.

Definition at line 1297 of file estimator.cpp.

1299  :
1300  EstimatorBase(_path,_actionPtr,_random,_maxR,_frequency,_label) {
1301 
1302  windMax = 10;
1303  /* We compute a bunch of estimators here, the superfluid fraction, the winding
1304  * number in all possible dimensions, and the winding number histograms up to
1305  * windMax windings. These are all diagonal estimators and we have our own
1306  * output file.*/
1307  initialize(4 + 2*windMax + 1 + 1);
1308 
1309  header = str(format("#%15s%16s%16s%16s") % "rho_s/rho" % "W^2(x)" % "W^2(y)" % "W^2(z)");
1310  for (int w = -windMax; w <= windMax; w++)
1311  header += str(format("%11sP(%+1d)") % " " % w);
1312  header += str(format("%16s") % "Area_rho_s");
1313 
1314  /* The pre-factor for the superfluid density is always the same */
1315  norm(0) = constants()->T() / (2.0 * sum(path.boxPtr->periodic) * constants()->lambda());
1316 
1317  /* The pre-factor for the area esimator */
1318  norm(5+2*windMax) = 0.5*constants()->T()*constants()->numTimeSlices()/constants()->lambda();
1319 }
int numTimeSlices()
Get number of time slices.
Definition: constants.h:99
double T() const
Get temperature.
Definition: constants.h:41
double lambda() const
Get lambda = hbar^2/(2mk_B)
Definition: constants.h:46
TinyVector< unsigned int, NDIM > periodic
Determines which dimensions have periodic bc.
Definition: container.h:29
Array< double, 1 > norm
The normalization factor for each estimator.
Definition: estimator.h:91
string header
The data file header.
Definition: estimator.h:110
EstimatorBase(const Path &_path, ActionBase *_actionPtr, const MTRand &_random, double _maxR, int _frequency=1, string _label="")
Constructor.
Definition: estimator.cpp:103
const Path & path
A constant reference to the paths.
Definition: estimator.h:78
void initialize(int)
Initialize estimator.
Definition: estimator.cpp:201
const Container * boxPtr
A constant reference to the container class.
Definition: path.h:43
ConstantParameters * constants()
Global public access to the constants.
Definition: constants.h:201
+ Here is the call graph for this function:

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