LatticeYangMills
wilsonflow.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 
53 class WilsonFlow : public App {
54  public:
55  WilsonFlow(double tauFinal, double epsilon);
56  // main functions
57  void flowConfigurations();
58 
59  // setters-getters
60  void setAction(Action* action);
61  void addObservable(Observable* observable);
62  //class Point& getLatticeSite(int x, int y, int z, int t);
63  std::array<int, 4>& getSize() { return m_size; }
64  std::vector<double>& getObsValues() { return m_obsValues; }
65  std::vector<Observable*>& getObs() { return m_obs; }
66  void createLattice(std::array<int,4> latticeSize);
67  void execute();
68  void initialize();
69 
70 
71  private:
72  // flow lattices
73  GluonField* m_Z = nullptr;
74  std::vector<double> m_obsValues;
75  std::vector<std::string> m_inputConfList;
76 
77  SU3 omega;
78  // member variables
79  double m_epsilon;
80  double m_tauFinal;
81  void computeObservables();
82  void flowStep();
83  void applyWilsonFlow(int confNum);
84 };
void flowConfigurations()
applies the gradient flow to all the configurations given as input
Definition: wilsonflow.cpp:96
void computeObservables()
computes all observables in the Observable vector
Definition: wilsonflow.cpp:178
std::vector< Observable * > m_obs
Vector of pointers to Observable instances.
Definition: app.h:75
WilsonFlow(double tauFinal, double epsilon)
constructor of the class
Definition: wilsonflow.cpp:64
Implementation of a class to perform arithmetics between links.
Definition: su3.h:53
void applyWilsonFlow(int confNum)
applies the gradient flow to one configuration
Definition: wilsonflow.cpp:115
void initialize()
runs the initializers of the subclasses.
Definition: wilsonflow.cpp:72
Class that represents the QCD field as an array of 4 SU3 lattices.
Definition: field.h:53
void createLattice(std::array< int, 4 > latticeSize)
creates the GluonField object and the temporary lattice for the action derivative.
Definition: wilsonflow.cpp:87
void execute()
Executes the App. First initializes the system then applies the gradient flow to the configurations...
Definition: wilsonflow.cpp:54
Implementation of the WilsonFlow App class.
Definition: wilsonflow.h:53
std::array< int, 4 > m_size
Size of the sublattice.
Definition: app.h:73
Prototype for the Action class group.
Definition: action.h:54
void flowStep()
applies one step of the integration scheme, described in paper
Definition: wilsonflow.cpp:141
Contains the definition of the App prototype.
Prototype for the Observable class group.
Definition: observable.h:52
Prototype for the App class group.
Definition: app.h:59