Grid 0.7.0
ActionParams.h
Go to the documentation of this file.
1/*************************************************************************************
2
3Grid physics library, www.github.com/paboyle/Grid
4
5Source file: ./lib/qcd/action/ActionParams.h
6
7Copyright (C) 2015
8
9Author: Peter Boyle <paboyle@ph.ed.ac.uk>
10Author: paboyle <paboyle@ph.ed.ac.uk>
11Author: Guido Cossu <guido.cossu@ed.ac.uk>
12
13This program is free software; you can redistribute it and/or modify
14it under the terms of the GNU General Public License as published by
15the Free Software Foundation; either version 2 of the License, or
16(at your option) any later version.
17
18This program is distributed in the hope that it will be useful,
19but WITHOUT ANY WARRANTY; without even the implied warranty of
20MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21GNU General Public License for more details.
22
23You should have received a copy of the GNU General Public License along
24with this program; if not, write to the Free Software Foundation, Inc.,
2551 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26
27See the full license in the file "LICENSE" in the top level distribution
28directory
29*************************************************************************************/
30 /* END LEGAL */
31
32#ifndef GRID_QCD_ACTION_PARAMS_H
33#define GRID_QCD_ACTION_PARAMS_H
34
36
37
40 //mu=Nd-1 is assumed to be the time direction and a twist value of 1 indicates antiperiodic BCs
41 Coordinate dirichlet; // Blocksize of dirichlet BCs
44 dirichlet.resize(0);
46 };
47};
48
67
69 Coordinate dirichlet; // Blocksize of dirichlet BCs
72 {
74 dirichlet.resize(0);
75 };
76};
77
78 struct OneFlavourRationalParams : Serializable {
80 RealD, lo,
81 RealD, hi,
82 int, MaxIter,
83 RealD, tolerance,
84 RealD, mdtolerance,
85 int, degree,
86 int, precision,
87 int, BoundsCheckFreq,
88 RealD, BoundsCheckTol);
89
90 // MaxIter and tolerance, vectors??
91
92 // constructor
94 RealD _hi = 1.0,
95 int _maxit = 1000,
96 RealD tol = 1.0e-8,
97 int _degree = 10,
98 int _precision = 64,
99 int _BoundsCheckFreq=20,
100 RealD mdtol = 1.0e-6,
101 double _BoundsCheckTol=1e-6)
102 : lo(_lo),
103 hi(_hi),
104 MaxIter(_maxit),
105 tolerance(tol),
106 mdtolerance(mdtol),
107 degree(_degree),
108 precision(_precision),
109 BoundsCheckFreq(_BoundsCheckFreq),
110 BoundsCheckTol(_BoundsCheckTol){};
111 };
112
113 /*Action parameters for the generalized rational action
114 The approximation is for (M^dag M)^{1/inv_pow}
115 where inv_pow is the denominator of the fractional power.
116 Default inv_pow=2 for square root, making this equivalent to
117 the OneFlavourRational action
118 */
119 struct RationalActionParams : Serializable {
121 int, inv_pow,
122 RealD, lo, //low eigenvalue bound of rational approx
123 RealD, hi, //high eigenvalue bound of rational approx
124 int, MaxIter, //maximum iterations in msCG
125 RealD, action_tolerance, //msCG tolerance in action evaluation
126 int, action_degree, //rational approx tolerance in action evaluation
127 RealD, md_tolerance, //msCG tolerance in MD integration
128 int, md_degree, //rational approx tolerance in MD integration
129 int, precision, //precision of floating point arithmetic
130 int, BoundsCheckFreq); //frequency the approximation is tested (with Metropolis degree/tolerance); 0 disables the check
131 // constructor
132 RationalActionParams(int _inv_pow = 2,
133 RealD _lo = 0.0,
134 RealD _hi = 1.0,
135 int _maxit = 1000,
136 RealD _action_tolerance = 1.0e-8,
137 int _action_degree = 10,
138 RealD _md_tolerance = 1.0e-8,
139 int _md_degree = 10,
140 int _precision = 64,
141 int _BoundsCheckFreq=20)
142 : inv_pow(_inv_pow),
143 lo(_lo),
144 hi(_hi),
145 MaxIter(_maxit),
146 action_tolerance(_action_tolerance),
147 action_degree(_action_degree),
148 md_tolerance(_md_tolerance),
149 md_degree(_md_degree),
150 precision(_precision),
151 BoundsCheckFreq(_BoundsCheckFreq){};
152 };
153
154
156
157#endif
AcceleratorVector< int, MaxDims > Coordinate
Definition Coordinate.h:95
#define NAMESPACE_BEGIN(A)
Definition Namespace.h:35
#define NAMESPACE_END(A)
Definition Namespace.h:36
static constexpr int Nd
Definition QCD.h:52
double RealD
Definition Simd.h:61
GRID_SERIALIZABLE_CLASS_MEMBERS(OneFlavourRationalParams, RealD, lo, RealD, hi, int, MaxIter, RealD, tolerance, RealD, mdtolerance, int, degree, int, precision, int, BoundsCheckFreq, RealD, BoundsCheckTol)
OneFlavourRationalParams(RealD _lo=0.0, RealD _hi=1.0, int _maxit=1000, RealD tol=1.0e-8, int _degree=10, int _precision=64, int _BoundsCheckFreq=20, RealD mdtol=1.0e-6, double _BoundsCheckTol=1e-6)
RationalActionParams(int _inv_pow=2, RealD _lo=0.0, RealD _hi=1.0, int _maxit=1000, RealD _action_tolerance=1.0e-8, int _action_degree=10, RealD _md_tolerance=1.0e-8, int _md_degree=10, int _precision=64, int _BoundsCheckFreq=20)
GRID_SERIALIZABLE_CLASS_MEMBERS(RationalActionParams, int, inv_pow, RealD, lo, RealD, hi, int, MaxIter, RealD, action_tolerance, int, action_degree, RealD, md_tolerance, int, md_degree, int, precision, int, BoundsCheckFreq)
WilsonImplParams(const AcceleratorVector< Complex, Nd > phi)
AcceleratorVector< Complex, Nd > boundary_phases
AcceleratorVector< Real, Nd > twist_n_2pi_L
Coordinate dirichlet