LatticeYangMills
gaugefieldfactory.h
Go to the documentation of this file.
1 /******************************************************************************
2 *
3 * MIT License
4 *
5 * Copyright (c) 2018 Giovanni Pederiva
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE.
24 ******************************************************************************/
25 
35 #pragma once
36 #include <vector>
37 #include <random>
38 #include "Apps/app.h"
39 
51 class GaugeFieldFactory : public App {
52 public:
53  GaugeFieldFactory(int MCSteps, int thermSteps,
54  int NConf, double epsilon,
55  std::string startType);
56  // main functions
58 
59  // setters-getters
60  std::vector<double>& getObsValues() { return m_obsValues; }
61  void execute();
62 
63 private:
64  // member classes
65  std::vector<double> m_obsValues;
66 
67  // Private methods
68  void initialize();
69 
70  // Input variables
71  int m_MCSteps;
72  int m_correlationSteps;
73  int m_thermSteps;
74  int m_confs;
75  std::string m_startType;
76  double m_epsilon;
77 
78 
79  long int m_accepted = 0;
80  long int m_updates = 0;
81  long m_seed;
82  const char* m_outDir;
83  void MCUpdate();
84  void updateLink(int x, int y, int z, int t, int mu);
85  SU3 newLink;
86  void computeObservables();
87  void thermalize();
88  void sampleConf();
89  void thermalizeTime();
90  void sampleConfTime();
91 };
Implementation of a class to perform arithmetics between links.
Definition: su3.h:53
void sampleConf()
Performs the Monte Carlo updates, every N_Corr saves the lattice and computes observables.
void execute()
Executes the App code. Perform initialization of subclasses and the system, then runst the Monte Carl...
void computeObservables()
Computes the Observable value for all memebers of the m_obs vector.
void sampleConfTime()
Performs the Monte Carlo updates, every N_Corr saves the lattice and computes observables. Prints out times of execution.
Implementation of the GaugeFieldFactory App class.
void thermalizeTime()
Perform N_Therm Monte Carlo updates to thermalize the system. Prints times of execution.
void generateConfigurations()
Run the thermalization first, then the sampling of configurations.
void MCUpdate()
Loops over all links and tres to update them.
void thermalize()
Perform N_Therm Monte Carlo updates to thermalize the system.
GaugeFieldFactory(int MCSteps, int thermSteps, int NConf, double epsilon, std::string startType)
Constructor of the GaugeFieldFactory object.
Contains the definition of the App prototype.
void updateLink(int x, int y, int z, int t, int mu)
Tries to update a single link 30 times (N_Hits)
void initialize()
Initializes the GluonField based on the initial condition (hot/cold), runs the initializers of the su...
Prototype for the App class group.
Definition: app.h:59