LatticeYangMills
gaugefieldreader.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 GaugeFieldReader : public App {
52 public:
53  GaugeFieldReader() {}
54  // main functions
55  void initGFR();
56  void navigateConf();
57 
58  // setters-getters
59  void addObservable(Observable* observable);
60  const char* getOutDir() { return m_outDir; }
61  std::array<int, 4>& getSize() { return m_size; }
62  std::vector<double>& getObsValues() { return m_obsValues; }
63  std::vector<Observable*>& getObs() { return m_obs; }
64  void execute();
65 
66 
67 private:
68  // member classes
69  GluonField* m_lat = nullptr;
70  std::vector<Observable*> m_obs;
71  std::vector<double> m_obsValues;
72  std::vector<std::string> m_inputConfList;
73  std::array<int, 4> m_size;
74 
75 
76  // member variables
77  const char* m_outDir;
78 };
void execute()
Executes the App code. Perform initialization of subclasses and start the reading of the configuratio...
Class that represents the QCD field as an array of 4 SU3 lattices.
Definition: field.h:53
Implementation of the GaugeFieldReader App class.
void initGFR()
Initializes the GluonField based on the size, and the observables.
void navigateConf()
reads input link positions then prints information about it
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