Grid 0.7.0
hmc_observable.h
Go to the documentation of this file.
1/*************************************************************************************
2
3Grid physics library, www.github.com/paboyle/Grid
4
5Source file: ./lib/qcd/observables/hmc_observable.h
6
7Copyright (C) 2017
8
9Author: Guido Cossu <guido.cossu@ed.ac.uk>
10
11This program is free software; you can redistribute it and/or modify
12it under the terms of the GNU General Public License as published by
13the Free Software Foundation; either version 2 of the License, or
14(at your option) any later version.
15
16This program is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19GNU General Public License for more details.
20
21You should have received a copy of the GNU General Public License along
22with this program; if not, write to the Free Software Foundation, Inc.,
2351 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24
25See the full license in the file "LICENSE" in the top level distribution
26directory
27*************************************************************************************/
28/* END LEGAL */
29
30#pragma once
31
33
34template <class Field>
53{
54 public:
55 virtual void TrajectoryComplete(int traj,
56 ConfigurationBase<Field> &SmartConfig,
57 GridSerialRNG &sRNG,
58 GridParallelRNG &pRNG)
59 {
60 TrajectoryComplete(traj,SmartConfig.get_U(false),sRNG,pRNG); // Unsmeared observable
61 };
62 virtual void TrajectoryComplete(int traj,
63 Field &U,
64 GridSerialRNG &sRNG,
65 GridParallelRNG &pRNG) = 0;
66
67 // allow backward compatibility with current observables that do not have
68 // acceptance argument
69 virtual void TrajectoryComplete(int traj,
70 ConfigurationBase<Field> &SmartConfig,
71 GridSerialRNG &sRNG,
72 GridParallelRNG &pRNG,
73 bool accept)
74 {
75 TrajectoryComplete(traj,SmartConfig,sRNG,pRNG); // Unsmeared observable
76 };
77 virtual void TrajectoryComplete(int traj,
78 Field &U,
79 GridSerialRNG &sRNG,
80 GridParallelRNG &pRNG,
81 bool accept)
82 {
83 TrajectoryComplete(traj, U, sRNG, pRNG);
84 };
85};
86
88
90#include "plaquette.h"
92#include "topological_charge.h"
94#include "polyakov_loop.h"
96
97
#define NAMESPACE_CHECK(x)
Definition Namespace.h:39
#define NAMESPACE_BEGIN(A)
Definition Namespace.h:35
#define NAMESPACE_END(A)
Definition Namespace.h:36
static INTERNAL_PRECISION U
Definition Zolotarev.cc:230
Base class for "smart configuration", a container for a gauge configuration holding unsmeared and sme...
Definition ActionBase.h:51
virtual Field & get_U(bool smeared=false)=0
HMC Observable class, HMC observables inherit the method TrajectoryComplete from here,...
virtual void TrajectoryComplete(int traj, ConfigurationBase< Field > &SmartConfig, GridSerialRNG &sRNG, GridParallelRNG &pRNG, bool accept)
virtual void TrajectoryComplete(int traj, Field &U, GridSerialRNG &sRNG, GridParallelRNG &pRNG, bool accept)
virtual void TrajectoryComplete(int traj, ConfigurationBase< Field > &SmartConfig, GridSerialRNG &sRNG, GridParallelRNG &pRNG)
virtual void TrajectoryComplete(int traj, Field &U, GridSerialRNG &sRNG, GridParallelRNG &pRNG)=0